'Define the open document Dim openDoc As Document openDoc = ThisDoc.Document 'Look at all of the files referenced in the open document Dim docFile As Document For Each docFile In openDoc.AllReferencedDocuments 'look at only part files If docFile.DocumentType = kPartDocumentObject Then 'Make sure part is modifiable If docfile.IsModifiable = True Then 'format file name Dim FNamePos As Long FNamePos = InStrRev(docFile.FullFileName, "\", -1) Dim docFName As String docFName = Right(docFile.FullFileName, Len(docFile.FullFileName) - FNamePos) 'Format Thickness, Width, and Length '[ oThickness = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters Try 'Try To Change value Of param 'Parameter("Thickness") = Parameter("Thickness") oThickness.ExposedAsProperty = True If oThickness.Units = "mm" Then oFormat=oThickness.CustomPropertyFormat oFormat.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType oFormat.Precision=Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision oFormat.Units = "mm" oFormat.ShowUnitsString = True oFormat.ShowLeadingZeros = False oFormat.ShowTrailingZeros = True Else If oThickness.Units = "in" Then oFormat=oThickness.CustomPropertyFormat oFormat.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType oFormat.Precision=Inventor.CustomPropertyPrecisionEnum.kThreeDecimalPlacesPrecision oFormat.Units = "in" oFormat.ShowUnitsString = False oFormat.ShowLeadingZeros = False oFormat.ShowTrailingZeros = True End If Catch End Try End If Else 'Do nothing if not modifiable docFile.Rebuild End If Next iLogicVb.UpdateWhenDone = True