Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: C_Haines_ENG

You could use something like this:

Try
	oDoc.PropertySets.Item("Inventor User Defined Properties").Item("Panel Type").Value = PanelType
Catch
	oDoc.PropertySets.Item("Inventor User Defined Properties").Add(PanelType, "Panel Type")
End Try

...or you could do it the more proper way, which would be to loop through all of the custom iProperties in that document, to see if the one you want to work with exists yet.  If it is found, set its value, but if after the loop, it has not been found yet, then create it.  But that would take a lot more code.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)