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

Add Material information to iProperty.

Hello,

I have developed my plugin for Inventor which imports my CAD file into Inventor.
While importing file, I write properties related to part file in iProperties-> Custom. I could do this successfully.
Now, I want to write material property. I tried by code below but it doesn't work for 'Material'.

In code below, you can see that I have updated property for 'Material' and 'Engineer' but only 'Engineer' property gets updated not the 'Material'.

 

 

 

PropertySets pSets = partDoc.PropertySets;
            foreach (PropertySet set in pSets)
            {
                String name = set.Name;
                if (name.Equals("Design Tracking Properties"))
                {
                    Property prop = set.get_ItemByPropId(20);
                    prop.Value = "My Material String";

                    Property prop1 = set.get_ItemByPropId(42);
                    prop1.Value = "Engineer";
                }
            }

 

Can someone please help.