Message 1 of 6

Not applicable
08-09-2016
12:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey,
So I've been trying to use a lot of the information contained in this post to write code that changes the format of my Model Parameters. It seems to only work for User Parameters, however. What am I missing?
My code looks like this:
SyntaxEditor Code Snippet
Dim oPartDoc As PartDocument oPartDoc = ThisApplication.ActiveDocument Dim oUserParam As UserParameter For Each oUserParam In oPartDoc.ComponentDefinition.Parameters.UserParameters oUserParamName = oUserParam.Name If oUserParamName = "Thick" Then oUserParam.oUserParamName.ExposedAsProperty = True oFormat.Format = "Fractional" oFormat.Precision = Inventor.CustomPropertyPrecisionEnum.kSixteenthsFractionalLengthPrecision End If Next
I'm attempting to call up a Model Parameter, Set it to Export, and then change it's format to Fractional and its Precision to 1/16th.
I tried changing all the "UserParameter" instances to "Model Parameter," but it didn't work.
Solved! Go to Solution.