Namespaces | |
Bentley | |
The Bentley namespace contains types defined by the Bentley Library. | |
Bentley::DgnPlatform | |
The DgnPlatform namespace contains types defined by the DgnPlatform. | |
Classes | |
struct | IDimCreateData |
An object of this type is required to supply necessary information to DimensionHandler::CreateDimensionElement. More... | |
struct | IDimensionQuery |
Query an element for dimension specific properties. More... | |
struct | IDimensionEdit |
Modify and Query dimension specific properties of an element. More... | |
struct | DimensionTextPartId |
! While querying a dimension using ITextEdit and ITextQuery the returned ! object is a DimensionTextPartId. More... | |
struct | DimensionHandler |
The default type handler for Dimension elements (type: DIMENSION_ELM). More... | |
Functions | |
DGNPLATFORM_TYPEDEFS (IDimCreateData) | |
int | mdlDim_create (MSElementP dim, MSElementCP seed, RotMatrixP rMatrix, DgnPlatform::DimensionType dimType, int dimView) |
Creates an empty dimension element. More... | |
void | mdlDim_defineRotMatrix (RotMatrixP rMatrix, MSElementP dim, DPoint3dCP point1, DPoint3dCP point2, DPoint3dCP point3) |
Defines the rotation matrix for a dimension. More... | |
void | mdlDim_setRotMatrix (MSElementP dimElement, RotMatrixP rMatrix) |
Sets the rotation matrix for a dimension. More... | |
int | mdlDim_setHeight (MSElementP dim, double height, int relative) |
Sets the height for a linear or angular dimension. More... | |
int | mdlDim_setTextOffset (MSElementP dim, int segNo, int justify, double offset) |
Changes the dimenension's text location in the direction of the dimension line. More... | |
void | mdlDim_getRotMatrix (MSElementCP dim, RotMatrixP rMatrix) |
Extracts the rotation matrix from a dimension. More... | |
int | mdlDim_insertPoint (MSElementP dimP, DPoint3dCP newPointP, DgnPlatform::AssocPoint *assocPointP, int pointNo, int option) |
Inserts the given point into a dimension. More... | |
int | mdlDim_getStrings (DgnPlatform::DimStrings *dimStrings, DgnPlatform::DimStringConfig *config, MSElementCP dim, int segNo) |
Extracts the user text strings from a dimension. More... | |
int | mdlDim_setStrings (MSElementP dim, int segNo, DgnPlatform::DimStrings *dimStrings) |
Replaces the strings in a dimension. More... | |
int | mdlDim_getActualValues (MSElementP dim, double *pdValues) |
Extracts the actual measured values from all segments of a dimension. More... | |
StatusInt | mdlDim_setTextStyle (MSElementP pDimElm, const MdlTextStyle *pTextStyle) |
Set the text style properties of a dimension element. More... | |
StatusInt | mdlDim_getDimStyleName (WCharP pName, int numChars, MSElementCP pDimElm, DgnModelRefP modelRef) |
Get the name of the dimension style used by a dimension. More... | |
int | mdlDim_getElementDescr (MSElementDescrH edPP, MSElementCP dim, DgnModelRefP modelRef, int grphGrp) |
Converts a dimension element to a chain of geometric primitive elements. More... | |
int | mdlDim_deletePoint (MSElementP dim, int pointNo) |
Deletes the vertex at pointNo from a dimension element. More... | |
int | mdlDim_extractPoints (DPoint3dP outPoints, MSElementCP dim, int pointNo, int nPoints) |
Extracts the definition points from a dimension. More... | |
DGNPLATFORM_TYPEDEFS | ( | IDimCreateData | ) |
int mdlDim_create | ( | MSElementP | dim, |
MSElementCP | seed, | ||
RotMatrixP | rMatrix, | ||
DgnPlatform::DimensionType | dimType, | ||
int | dimView | ||
) |
Creates an empty dimension element.
If seed is not NULL, all dimension settings are taken from seed.
[out] | dim | new dimension element |
[in] | seed | seed dimension element or NULL |
[in] | dimType | determines the type of dimension created. Ex. DimensionType::SizeArrow, see table below for a complete list. |
[in] | dimView | specifies the view (0-7) used for text orientation. |
[in] | rMatrix | dimension element rotation matrix. Pass NULL for identity. |
DimensionType::SizeArrow |
DimensionType::SizeStroke |
DimensionType::LocateSingle |
DimensionType::LocateStacked |
DimensionType::AngleSize |
DimensionType::ArcSize |
DimensionType::AngleLocation |
DimensionType::ArcLocation |
DimensionType::AngleLines |
DimensionType::AngleAxis |
DimensionType::Radius |
DimensionType::Diameter |
DimensionType::DiameterParallel |
DimensionType::DiameterPerpendicular |
DimensionType::CustomLinear |
DimensionType::Ordinate |
DimensionType::RadiusExtended |
DimensionType::DiameterExtended |
DimensionType::Center |
DimensionType::AngleAxisX |
DimensionType::AngleAxisY |
DimensionType::LabelLine |
DimensionType::Note |
void mdlDim_defineRotMatrix | ( | RotMatrixP | rMatrix, |
MSElementP | dim, | ||
DPoint3dCP | point1, | ||
DPoint3dCP | point2, | ||
DPoint3dCP | point3 | ||
) |
Defines the rotation matrix for a dimension.
Can be used with the following types of dimensions:
[out] | rMatrix | rotation matrix |
[in,out] | dim | dimension element |
[in] | point1 | first point |
[in] | point2 | second point |
[in] | point3 | third point |
int mdlDim_deletePoint | ( | MSElementP | dim, |
int | pointNo | ||
) |
Deletes the vertex at pointNo from a dimension element.
[in,out] | dim | Dimension element |
[in] | pointNo | Point to delete |
int mdlDim_extractPoints | ( | DPoint3dP | outPoints, |
MSElementCP | dim, | ||
int | pointNo, | ||
int | nPoints | ||
) |
Extracts the definition points from a dimension.
[out] | outPoints | must be at least nPoints* sizeof(DPoint3d) bytes. |
[in] | dim | dimension element |
[in] | pointNo | first point to extract |
[in] | nPoints | number of points to extract |
int mdlDim_getActualValues | ( | MSElementP | dim, |
double * | pdValues | ||
) |
Extracts the actual measured values from all segments of a dimension.
These values are different from the displayed values in that they do not include the dimension scale, have not been converted to the dimension units, and have not been rounded.
[in] | dim | Dimension element |
[in] | pdValues | A pointer to an array of doubles. See Remarks. |
The initial contents of this array are irrelevant. Upon return, the first N elements will be populated with the actual values of the segments, where N is equal to the number of segments in the dimension element.
StatusInt mdlDim_getDimStyleName | ( | WCharP | pName, |
int | numChars, | ||
MSElementCP | pDimElm, | ||
DgnModelRefP | modelRef | ||
) |
Get the name of the dimension style used by a dimension.
[out] | pName | Dimension style name |
[in] | numChars | number of characters in output buffer (usually MAX_DIMSTYLE_NAME_LENGTH) |
[in] | pDimElm | Dimension Element |
[in] | modelRef | modelRef |
int mdlDim_getElementDescr | ( | MSElementDescrH | edPP, |
MSElementCP | dim, | ||
DgnModelRefP | modelRef, | ||
int | grphGrp | ||
) |
Converts a dimension element to a chain of geometric primitive elements.
[out] | edPP | Element descriptor |
[in] | dim | Dimension element |
[in] | modelRef | Dimension element model ref |
[in] | grphGrp | If true, the result elements will all be assigned to a new graphic group |
void mdlDim_getRotMatrix | ( | MSElementCP | dim, |
RotMatrixP | rMatrix | ||
) |
Extracts the rotation matrix from a dimension.
[in] | dim | Dimension element |
[out] | rMatrix | Rotation Matrix |
int mdlDim_getStrings | ( | DgnPlatform::DimStrings * | dimStrings, |
DgnPlatform::DimStringConfig * | config, | ||
MSElementCP | dim, | ||
int | segNo | ||
) |
Extracts the user text strings from a dimension.
[out] | dimStrings | text strings |
[out] | config | string configuration |
[in] | dim | dimension element |
[in] | segNo | segment containing the dimension text. The first text string encountered in a dimension element is in segment zero. |
int mdlDim_insertPoint | ( | MSElementP | dimP, |
DPoint3dCP | newPointP, | ||
DgnPlatform::AssocPoint * | assocPointP, | ||
int | pointNo, | ||
int | option | ||
) |
Inserts the given point into a dimension.
[in,out] | dimP | dimension element |
[in] | newPointP | the point to add, unless the option specified is POINT_ASSOC in which case assocPointP is the point to add. newPointP may also be used if POINT_CHECK fails when using POINT_ASSOC. |
[in] | assocPointP | used if option is POT_ASSOC. Assoc points can be created using the mdlAssoc functions, ex. mdlAssoc_createLinear |
[in] | pointNo | position to insert point (negative for last). |
[in] | option | determines the content of newPoint and must be set to one of the constants defined below |
Value | Description |
POINT_STD | newPointP is inserted as a non-associative point |
POINT_ASSOC | assocPointP is inserted as an associative point |
POINT_CHECK | if the assoc-lock is active, and the user is currently snapped, the active snap is used to create an associative point which is inserted. Otherwise newPointP is inserted as a non-associative point |
int mdlDim_setHeight | ( | MSElementP | dim, |
double | height, | ||
int | relative | ||
) |
Sets the height for a linear or angular dimension.
The height is the distance from the first dimensioned point to the dimension line of the first segment.
This function works only for the following dimension types:
[in,out] | dim | dimension to modify |
[in] | height | new height |
[in] | relative | this option is not currently used, pass 0 |
void mdlDim_setRotMatrix | ( | MSElementP | dimElement, |
RotMatrixP | rMatrix | ||
) |
Sets the rotation matrix for a dimension.
[in] | dimElement | dimension element |
[out] | rMatrix | rotation matrix |
int mdlDim_setStrings | ( | MSElementP | dim, |
int | segNo, | ||
DgnPlatform::DimStrings * | dimStrings | ||
) |
Replaces the strings in a dimension.
[in,out] | dim | dimension element |
[in] | segNo | segment containing the dimension text. The first text string encountered in a dimension element is in segment zero. |
[out] | dimStrings | dimension text strings |
int mdlDim_setTextOffset | ( | MSElementP | dim, |
int | segNo, | ||
int | justify, | ||
double | offset | ||
) |
Changes the dimenension's text location in the direction of the dimension line.
[in,out] | dim | dimension to modify |
[in] | segNo | segment containing the dimension text to move. The first text string encountered in a dimension element is in segment zero. |
[in] | justify | must be set to one of the constants listed below. |
[in] | offset | the distance from the dimension line origin to the dimension text origin measured along the dimension line. Used only if justify is set to DIMTEXT_OFFSET. |
Value | Description | offset |
DIMTEXT_LEFT | Text left-justified in the dimension line | ignored |
DIMTEXT_CENTER | Text centered in the dimension line | ignored |
DIMTEXT_RIGHT | Text right-justified in the dimension line | ignored |
DIMTEXT_OFFSET | Text positioned by the value of offset | used |
StatusInt mdlDim_setTextStyle | ( | MSElementP | pDimElm, |
const MdlTextStyle * | pTextStyle | ||
) |
Set the text style properties of a dimension element.
These properties are stored for each dimension, and will be automatically updated if the dimension is being controlled by a text style.
[in,out] | pDimElm | Dimension Element |
[in] | pTextStyle | text style properties |