Hi @joels9LNRF. Give this a try.
Sub ExportParamsAndSetTitle()
If ThisApplication.ActiveDocumentType <> kPartDocumentObject Then
Call MsgBox("A Part document must be 'active' for this VBA macro to work. Exiting macro.", vbCritical, "")
Exit Sub
End If
Dim oPDoc As PartDocument
Set oPDoc = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition
Set oPDef = oPDoc.ComponentDefinition
Dim oParams As Inventor.Parameters
Set oParams = oPDef.Parameters
Dim oThickParam As Inventor.Parameter
Dim oWidthParam As Inventor.Parameter
Dim oLengthParam As Inventor.Parameter
On Error Resume Next 'ignore errors after this line
Set oThickParam = oParams.Item("Thick")
If Err <> 0 Then
Call MsgBox("Could not find parameter named 'Thick'. Exiting macro.", vbCritical, "")
Exit Sub
End If
Err.Clear
Set oWidthParam = oParams.Item("Width")
If Err <> 0 Then
Call MsgBox("Could not find parameter named 'Width'. Exiting macro.", vbCritical, "")
Exit Sub
End If
Err.Clear
Set oLengthParam = oParams.Item("Length")
If Err <> 0 Then
Call MsgBox("Could not find parameter named 'Length'. Exiting macro.", vbCritical, "")
Exit Sub
End If
Err.Clear
On Error GoTo 0 'stop ignoring errors after this line
Dim oMyParams As New Collection
oMyParams.Add (oThickParam)
oMyParams.Add (oWidthParam)
oMyParams.Add (oLengthParam)
Dim oMyParam As Inventor.Parameter
For Each oMyParam In oMyParams
If oMyParam.ExposedAsProperty = False Then
oMyParam.ExposedAsProperty = True
End If
oMyParam.CustomPropertyFormat.PropertyType = kTextPropertyType
oMyParam.CustomPropertyFormat.Units = UnitsTypeEnum.kInchLengthUnits
oMyParam.CustomPropertyFormat.Precision = kSixtyFourthsFractionalLengthPrecision
oMyParam.CustomPropertyFormat.ShowUnitsString = False
Dim oTitleProp As Inventor.Property
Set oTitleProp = oPDoc.PropertySets.Item("Inventor Summary Information").Item("Title")
Dim oDescriptionProp As Inventor.Property
Set oDescriptionProp = oPDoc.PropertySets.Item("Design Tracking Properties").Item("Description")
Dim oValue As String
oValue = "=PL <Thick> A36 X <Width> X <Length>"
oTitleProp.Value = oValue
oDescriptionProp.Value = oValue
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :bulb: or you can Explore My CONTRIBUTIONS
Wesley Crihfield

(Not an Autodesk Employee)