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

Ok then, you need to open both documents and assign each one a variable, or if you are going to do a batch process, open the base document memorize its values, then open all the batch children to copy too.

dim docBase as inventor.document = thisapplication.documents.open(fullfilepathBase) 

dim docChild as inventor.document = thisapplication.documents.open(fullfilepathChild)

 

Once they are open the rest is pretty simple:

properties are organized into property Sets, and to know which ones you wish to change you can run this probing routine I created:

    Public Sub ReadOutPropertySets(invDoc As Inventor.Document)
        Try
            Dim strPropertySets As String = "Inventor Property Sets" & vbCrLf & "{Property Set Name}" & vbCrLf & "{Property.DisplayName, Property.Name, Property.ID, Property.Type, Property.Expression, Property.Value}"
            For Each pset As PropertySet In invDoc.PropertySets
                strPropertySets += vbCrLf & pset.Name
                For Each prop As [Property] In pset
                    Try
                        strPropertySets += vbCrLf & "      " & prop.DisplayName & ", " & prop.Name & ", " & prop.PropId & ", " & prop.Type & ", " & prop.Expression & ", " & prop.Value
                    Catch ex As Exception
                    End Try
                Next
            Next
            MsgBox(strPropertySets)
        Catch ex As Exception
        End Try
    End Sub

once you have identified the exact property set name and property name (or property id), you can access it with the same features in the above code prop.value = xxx,  and/or variable = prop.value

 

 

jvj