Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
patrice.vallet
480 Views, 3 Replies

Pick a attribute from a component in a drawing of an assembly

Hello,

 

I have a drawing with a assembly in, where I'm trying to put dimensions automatically.

I'm using attribute to pick up face from my assembly to attach dimension.

My problem is :

Some component are removed or added again depending of parameters, and the attribute I put on these component are broken when these components are removed and added again.

So I can't retrieved these attributes in my rules to put dimension.

 

I have thinking to put the attribute directly in my part, and use it in my drawing rule. 

I have written this code but this doesn't work.

Dim compOcc As PartDocument
compOcc = Component.InventorComponent("cadre:1")

Dim aoEdge4 As Face
oObjs = compOcc.AttributeManager.FindObjects("DIM", "face_cadr_haut", "1")
aoEdge4 = oObjs.Item(1)

 

Could you say to me if this is possible , and if yes how ?

 

Thanks