Book a Demo

Author Topic: Shared Property --  (Read 4101 times)

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Shared Property --
« on: June 26, 2015, 03:38:26 am »
How do I create a shared property using the EA Java API?
Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Shared Property --
« Reply #1 on: June 26, 2015, 04:34:33 am »
Uhm. What is a shared property?

q.

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Shared Property --
« Reply #2 on: June 26, 2015, 04:59:11 am »
SysMl shared property is the opposite end of the white diamond association.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Shared Property --
« Reply #3 on: June 26, 2015, 05:29:32 am »
Ah, I see. I'll have a look.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Shared Property --
« Reply #4 on: June 26, 2015, 05:50:02 am »
The following Perl snippet created an aggregation with a hollow diamond.
Code: [Select]
my $e1 = $rep->GetElementByGUID("{311B9F9F-DFB0-4d18-9454-7AB2E6962B1F}");
my $e2 = $rep->GetElementByGUID("{10604B49-AC62-4967-AB44-3CB8C5A30445}");
my $c = $e1->Connectors->AddNew("", "Aggregation");
$c->{SupplierId} = $e2->ElementId;
$c->Update();
$c->{SupplierEnd}->{Aggregation} = 1;
$c->{SupplierEnd}->Update();

Using a 2 instead of the 1 creates a filled diamond.

q.