Message 1 of 4
Error when trying to add custom iProperty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sub AddItemCodeiProperty(partDoc as PartDocument, ItemCode As String)
Dim propertyName As String = "Item Code"
Dim propertyValue As String = ItemCode
customPropertySet = partDoc.PropertySets.Item("Inventor User Defined Properties")
Try
prop = customPropertySet.Item(propertyName)
Catch
' Assume error means not found
customPropertySet.Add("propertyValue", propertyName)
End Try
iProperties.Value(partDoc.DisplayName, "Custom", propertyName) = propertyValue
End Sub
For the above code, I am getting the following error for line 11 (customPropertySet.Add("propertyValue", propertyName)):
This function runs perfectly on my PC but gives the above error on the client's PC, so I'm unable to get to the bottom of it. Would appreciate any guidance.