Is there any way to get sub assembly's iProperty from top assembly?

Is there any way to get sub assembly's iProperty from top assembly?

tim11_manhhieu
Advocate Advocate
223 Views
2 Replies
Message 1 of 3

Is there any way to get sub assembly's iProperty from top assembly?

tim11_manhhieu
Advocate
Advocate

Like as title, I want to get iProperty of NDA008726A.iam from B10A00HH02.iam.

Is there any way to simulate the action as shown below?

 

tim11_manhhieu_0-1745808775945.png

 

Picture1.png

0 Likes
224 Views
2 Replies
Replies (2)
Message 2 of 3

ryan.rittenhouse
Advocate
Advocate

You can get to the comments field in the iProperies through the document object of a component. The code below should get you started, just put the name of your component in and it'll pop up the property to show you that it's getting it correctly. You can then use the 'commentsText' variable to do whatever you want w/ the text in that field.

 

Dim comp As ComponentOccurrence = Component.InventorComponent("COMPONENT NAME HERE")
Dim doc As Document = comp.Definition.Document
Dim commentsText As String = doc.PropertySets.Item("Summary Information").Item("Comments").Value
MessageBox.Show(commentsText)
If this solved your problem, or answered your question, please click Accept Solution.
0 Likes
Message 3 of 3

tim11_manhhieu
Advocate
Advocate

thank you.
I want to get it in dynamic form so that when I change the information in the sub assembly, the note in the top assembly also changes.

0 Likes