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

I have to aks for help one more time. The code I got works fine but I was trying to modify it so that the itemnumber is being saved in one of the standard Iproperties fields (for example in Project) and not in a custom field.

 

I think it is in this part of the code:

 

SyntaxEditor Code Snippet

 Dim oComponentDefinitionPropertySet As PropertySet
            oComponentDefinitionPropertySet = oComponentDefinition.Document.PropertySets.Item("Inventor User Defined Properties")
            'custom property tab
             Try
                'if already exists then set it 
                oComponentDefinitionPropertySet.Item("BOM Number").Value = oBOMItemNumber
            Catch ex As Exception
                'else add it
                oComponentDefinitionPropertySet.Add(oBOMItemNumber, "BOM Number")
            End Try
            'creates the custom property and inputs the value