Message 1 of 3
Access iProperties/ parameters of iPart Members
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I tried to find the answer but can't seem to find how to access and change iPropeties & parameters of a iPart member (factory member no problem). We sometimes need to change material standards or whatever and these are stored in iProperties and parameters. When this happens I update all library parts and assys using iLogic. This is all fine, it just fails on iPart and iAssembly members.
This is part of the code I'm working on now:
Dim oPartDoc As Inventor.PartDocument = ThisDoc.Document
'Other code to retrieve values
Dim isIPartMember As Boolean = oPartDoc.ComponentDefinition.IsiPartMember
If isIPartMember Then
MessageBox.Show("iPart", "Title")
'Cannot figure out how to access and change the members iProperties/parameters
Else
MessageBox.Show("Normal part", "Title")
'-----Set material properties to custom iProperties-----
'oPartDoc.PropertySets.Item("Inventor User Defined Properties").Item("Material_Name").Value = oMat_Name
'oPartDoc.PropertySets.Item("Inventor User Defined Properties").Item("Material_std").Value = oMat_Std
'-----Fill user properties to iProperties-----
oPartDoc.PropertySets.Item("Inventor User Defined Properties").Item("Certification").Value = Parameter("Certification")
oPartDoc.PropertySets.Item("Inventor Document Summary Information").Item("Category").Value = Parameter("Supply")
End If
It sees it's an iPart member but using the same method as for normal parts it runs into errors. I understand I can change the iPart factory and regenerate the members but I would like to avoid that.
Hope somebody can point me in the right direction. Thanks in advance!
Greets,
Frank
---------------------------------------------------------------------------------------------------------