Parameter types |
Top Previous Next |
Apart from Model parameters and User parameters each parameter also has a type ParameterTypeEnum which specifies who and why a parameter was created.
Here is how to get the information:
ParameterTypeEnum eParamType ; pModelParam->get_ParameterType (&eParamType) ; TRACE (L"The ParameterTypeEnum is %d\n",eParamType) ;
and the values can be:
kDerivedParameter : Parameters automatically created from derived component. kModelParameter : Parameter created automatically by Inventor when a command requires it. kReferenceParameter : Parameter created automatically by Inventor while creating a driven dimension, for example. kTableParameter : Parameters created from a table; like a spreadsheet. kUserParameter : Parameters explicitly created by the user.
The user units of the parameters are stored as a string and can be accessed like this:
CComBSTR bstrUnits ; pModelParam->get_Units (&bstrUnits) ; TRACE (L"Units = <%s> \n",(wchar_t*)(bstrUnits)) ;
You'll get strings like "mm" or "in" etc. Note that internal units may be different. |
Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)