From a scripting point of view, given a block, whats the easiest way to find the associated blocks? #2766
-
I have created a simple FMEA profile by stereotyping the basic SysML block to FailureMode and FailureCause, these can be linked by associations to each other and the block of interest. Given a block, what is the easiest way to follow its connections to other blocks? My scripting so far seems to show up many empty collections and nested-nested Ends and Members etc I get all the blocks stereotyped as FailureMode like this:
I can get my FailureCause blocks in the same way. But now I want to follow the associations between them. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
Indeed, For background, here's the |
Beta Was this translation helpful? Give feedback.
Indeed,
endType
(or justtype
) points to the type of an association end. Association ends (gaphor.UML.Property
instances) always have amemberEnd
property that points to the association. If an association is navigable, you should see the property as part of theType
'sownedAttribute
property (given the type has anownedAttribute
property).For background, here's the
set_navigability
function.