Dimension Information
 
Methods Introduced:
All the pfcBaseParameter methods are accessible to Dimensions as well as Parameters. See the section Parameter Objects for brief descriptions.
* 
You cannot set the value or designation status of reference dimension objects.
The methods pfcBaseDimension::GetDimValue and pfcBaseDimension::SetDimValue access the dimension value as a double. These methods provide a shortcut for accessing the dimensions' values without using a ParamValue object.
The pfcBaseParameter::GetIsRelationDriven method identifies whether the part or assembly relations control a dimension.
The method pfcBaseDimension::GetDimType returns an enumeration object that identifies whether a dimension is linear, radial, angular, or diametrical.
The method pfcBaseDimension::GetSymbol returns the dimension or reference dimension symbol (that is, “d#” or “rd#”).
The methods pfcBaseDimension::GetTexts and pfcBaseDimension::SetTexts allow access to the text strings that precede or follow the dimension value.
The method wfcWDimension::GetBound returns the bound values of a dimension using the enumerated data type wfcDimBound. When you design a model, the actual part dimensions must be within certain predetermined limits of size. These limits of size—the upper and lower dimension boundaries—are known as dimension bounds. Refer to the section Modifying Dimensions for more information on bound values.
The method wfcWDimension::GetNominalValue returns the nominal value of a dimension. The method returns the nominal value even if the dimension is set to the upper or lower bound. The nominal value is returned in degrees for an angular dimension and in the system of units for other types of dimensions.
The method wfcWDimension::GetSymbolModeText returns the text of the dimension in symbol mode.
The method wfcWDimension::IsFractional checks whether the dimension is expressed in terms of a fraction rather than a decimal.
The method wfcWDimension::IsBasic identifies if the specified dimension is a basic dimension.
The method wfcWDimension::IsInspection identifies if the specified dimension is an inspection dimension.
The method wfcWDimension::GetOwnerFeature returns the feature that owns the specified dimension.
Use the method wfcWDimension::IsDisplayedValueRounded to determine whether the specified dimension is set to display its rounded off value.
In Creo TOOLKIT, a rounded off value is a decimal value that contains only the desired number of digits after the decimal point. For example, if a dimension has the stored value 10.34132 and you want to display only two digits after the decimal point, you must round off the stored value to two decimal places. Thus, rounding off converts 10.34132 to 10.34.
Use the method wfcWDimension::DisplayValueAsRounded to set the attribute of the given dimension to display either the rounded off value or the stored value.
You can use this method for all dimensions, except angular dimensions created prior to Pro/ENGINEER Wildfire 4.0, ordinate baseline dimensions, and dimensions of legacy type. For these dimensions, the method throws an exception pfcXToolkitNotValid.
If you choose to display the rounded off value, the method wfcWDimension::GetDisplayedValue retrieves the displayed rounded value of the specified dimension. Otherwise, it retrieves the stored value.
The method wfcWDimension::GetOverrideValue returns the override value for a dimension. The default override value is zero.
* 
The override value is available only for driven dimensions.
Use the method wfcWDimension::GetDisplayedValueType to obtain the type of value displayed for a dimension using the enumerated type wfcDimValueDisplay. The valid types are:
wfcDIMVALUEDISPLAY_NOMINAL—Displays the actual value of the dimension along with the tolerance value.
wfcDIMVALUEDISPLAY_OVERRIDE—Displays the override value for the dimension along with the tolerance value.
wfcDIMVALUEDISPLAY_HIDE—Displays only the tolerance value for the dimension.
When you set a negative value to a dimension, it will either change the dimension to this negative value, or flip the direction around its reference and show a positive value dimension instead. Use the method wfcWDimension::IsSignDriven to check this. The method returns the following values:
true—When the negative sign in the dimension value is used to flip the direction.
false—When the negative sign is used to indicate a negative value, that is, the dimension is negative.
The configuration option show_dim_sign when set to yes allows you to display negative dimensions in the Creo Parametric user interface.
When the option is set no, the dimensions always show positive value. However, in this case, if you set a negative value for the dimension, the direction is flipped.
* 
Some feature types, such as, dimensions for coordinate systems and datum point offsets, always show negative or positive values, even if the option is set to no. These features do not depend on the configuration option.
The method wfcWDimension::IsAccessibleInModel identifies if a specified dimension is owned by the model. When a model owns the dimension, then by default, the dimension is accessible in the model.
The method wfcWDimension::GetSignificantDigits retrieves the number of decimals digits that are significant for a dimension or tolerance. If you specify the input argument Tolerance as false, the method retrieves the number of decimals digits that are significant for the dimension.
If you want to get the number of decimal places shown for the upper and lower values of the dimension tolerance, specify the input argument Tolerance as true.
The method wfcWDimension::GetDenominator retrieves the value of the largest possible denominator that is used to define a fractional value or tolerance. If you specify the input argument Tolerance as false, the method returns the value of the largest possible denominator used to define the fractional value.
If you want to get the value for the largest possible denominator for the upper and lower tolerance values, specify the input argument Tolerance as true. By default, this value is defined by the config.pro option, dim_fraction_denominator.
Was this helpful?