Is it possible to use the inventory api to determine the entity name for the corner used in the assembly constraint??

Is it possible to use the inventory api to determine the entity name for the corner used in the assembly constraint??

seosk1571C4FHH
Enthusiast Enthusiast
230 Views
4 Replies
Message 1 of 5

Is it possible to use the inventory api to determine the entity name for the corner used in the assembly constraint??

seosk1571C4FHH
Enthusiast
Enthusiast

Is it possible to use the inventory api to determine the entity name for the corner used in the assembly constraint??

0 Likes
Accepted solutions (1)
231 Views
4 Replies
Replies (4)
Message 2 of 5

a.brusamolino
Enthusiast
Enthusiast

Hi!

If by "corner" you mean a vertex or an edge that you have selected to set the constraint, then yes, it’s possible!
You just need to access the "EntityOne" or "EntityTwo" fields of that particolar constraint contained in the constraints list of AssemblyComponentDefinition.

 

oDoc.ComponentDefinition.Constraints.Item(i).EntityOne

 

Message 3 of 5

seosk1571C4FHH
Enthusiast
Enthusiast

seosk1571C4FHH_0-1743716948749.png

Thank you for your answer.
Can't I get a name like edge_A shown in the picture?

0 Likes
Message 4 of 5

a.brusamolino
Enthusiast
Enthusiast
Accepted solution

Yes you can! Once you define the entity you want (e.g. oEdge), you can get the desired Assigned Name in this way:

 

EntityAttributeSet = oEdge.AttributeSets("iLogicEntityNameSet")
EntityName = EntityAttributeSet.Item("iLogicEntityName").Value
MsgBox(EntityName)

 

Hope it helps!

Message 5 of 5

seosk1571C4FHH
Enthusiast
Enthusiast

Thank you so much.
My problem has been solved perfectly