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

Hi @didin.suryadi6JREK 

You must use a value of the datatype expected by the property type you want it to be.

For example, if you want a date property, the value must be of a date type.

 

Dim propertyName1 As String = "Rev Desc"
Dim propertyValue1 As String = ""

Dim customPropertySet As PropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")


Try
	prop = customPropertySet.Item(propertyName1)
Catch
	customPropertySet.Add("", propertyName1)
End Try

Dim propertyName2 As String = "Rev Date"
Dim propertyValue2 As Date = Today.Date


Try
	prop = customPropertySet.Item(propertyName2)
Catch
	customPropertySet.Add(propertyValue2, propertyName2)
End Try

Dim propertyName3 As String = "Salvagnini Proficient"
Dim propertyValue3 As Boolean = True


Try
	prop = customPropertySet.Item(propertyName3)
Catch
	customPropertySet.Add(propertyValue3, propertyName3)

End Try