Message 1 of 5

Not applicable
09-11-2015
11:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am looking for an iLogic code to mark a specific user parameter in each part and subassembly to key, export, and set the "custom property type" under the equation column to be fractional instead of decimal with 1/32" precision in one all encompassing assembly (that way I don't have to run this code in each individual part, just once in the main assembly). The parameter is called PARTLENGTH and I have kind of a general code idea here:
'Dim oDoc As AssemblyDocument Dim oDoc As PartDocument = ThisDoc.Document 'of : oDoc as AssemblyDocumment = ThisDoc.Document 'nummerieke parameter Try prop = oDoc.ComponentDefinition.Parameters.UserParameters.item ("PARTLENGTH") Catch End Try param =Parameter.Param("PARTLENGTH") param.ExposedAsProperty = True 'param.CustomPropertyFormat.Precision = kThreeDecimalPlacesPrecision param.CustomPropertyFormat.ShowTrailingZeros = False param.CustomPropertyFormat.ShowLeadingZeros = False param.CustomPropertyFormat.ShowUnitsString = False 'param.CustomPropertyFormat.Units = "in"
How close is this rule to being correct? I'm afraid to run it
Solved! Go to Solution.