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

Help: Get iProperties selection Item by API

Dears,

Could you please help me check what's wrong in my Code that I'm using to read selection item's iProperties:

Dim AssemblyDOC As AssemblyDocument = _InventorApp.ActiveDocument
Dim ITEM = _InventorApp.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select an Item")
If (Not ITEM Is Nothing) Then
	Dim ITEMPropertySets As PropertySets = ITEM.PropertySets
	Dim ITEMPropertySet As PropertySet = nITEMPropertySets.Item("Design Tracking Properties")
	Dim ITEMPartNumber As Property = nITEMPropertySet.Item("Part Number")
	MsgBox("THE PART NUMBER: " & ITEMPartNumber)
End If

I'm using VS2022 + Inventor 2018

Thank you very much!

Tags (1)