iProperties from part to assembly

iProperties from part to assembly

martinhoos
Advocate Advocate
475 Views
2 Replies
Message 1 of 3

iProperties from part to assembly

martinhoos
Advocate
Advocate

Hello,

i am looking for a sample code which take custom iProperties from a selected part (code shouldt ask me to select a part) to the assembly.

Thank you in advance...

Regards

Martin

 

 

0 Likes
Accepted solutions (1)
476 Views
2 Replies
Replies (2)
Message 2 of 3

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@martinhoos,

 

Try the following iLogic code. Before running code, please update Custom iProperty name in the code and select the part in graphical area.

 

Dim doc = ThisDoc.Document

If doc.SelectSet.Count = 1 Then
	Dim occ = doc.SelectSet.Item(1)
	Dim name As String = iProperties.Value(occ.Name, "Custom", "Name of custom iProperty")
	MessageBox.Show(name, "Title")	
Else
	MessageBox.Show("Part is not selected", "iLogic")
End If

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 3 of 3

martinhoos
Advocate
Advocate

Hi Chandra, thank you very much for your reply...  code runs well!

Regards from germay

Martin

0 Likes