Get references to a Connector in a python script
I'm trying to get the references to a connector in a python script. I can do it in Hypermesh's GUI, simply righ-click on the connector in the connector browser and select references from the pop-up.
Is there a way to do the same from a script in python?
I have tried to use hm_getcrossreferencedentities but I get nothing in return. I'm calling it like: model.hm_getcrossreferencedentities(conn, 7, col_set) where type(conn) is hm.mdi.entities.Connector and type(col_set) is a hwdescriptor.CollectionSet.
Find more posts tagged with
Sort by:
1 - 1 of
11
Hi @Alberto_Ingeniacity
Please seen the screenshot below highlighting the logic. The direct output captured in the result object only includes a list of strings representing the referenced entity types (the information is also available as part of the CollectionSet). The actual entities are pushed into the CollectionSet object which needs to be supplied to the function.
For cross-referenced entities, the logic is the same, you just call the hm_getcrossreferencedentities function.
Thanks,
Michal
Automation & Customization