Modules | |
2D Constraint Modeling | |
Interface to 2D constraint system. | |
3D Constraint Modeling | |
Bit Mask | |
A BitMask holds a variable-sized array of bits. | |
Boolean Functions | |
Cell Functions | |
Detailing Symbols | |
A detailing symbol is an annotation that plays a vital role in drawing composition. | |
Dimension Elements | |
Filter Api | |
Geometry Collectors | |
Geometric Queries | |
Line Style Manager | |
The Line Style Manager is the root for all line style access. | |
MatrixElements | |
MeshElements | |
Multi-Line Functions | |
Multi-Line Styles | |
Named Boundary | |
A Named Boundary is a named graphical element that represents a boundary of interest in the model. | |
Parametric Modeling | |
Provides facilities for using variables and variations to define parametric geometry. | |
Patterning | |
Reference File | |
Section Clip | |
SectionClip holds information associated with the clip volume tool which inturn is used to limit the displayed volume for a view to the region within a clipping element. | |
Solids Api | |
Surface Creation | |
Surface Functions | |
TagFunctions | |
Tables | |
Text | |
The text module refers to element-based text, including the classes and interfaces that can be used to work both with text elements, and other element types that expose text. | |
Classes | |
struct | fillSymbology |
The element filll symbology. More... | |
Typedefs | |
typedef struct fillSymbology | FillSymbology |
The element filll symbology. More... | |
Functions | |
int | mdlArc_extractDEllipse3d (DEllipse3d *pEllipse, MSElementP pEllipseElement) |
Used to extract ellipse data from an ellipse or arc element. More... | |
UInt32 | mdlElement_add (MSElementP element) |
Adds a new MicroStation element to the design file. More... | |
UInt32 | mdlElement_append (MSElementP element) |
Adds the modified MicroStation element pointed to by element to the design file. More... | |
int | mdlElement_appendAttributes (MSElementP pElement, int length, void const *buffer) |
Appends attribute information in the attributes buffer to the end of any existing attributes on the element pointed to by element. More... | |
void | mdlElement_display (MSElementP elementP, DgnPlatform::DgnDrawMode drawmode) |
Displays the MicroStation element pointed to by element in all active views. More... | |
void | mdlElement_displayInSelectedViews (MSElementP pElement, int drawmode, int viewMask) |
This function is identical to mdlElement_display except that is has an additional parameter, viewMask, that specifies the views into which the element will be drawn. More... | |
int | mdlElement_extractAttributes (int *length, UInt16 *buffer, MSElementCP pElement) |
Extracts attribute information from the element pointed to by element. More... | |
int | mdlElement_setFilePos (int type, DgnModelRefP modelRef, UInt32 position) |
Sets the file position for various elements. More... | |
UInt32 | mdlElement_getFilePos (int type, DgnModelRefP *pModelRef) |
Returns the file position for various elements. More... | |
int | mdlElement_extractRange (DRange3d *rangeP, MSElementCP pElement) |
Used to extract the range from an element. More... | |
UInt32 | mdlElement_getHeaderFilePos (UInt32 filePos, DgnModelRefP modelRef) |
Finds the file position for the outermost complex header for the element at the file position specified in the given model. More... | |
int | mdlElement_getType (MSElementCP el) |
Returns the type of the element pointed to by element. More... | |
void | mdlElement_getProperties (UInt32 *level, UInt32 *ggNum, DgnPlatform::DgnElementClass *elmClass, bool *locked, bool *newElm, bool *modified, bool *viewIndepend, bool *solidHole, MSElementCP pElement) |
Extracts the level, graphic group number, class, locked status, new status, modified status, view independence status, and solid-hole status from the element pointed to by element. More... | |
bool | mdlElement_isEffectivelyLocked (DgnModelRefP modelRefIn, MSElementCP pElement) |
Used to determine whether the specified element is effectively locked. More... | |
bool | mdlElementRef_isEffectivelyLocked (DgnModelRefP modelRef, ElementRefP elemRef, bool checkChildren) |
Determine whether an ElementRefP is effectively locked. More... | |
bool | mdlElementRef_isLocked (DgnModelRefP modelRef, ElementRefP elemRef, bool checkChildren) |
Determine whether an ElementRefP or (optionally) any of it's children, has it's lock bit set. More... | |
bool | mdlElementRef_checkLevelLock (ElementRefP elemRef, DgnModelRefP modelRef) |
Determine whether an ElementRefP is on a level that is not the active level while the Level Lock is active. More... | |
int | mdlElement_getLock (bool *pLockFlagOut, bool *pEffectiveLockFlagOut, DgnModelRefP modelRefIn, MSElementCP pElementIn) |
Used to get the lock values of the specified element. More... | |
void | mdlElement_getSymbology (UInt32 *color, UInt32 *weight, Int32 *style, MSElementCP el) |
Extracts the color, weight and style from the element pointed to by element. More... | |
void | mdlElement_getEffectiveSymbology (UInt32 *pColorOut, UInt32 *pWeightOut, Int32 *pStyleOut, LineStyleParamsP pStyleParamOut, UInt32 *pFillColorOut, MSElementCP pElementIn, const DgnModelRefP pModelRefIn, void *pElementPathIn, int viewIndexIn) |
Extracts the effective color, weight, style and fill color from the element. More... | |
bool | mdlElement_isVisible (MSElementCP pElementIn) |
Check if an element is visible. More... | |
bool | mdlElement_isEffectivelyVisible (MSElementCP pElementIn, const DgnModelRefP pModelRefIn, int viewIndexIn) |
Check if an element is effectively visible - considers if the level that the element is ON is also visible. More... | |
bool | mdlElement_isFilled (MSElementCP el) |
Returns element fill status. More... | |
bool | mdlElement_extractFillSymbology (FillSymbology *pFillSymbology, MSElementP u) |
Returns element fill status and fill symbology. More... | |
double | mdlElement_getTransparency (MSElementCP pElement) |
Query display transparency linkage on an element. More... | |
StatusInt | mdlElement_setTransparency (MSElementP pElement, double transparency) |
Add display transparency linkage to an element. More... | |
StatusInt | mdlElmdscr_setTransparency (MSElementDescrH edPP, double transparency) |
Add display transparency an element descriptor. More... | |
Int32 | mdlElement_getDisplayStyle (MSElementCP pElement) |
Query display style linkage on an element. More... | |
StatusInt | mdlElement_setDisplayStyle (MSElementP pElement, Int32 styleIndex) |
Add display style linkage to an element. More... | |
StatusInt | mdlElmdscr_setDisplayPriority (MSElementDescrH edPP, Int32 priority) |
Set display priority of an element descriptor. More... | |
int | mdlElement_read (MSElementP pElement, DgnModelRefP modelRef, UInt32 filepos) |
Reads an element from a design file to the memory pointed to by | |
UInt32 | mdlElement_rewrite (MSElementP newElem, MSElementP oldElem, UInt32 filePos) |
Overwrites an existing MicroStation element with a new element pointed to by newElem at file position filePos. More... | |
void | mdlElement_setProperties (MSElementP el, UInt32 const *level, UInt32 const *ggNum, DgnPlatform::DgnElementClass const *elementClass, bool const *locked, bool const *newElm, bool const *modified, bool const *viewIndepend, bool const *solidHole) |
Changes the level, graphic group number, class, locked status, new status, modified status, view independence status, and solid-hole status in the element pointed to by element. More... | |
void | mdlElement_setSymbology (MSElementP el, UInt32 const *color, UInt32 const *weight, Int32 const *style) |
Changes the color, weight, and style in the element pointed to by element to the values pointed to by color, weight and style. More... | |
StatusInt | mdlElement_setFillColor (MSElementP elementP, UInt32 fillColor) |
Sets an element's interior fill color, while mdlElement_getFillColor queries the existing fill color of an element. More... | |
StatusInt | mdlElement_getFillColor (UInt32 *fillColorP, MSElementCP elementP) |
Gets an element's interior fill color, while mdlElement_setFillColor sets the existing fill color of an element. More... | |
void | mdlElement_stripAttributes (MSElementP out, MSElementP in) |
Strips attribute information from the input element in and puts the result in out. More... | |
int | mdlElement_stroke (DPoint3dP *points, int *nPoints, MSElementP el, double tol) |
Strokes the element pointed to by <code>el</code> into vectors in an array pointed to by | |
StatusInt | mdlElement_undoableDelete (MSElementP pElement, UInt32 filePos, bool display) |
Deletes the element pointed to by element at file position filePos. More... | |
int | mdlElement_transform (MSElementP out, MSElementP in, TransformP transform, bool allowSizeChange=false) |
Transforms an element by the supplied transformation matrix and places the result in out. More... | |
int | mdlElement_offset (MSElementP out, MSElementP in, DPoint3dP offset, bool allowSizeChange=false) |
Moves the element in by the distance given by offset and places the result in out. More... | |
int | mdlElement_setLineStyle (MSElementP pElement, DgnModelRefP modelRef, int lsIndex, WCharCP styleNameP, LineStyleParamsP paramsP) |
Sets the line style of the element pointed to by elementP to the new MicroStation line style defined by pStyleName and pParams. More... | |
int | mdlElement_getLineStyle (WCharP styleNameP, LineStyleParamsP paramsP, MSElementCP elementP, DgnModelRefP modelRef, int lsIndex) |
Retrieves the line style information from an element. More... | |
int | mdlElement_getEffectiveLineStyle (WCharP pName, int numChars, LineStyleParamsP pParamsOut, MSElementCP pElementIn, DgnModelRefP modelRef, void *pElementPathIn, int lsIndexIn) |
The effective line style of an element is the fully resolved line style; in other words, the style with which it will be drawn. More... | |
bool | mdlElement_hasLineStyle (MSElementCP elementP) |
Used to test the specified element to see whether a line style other than one of the standard eight styles (style 0 through 7) has been applied to it. More... | |
void | mdlElmdscr_getProperties (DgnPlatform::LevelId *level, UInt32 *ggNum, DgnPlatform::DgnElementClass *dgnClass, bool *locked, bool *newElm, bool *modified, bool *viewIndepend, bool *solidHole, MSElementDescrCP edP) |
Queries the level, element class, graphic group, and other properties of the element desciptor pointed to by edP. More... | |
typedef struct fillSymbology FillSymbology |
The element filll symbology.
int mdlArc_extractDEllipse3d | ( | DEllipse3d * | pEllipse, |
MSElementP | pEllipseElement | ||
) |
Used to extract ellipse data from an ellipse
or arc element.
[out] | pEllipse | is the ellipse data extracted from the ellipse element, or arc element. |
[in] | pEllipseElement | is an ellipse element, or an arc element, from which the ellipse information will be extracted. |
UInt32 mdlElement_add | ( | MSElementP | element | ) |
Adds a new MicroStation element to the design file.
Before writing the element to the file, mdlElement_add sets the properties bits in the element header to not locked, new element and not modified.
[in] | element | element to add |
UInt32 mdlElement_append | ( | MSElementP | element | ) |
Adds the modified MicroStation element
pointed to by element to the design file.
The mdlElement_append function is needed when an application modifies an element and changes its size. mdlElement_rewrite can also be used for this purpose, but this function requires that you know the old file position.
[in] | element | element to append |
int mdlElement_appendAttributes | ( | MSElementP | pElement, |
int | length, | ||
void const * | buffer | ||
) |
Appends attribute information in the attributes buffer to the end of any existing attributes on the element pointed to by element.
The size of the attribute data in words is specified by length.
[out] | pElement | element pointer |
[in] | length | number of words of attribute data |
[in] | buffer | buffer containing the attribute data |
void mdlElement_display | ( | MSElementP | elementP, |
DgnPlatform::DgnDrawMode | drawmode | ||
) |
Displays the MicroStation element pointed to by element in all active views.
It displays non-complex elements that may or may not actually be in the design file. If element is NULL, MicroStation draws the element in dgnBuf.
[in] | elementP | element to be displayed |
[in] | drawmode | determines how MicroStation displays the element. Possible values for drawMode are as follows: drawMode: Meaning of drawMode field DRAW_MODE_Normal: Draw the element in its normal color. ERASE: Erase the element. HILITE: Draw the element in the current highlight color. |
void mdlElement_displayInSelectedViews | ( | MSElementP | pElement, |
int | drawmode, | ||
int | viewMask | ||
) |
This function is identical to
mdlElement_display except that is has an additional parameter, viewMask, that specifies the views into which the element will be drawn.
viewMask is a bit mask, with one bit per view; the lowest bit specifies view 1.
[in] | pElement | element to be displayed |
[in] | drawmode | drawing mode |
[in] | viewMask | one bit per view |
int mdlElement_extractAttributes | ( | int * | length, |
UInt16 * | buffer, | ||
MSElementCP | pElement | ||
) |
Extracts attribute information from
the element pointed to by element.
The attributes are copied to the attributes buffer and length is set to the size of the attribute data in words.
[out] | length | number of words of attribute data |
[out] | buffer | where to save the attribute data |
[in] | pElement | element point |
bool mdlElement_extractFillSymbology | ( | FillSymbology * | pFillSymbology, |
MSElementP | u | ||
) |
Returns element fill status and fill symbology.
[out] | pFillSymbology | fill symbology |
[in] | u | element |
int mdlElement_extractRange | ( | DRange3d * | rangeP, |
MSElementCP | pElement | ||
) |
Used to extract the range from an element.
The range is transformed by the current transform if one exists.
[out] | rangeP | is the element range. |
[in] | pElement | the input element. |
Int32 mdlElement_getDisplayStyle | ( | MSElementCP | pElement | ) |
Query display style linkage on an element.
[in] | pElement | the element to get the transparency of. |
int mdlElement_getEffectiveLineStyle | ( | WCharP | pName, |
int | numChars, | ||
LineStyleParamsP | pParamsOut, | ||
MSElementCP | pElementIn, | ||
DgnModelRefP | modelRef, | ||
void * | pElementPathIn, | ||
int | lsIndexIn | ||
) |
The effective line style of an element is the fully resolved line style; in
other words, the style with which it will be drawn.
. If a line style is by level, mdlElement_getEffectiveLineStyle will extract the line style from the level, extract the level override parameters, and then apply the element override parameters. This is different from mdlElement_getLineStyle which will not extract the level line style.
[out] | pName | name of the line style on this element. |
[out] | numChars | Number of chars in pName. |
[out] | pParamsOut | custom parameters applied to line style on this element. |
[in] | pElementIn | points to element to get lines style for. |
[in] | modelRef | points to the model ref associated with this element. |
[in] | pElementPathIn | points to the element path (currently unused). |
[in] | lsIndexIn | for multi-line elements, this is the index of the line of interest. Valid values are 1 to 19. |
void mdlElement_getEffectiveSymbology | ( | UInt32 * | pColorOut, |
UInt32 * | pWeightOut, | ||
Int32 * | pStyleOut, | ||
LineStyleParamsP | pStyleParamOut, | ||
UInt32 * | pFillColorOut, | ||
MSElementCP | pElementIn, | ||
const DgnModelRefP | pModelRefIn, | ||
void * | pElementPathIn, | ||
int | viewIndexIn | ||
) |
Extracts the effective color, weight, style and fill color from the element.
If the element's color, weight or style is BYLEVEL or BYCELL, then the function will resolve the BYLEVEL/BYCELL symbology to get symbology of the element as displayed on screen. This function also takes in a "viewIndexIn" parameter. This is used to resolve the element's symbology when "level symbology" is turned on for the view represented by "viewIndex".
[out] | pColorOut | color (maybe NULL) |
[out] | pWeightOut | weight (maybe NULL) |
[out] | pStyleOut | style (maybe NULL) |
[out] | pStyleParamOut | style param - set when the element's style is a custom line style (maybe NULL) |
[out] | pFillColorOut | fill color (maybe NULL) |
[in] | pElementIn | element |
[in] | pModelRefIn | element model ref |
[in] | pElementPathIn | element path (currently unused) |
[in] | viewIndexIn | view |
UInt32 mdlElement_getFilePos | ( | int | type, |
DgnModelRefP * | pModelRef | ||
) |
Returns the file position for various elements.
[out] | pModelRef | the modelRef for the file position returned. pModelRef may be NULL. |
[in] | type | indicates the type of file position. Possible values are as follows: type: mdlElement_getFilePos returns FILEPOS_EOF: the current end of file position for the master file. FILEPOS_CURRENT: the file position of the current element FILEPOS_FIRST_ELE: the file position of the first element in the master file. FILEPOS_NEXT_ELE: the file position of the next element after the current element. FILEPOS_WORKING_SET: the file position of the working set, if one is active |
StatusInt mdlElement_getFillColor | ( | UInt32 * | fillColorP, |
MSElementCP | elementP | ||
) |
Gets an element's interior fill color, while
mdlElement_setFillColor sets the existing fill color of an element.
In MicroStation version 5 and later, the interior fill color can differ from the outline color. To check whether the element is filled, set fillColorP to NULL and check the return value. The mdlElmdscr_addFill function sets the fill color to match the outline color.
[in] | elementP | is the element to be queried or whose fill color is to be set. If elementP is not filled, elementP is not modified. |
[out] | fillColorP | is the color index to be assigned to the element. |
Finds the file position for the outermost complex header for the element at the file position specified in the given model.
[in] | filePos | the file position of the component element |
[in] | modelRef | the model containing the component element |
int mdlElement_getLineStyle | ( | WCharP | styleNameP, |
LineStyleParamsP | paramsP, | ||
MSElementCP | elementP, | ||
DgnModelRefP | modelRef, | ||
int | lsIndex | ||
) |
Retrieves the line style information from an element.
[out] | styleNameP | The name of the line style will be copied to the buffer pointed to by styleNameP. Pass NULL for this parameter if you do not want the name to be returned. |
[out] | paramsP | If paramsP is not NULL the parameters extracted from the line style linkage will be copied there. |
[in] | elementP | The elementP parameter is the address of the element from which the line style linkage will be extracted. |
[in] | modelRef | The modelRef parameter must indicate the model the element is from. Pass MASTERFILE for the master file or a valid DgnModelRefP to indicate a different model. |
[in] | lsIndex | line index for multi-line elements. |
int mdlElement_getLock | ( | bool * | pLockFlagOut, |
bool * | pEffectiveLockFlagOut, | ||
DgnModelRefP | modelRefIn, | ||
MSElementCP | pElementIn | ||
) |
Used to get the lock values of the specified element.
[out] | pLockFlagOut | is the element's lock flag value, either true or false. |
[out] | pEffectiveLockFlagOut | indicates whether the element is "effectively" locked. If the lock flag of the level the element resides on is set, the element is effectively locked. |
[in] | modelRefIn | indicates the model that contains the specified element. |
[in] | pElementIn | is the element to query. |
void mdlElement_getProperties | ( | UInt32 * | level, |
UInt32 * | ggNum, | ||
DgnPlatform::DgnElementClass * | elmClass, | ||
bool * | locked, | ||
bool * | newElm, | ||
bool * | modified, | ||
bool * | viewIndepend, | ||
bool * | solidHole, | ||
MSElementCP | pElement | ||
) |
Extracts the level, graphic group number,
class, locked status, new status, modified status, view independence status, and solid-hole status from the element pointed to by element.
This function puts the extracted values in the variables pointed to by level, ggNumber, class, locked, new, modified, viewInd and solidHole. If parameters other than element are NULL, MicroStation does not fill in the value.
[out] | level | level (or NULL) |
[out] | ggNum | graphic group # (or NULL) |
[out] | elmClass | class (or NULL) |
[out] | locked | locked (or NULL) |
[out] | newElm | new element (or NULL) |
[out] | modified | modified (or NULL) |
[out] | viewIndepend | view independent (or NULL) |
[out] | solidHole | solid/hole (or NULL) |
[in] | pElement | element |
Extracts the color, weight and style from the element pointed to by element.
This function puts the extracted values in the variables pointed to by color, weight and style. If parameters other than element are NULL, MicroStation does not fill in the value. If the color, weight and style of the element are by the level (BYLEVEL) or by cell (BYCELL) then the values returned will be equal to the constants: COLOR_BYLEVEL COLOR_BYCELL STYLE_BYLEVEL STYLE_BYCELL WEIGHT_BYLEVEL WEIGHT_BYCELL
[out] | color | color (or NULL) |
[out] | weight | weight (or NULL) |
[out] | style | style (or NULL) |
[in] | el | element |
double mdlElement_getTransparency | ( | MSElementCP | pElement | ) |
Query display transparency linkage on an element.
[in] | pElement | the element to get the transparency of. |
int mdlElement_getType | ( | MSElementCP | el | ) |
Returns the type of the element pointed
to by element.
[in] | el | element |
bool mdlElement_hasLineStyle | ( | MSElementCP | elementP | ) |
Used to test the specified element to
see whether a line style other than one of the standard eight styles (style 0 through 7) has been applied to it.
If the style is applied BYLEVEL, the style is obtained from the level on which the element resides, but the same rule is applied.
[in] | elementP | points to the element to be tested. |
bool mdlElement_isEffectivelyLocked | ( | DgnModelRefP | modelRefIn, |
MSElementCP | pElement | ||
) |
Used to determine whether
the specified element is effectively locked.
An element is "effectively" locked if its lock flag is set, or if the lock flag of the level the element resides on is set.
[in] | modelRefIn | indicates the model that contains the specified element. |
[in] | pElement | is the element to query. |
bool mdlElement_isEffectivelyVisible | ( | MSElementCP | pElementIn, |
const DgnModelRefP | pModelRefIn, | ||
int | viewIndexIn | ||
) |
Check if an element is effectively visible - considers if the level that the element is ON is also visible.
[in] | pElementIn | element |
[in] | pModelRefIn | element model ref |
[in] | viewIndexIn | view |
bool mdlElement_isFilled | ( | MSElementCP | el | ) |
Returns element fill status.
[in] | el | the input element |
bool mdlElement_isVisible | ( | MSElementCP | pElementIn | ) |
Check if an element is visible.
[in] | pElementIn | element |
int mdlElement_offset | ( | MSElementP | out, |
MSElementP | in, | ||
DPoint3dP | offset, | ||
bool | allowSizeChange = false |
||
) |
Moves the element in by the distance given by offset and places the result in out.
in and out can point to the same element. The distance is given in the current coordinate system if one exists.
[out] | out | modified element |
[in] | in | original element |
[in] | offset | distance to transform element |
[in] | allowSizeChange | true if output element points to a full size MSElement to allow output size to be greater than input element size. |
int mdlElement_read | ( | MSElementP | pElement, |
DgnModelRefP | modelRef, | ||
UInt32 | filepos | ||
) |
Reads an element from a design file to the memory
pointed to by element
.
element
should point to an MSElement structure so it is large enough to hold the largest MicroStation element.
[out] | pElement | the buffer to read the element into. |
[in] | modelRef | indicates the model that is the source of the element information. This can be MASTERFILE for the current model, or a DgnModelRefP obtained through a function call. |
[in] | filepos | is the element's file position. |
element
. If modelRef is invalid, the function returns MDLERR_BADFILENUMBER. If filePos points to the end of file, it returns MDLERR_ENDOFFILE. Overwrites an existing MicroStation element with a new element
pointed to by newElem at file position filePos.
[in] | newElem | the new state of the element to be written to the file |
[in] | oldElem | this parameter is ignored, and is only included for pre-V8 compatibility. MicroStation always checks against existing element in cache. |
[in] | filePos | the filepos within the master file for this element. |
All write-to-file asynchs will be called with a copy of the element, so it is possible that the element actually written to the file may differ from the one passed in.
StatusInt mdlElement_setDisplayStyle | ( | MSElementP | pElement, |
Int32 | styleIndex | ||
) |
Add display style linkage to an element.
[in] | pElement | the element to add display style linkage to. |
[in] | styleIndex | the display value to set. (-1 to set no display style). |
int mdlElement_setFilePos | ( | int | type, |
DgnModelRefP | modelRef, | ||
UInt32 | position | ||
) |
Sets the file position for various elements.
[in] | position | is the file position to be set and modelRef is a DgnModelRefP indicating the model for that file position. If you do not want to change the model reference, pass -1 for modelRef. |
[in] | type | indicates the type of file position to be set. Possible values are as follows: type: mdlElement_setFilePos sets FILEPOS_CURRENT: the file position of the current element. FILEPOS_NEXT_ELE: the file position of the next element. (Eliminated in V8) FILEPOS_WORKING_WINDOW: the file position of the working window. |
[in] | modelRef | model |
StatusInt mdlElement_setFillColor | ( | MSElementP | elementP, |
UInt32 | fillColor | ||
) |
Sets an element's interior fill color, while mdlElement_getFillColor queries the existing fill color of an element.
In MicroStation version 5 and later, the interior fill color can differ from the outline color. To check whether the element is filled, set fillColorP to NULL and check the return value.The mdlElmdscr_addFill function sets the fill color to match the outline color.
[in,out] | elementP | is the element to be queried or whose fill color is to be set. If elementP is not filled, elementP is not modified. |
[in] | fillColor | is the color index to be assigned to the element. |
int mdlElement_setLineStyle | ( | MSElementP | pElement, |
DgnModelRefP | modelRef, | ||
int | lsIndex, | ||
WCharCP | styleNameP, | ||
LineStyleParamsP | paramsP | ||
) |
Sets the line style of the element pointed to by elementP to the new MicroStation line style defined by pStyleName and pParams.
Setting the element line style involves creating a line style attribute linkage and attaching it to the element. The element must be small enough to accommodate the new line style linkage and the buffer pointed to by pElement must be large enough to accommodate the new linkage.
[out] | pElement | contains the address of the element to be modified. |
[in] | modelRef | indicates which model the element is to be placed in. This can be set to MASTERFILE to indicate the active model. |
[in] | lsIndex | If pElement is a multi-line element it can contain up to nineteen different line styles; one for each of the sixteen possible profile lines, one for each end cap, and one for all joint lines. A value of 0 for lsIndex indicates the default line style used for all components that do not specify overrides. Values from 1 - 16 indicate the corresponding profile lines 1 - 16 (or 0 - 15 zero based). A value of 17 indicates the origin cap, 18 indicates the end cap and 19 indicates the line style used for joint lines. |
[in] | styleNameP | specifies the name of the line style that will be attached to the element pElement. This may not be NULL. |
[in] | paramsP | If paramsP is not NULL the parameters will be used for the element. If paramsP is NULL, the active parameters will be used. |
void mdlElement_setProperties | ( | MSElementP | el, |
UInt32 const * | level, | ||
UInt32 const * | ggNum, | ||
DgnPlatform::DgnElementClass const * | elementClass, | ||
bool const * | locked, | ||
bool const * | newElm, | ||
bool const * | modified, | ||
bool const * | viewIndepend, | ||
bool const * | solidHole | ||
) |
Changes the level, graphic group number, class, locked status, new status,
modified status, view independence status, and solid-hole status in the element pointed to by element.
This function changes these values to the values pointed to by level, ggNum, elementClass, locked, newElm, modified, viewIndpend and solidHole. If parameters other than element are NULL, MicroStation does not change the value in element.
[in,out] | el | element to set properties on |
[in] | level | level (or NULL) |
[in] | ggNum | graphic group # (or NULL) |
[in] | elementClass | class (or NULL) |
[in] | locked | locked (or NULL) |
[in] | newElm | new element (or NULL) |
[in] | modified | modified (or NULL) |
[in] | viewIndepend | view independent (or NULL) |
[in] | solidHole | solid/hole (or NULL) |
void mdlElement_setSymbology | ( | MSElementP | el, |
UInt32 const * | color, | ||
UInt32 const * | weight, | ||
Int32 const * | style | ||
) |
Changes the color, weight, and
style in the element pointed to by element to the values pointed to by color, weight and style.
If parameters other than el
are NULL, MicroStation does not change the value in element.
[in,out] | el | element |
[in] | color | color (or NULL) |
[in] | weight | weight (or NULL) |
[in] | style | style (or NULL) |
StatusInt mdlElement_setTransparency | ( | MSElementP | pElement, |
double | transparency | ||
) |
Add display transparency linkage to an element.
[in] | pElement | the element to add transparency linkage to. |
[in] | transparency | the transparency value to set. |
void mdlElement_stripAttributes | ( | MSElementP | out, |
MSElementP | in | ||
) |
Strips attribute information from the
input element in and puts the result in out.
in and out can point to the same element.
[out] | out | element with all attributes removed |
[in] | in | element with attributes |
int mdlElement_stroke | ( | DPoint3dP * | points, |
int * | nPoints, | ||
MSElementP | el, | ||
double | tol | ||
) |
Strokes the element pointed to by <code>el</code> into
vectors in an array pointed to by points
.
This array should be the address of a pointer to a DPoint3d structure. MicroStation allocates the memory for the vectors and returns the starting address in points. The application programmer frees this memory when it is no longer needed. The number of points in the array is returned in numPoints.
[out] | points | point array allocation |
[out] | nPoints | number of points in points |
[in] | el | element to be stroked |
[in] | tol | is the maximum distance in UORs between the actual curve and the approximating vectors for curved elements. |
int mdlElement_transform | ( | MSElementP | out, |
MSElementP | in, | ||
TransformP | transform, | ||
bool | allowSizeChange = false |
||
) |
Transforms an element by the supplied transformation matrix and places the result in out.
in and out can point to the same element. The transformation matrix relates to the current coordinate system if one exists.
[out] | out | transformed element |
[in] | in | original element |
[in] | transform | transformation matrix |
[in] | allowSizeChange | true if output element points to a full size MSElement to allow output size to be greater than input element size. |
StatusInt mdlElement_undoableDelete | ( | MSElementP | pElement, |
UInt32 | filePos, | ||
bool | display | ||
) |
Deletes the element pointed to by
element at file position filePos.
MicroStation needs the element to save in the undo buffer. If you do not have a copy of the element when you want to delete it, pass NULL for element and MicroStation will reread the element from the file. This process adds overhead to mdlElement_undoableDelete, so always pass the element if it is known.
[in] | pElement | element to delete (or NULL) |
[in] | filePos | filepos of element |
[in] | display | true = erase from screen |
bool mdlElementRef_checkLevelLock | ( | ElementRefP | elemRef, |
DgnModelRefP | modelRef | ||
) |
Determine whether an ElementRefP is on a level that is not the active level while the Level Lock is active.
[in] | elemRef | elementRef to test |
[in] | modelRef | indicates the model that contains the specified element. |
bool mdlElementRef_isEffectivelyLocked | ( | DgnModelRefP | modelRef, |
ElementRefP | elemRef, | ||
bool | checkChildren | ||
) |
Determine whether an ElementRefP is effectively locked.
An element is "effectively" locked if its lock flag is set, or if the lock flag of the level the element resides on is set. Optionally, this function will check to see whether any child elements of the ElementRefP are effectively locked.
[in] | modelRef | indicates the model that contains the specified element. |
[in] | elemRef | elementRef to test |
[in] | checkChildren | if true, return true if ANY child of this elementRef is effectively locked. |
bool mdlElementRef_isLocked | ( | DgnModelRefP | modelRef, |
ElementRefP | elemRef, | ||
bool | checkChildren | ||
) |
Determine whether an ElementRefP or (optionally) any of it's children, has it's lock bit set.
[in] | modelRef | indicates the model that contains the specified element. |
[in] | elemRef | elementRef to test |
[in] | checkChildren | if true, return true if ANY child of this elementRef is locked. |
void mdlElmdscr_getProperties | ( | DgnPlatform::LevelId * | level, |
UInt32 * | ggNum, | ||
DgnPlatform::DgnElementClass * | dgnClass, | ||
bool * | locked, | ||
bool * | newElm, | ||
bool * | modified, | ||
bool * | viewIndepend, | ||
bool * | solidHole, | ||
MSElementDescrCP | edP | ||
) |
Queries the level, element class, graphic group, and other properties of the element desciptor pointed to by edP.
Pass NULL for parameters you are not interested in.
[out] | level | level (or NULL) |
[out] | ggNum | graphic group # (or NULL) |
[out] | dgnClass | class (or NULL) |
[out] | locked | locked (or NULL) |
[out] | newElm | new element (or NULL) |
[out] | modified | modified (or NULL) |
[out] | viewIndepend | view independent (or NULL) |
[out] | solidHole | solid/hole (or NULL) |
[in] | edP | element |
StatusInt mdlElmdscr_setDisplayPriority | ( | MSElementDescrH | edPP, |
Int32 | priority | ||
) |
Set display priority of an element descriptor.
[in] | edPP | the element descriptor to set the display priority of. |
[in] | priority | the priority value to set. |
StatusInt mdlElmdscr_setTransparency | ( | MSElementDescrH | edPP, |
double | transparency | ||
) |
Add display transparency an element descriptor.
[in] | edPP | the element descriptor to add transparency linkages to. |
[in] | transparency | the transparency value to set. |