Hi Stephane,
Thanks, that’s indeed what I was looking for.
One follow-up question though: I’m trying to follow the generic trace using P4C, but I’m receiving the following error I don’t understand:
org.eclipse.ease.ScriptExecutionException: Traceback (most recent call last):
File “workspace://MINERVA scripts/createRDStags.py”, line 141, in
\# Check if we have a Java object
File “workspace://MINERVA scripts/createRDStags.py”, line 127, in followGenericTrace
File “workspace://Python4Capella/simplified_api/capella.py”, line 6357, in get_target
TypeError: ‘NoneType’ object is not callable
the code is as follows:
for trace in elem.get_contained_generic_traces():
linkedItem = trace.get_target()
print(linkedItem)
I further inserted some print statements in the get_target method to see what’s happening, which returns the following:
self: <_main_.GenericTrace object at 0x000002CF6CE9C790>
e_object_class: <class ‘_main_.EObject’>
value: org.polarsys.capella.core.data.cs.impl.PartImpl@62f4a77f (id: 62474d0a-c7ba-4938-9c3a-4183a55a078e, sid: null) (name: DF-SOL-01) (visibleInDoc: true, visibleInLM: true, summary: null, review: null) (isAbstract: false, isStatic: false, visibility: UNSET) (ordered: false, unique: false, minInclusive: false, maxInclusive: false, final: false, aggregationKind: UNSET, isDerived: false, isReadOnly: false, isPartOfKey: false)
specific_cls: None
Any idea what’s going on?
Thanks,
Sebastiaan