Book a Demo

Author Topic: Adding SysML Value Properties through the API  (Read 4647 times)

sherey

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Adding SysML Value Properties through the API
« on: November 04, 2014, 08:45:30 am »
Using the API, I am able to add all sorts of things to my SysML blocks except for Value Properties.

I see in the reference model in the help that you can't add Custom Properties to elements.  But when I read my value properties from the api, they are listed in the elements and embedded elements collections of the block, not the Properties or Custom Properties collections.

Is there also a restriction on not adding SysML Properties as elements?  Or is there a different object type besides "UML::Property" to use in the AddNew method?

Thanks!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Adding SysML Value Properties through the API
« Reply #1 on: November 05, 2014, 09:04:57 am »
Instead of UML::Property, try UML::Part
The Sparx Team
[email protected]

sherey

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Adding SysML Value Properties through the API
« Reply #2 on: November 06, 2014, 05:02:06 am »
UML::Part didn't work, but "Part" by itself worked.

I want to define a stereotype in my custom profile that is created as an extension of part.  However, I don't see "Part" in the metaclass list. It isn't even listed as a stereotype in the SysML 1.3 MDG.  Do I make my stereotype an extension of "Object"?
« Last Edit: November 06, 2014, 05:26:12 am by sherey »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Adding SysML Value Properties through the API
« Reply #3 on: November 06, 2014, 08:02:30 am »
There are (have been?) some elements not in the list which you could type manually, though. That might be one of those candidates.

q.