#include "mdl.h"
#include "mselems.h"
#include "mstypes.h"
#include "global.h"
#include <DgnPlatform\DgnFileIO\MSElementDescr.h>
#include <DgnPlatform\ElementCopyContext.h>
Functions | |
UInt32 | mdlElmdscr_getFilePos (MSElementDescrCP elDscrP) |
Used to get the position of the element contained in the specified element descriptor. More... | |
bool | mdlElmdscr_isPersistent (MSElementDescrCP elDscr) |
Used to determine whether the element contained in the specified element descriptor is persistent. More... | |
void | mdlElmdscr_clearPersistentInfo (MSElementDescrP elDscrP) |
Clear persistent info on this element descriptor. More... | |
int | mdlElmdscr_replaceElement (MSElementDescrH existingDescrPP, MSElementCP elementP) |
Allocates a new element descriptor from an existing MicroStation element, element. More... | |
int | mdlElmdscr_insertElement (MSElementDescrP existingElementP, MSElementP elementP) |
Allocates a new element descriptor from an existing MicroStation element, element. More... | |
void | mdlElmdscr_initOrAddToChain (MSElementDescrH edPP, MSElementDescrP newElem) |
Adds the element descriptor chain pointed to by newElem to the end of the element descriptor pointed to by *edPP if *edPP is non-NULL and simply sets *edPP to newElem if *edPP is NULL in a similar manner to mdlElmdscr_addToChain. More... | |
void | mdlElmdscr_addToChain (MSElementDescrP chainDscrP, MSElementDescrP newElem) |
Adds the element descriptor chain pointed to by newElem to the end of the element descriptor pointed to by chainDscrP. More... | |
void | mdlElmdscr_replaceDscr (MSElementDescrH existingDescrPP, MSElementDescrP newDscrP) |
Replaces the element descriptor pointed to by the existingDescrPP parameter with the new element descriptor pointed to by newDescrP. More... | |
void | mdlElmdscr_freeAll (MSElementDescrH elemDescrPP) |
Frees all memory allocated for the element descriptor chain pointed to by elmDscrPP. More... | |
int | mdlElmdscr_new (MSElementDescrH elDescrPP, MSElementDescrP elemHeader, MSElementCP element) |
Allocates a new element descriptor from an existing MicroStation element, element. More... | |
MSElementDescrP | mdlElmdscr_removeElement (MSElementDescrP elemDescr) |
Removes an element from an element descriptor chain. More... | |
MSElementDescrP | mdlElmdscr_appendElement (MSElementDescrP existingElmDscrP, MSElementCP element) |
Allocates a new element descriptor from an existing MicroStation element. More... | |
int | mdlElmdscr_appendDscr (MSElementDescrP existingElmDscrP, MSElementDescrP newDscr) |
Adds the element descriptor chain pointed to by newDscr to the end of the element descriptor pointed to by existingElmDscrP. More... | |
int | mdlElmdscr_duplicate (MSElementDescrP *newDscr, MSElementDescrCP oldDscr) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor. More... | |
int | mdlElmdscr_duplicateEx (MSElementDescrP *newDscrP, MSElementDescrCP oldDscr, bool copyScheduledXaChanges=true, bool loadPersistentXasAsChanges=true) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor. More... | |
int | mdlElmdscr_duplicateSingle (MSElementDescrH newDscrPP, MSElementDescrCP oldDscr) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor. More... | |
int | mdlElmdscr_duplicateSingleEx (MSElementDescrH newDscrPP, MSElementDescrCP oldDscr, bool copyScheduledXaChanges, bool loadPersistentXasAsChanges) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor. More... | |
void | mdlElmdscr_validate (MSElementDescrP p, DgnModelRefP modelRef) |
Sets the information in the complex header elements contained in elmDscrP based on the component elements in the descriptor. More... | |
StatusInt | mdlElmdscr_copyXAttributes (MSElementDescrP toElDscr, MSElementDescrCP frElDscr, bool copyChildXAttributes) |
Copies the XAttributes of frElDscr to toElDscr. More... | |
UInt32 | mdlElmdscr_add (MSElementDescrP elemDescr) |
Adds the new element(s) contained in the element descriptor pointed to by elemDescr to the design file. More... | |
int | mdlElmdscr_addFill (MSElementDescrH edPP) |
Adds an attribute linkage to a closed element that causes the element to be displayed filled. More... | |
void | mdlElmdscr_initOrAddToChainWithTail (MSElementDescrH ppHeadDescr, MSElementDescrH ppTailDescr, MSElementDescrP pDescr) |
Append a descriptor to a growing chain, maintaining both head and tail pointers within the chain so that subsequent calls can access the tail directly without walking the chain. More... | |
int | mdlElmdscr_assembleChains (MSElementDescrH edPP, double closureTolerance, DgnModelRefP modelRef) |
Takes an unconnected, unordered chain of open elements (line, arc, * linestring, curve etc.) and combines them into complex chains or shapes if their endpoints are within closureTolerance of each other. More... | |
UInt32 | mdlElmdscr_append (MSElementDescrP elemDescrP) |
Adds the modified element(s) contained in the element descriptor pointed to by elemDscr to the design file. More... | |
StatusInt | mdlElmdscr_appendByModelRef (MSElementDescrP elemDescr, DgnModelRefP modelRef) |
This function is identical to @ref mdlElmdscr_append except for the addition of a modelRef argument that allows elements to be appended to models other than the active model. More... | |
void | mdlElmdscr_appendAttributes (MSElementDescrH elDscrPP, int length, UInt16 *attributes) |
Appends the attribute information contained in the attributes buffer to the end of any existing attributes attached to the elements in the descriptor elDscr. More... | |
int | mdlElmdscr_convertTo2D (MSElementDescrH newDscrPP, MSElementDescrP oldDscrP, int view, TransformP transP, DgnModelRefP sourceModelRef, DgnModelRefP destModelRef, bool preserveZRange) |
Converts the 3D element descriptor pointed to by oldDscrP to a 2D element descriptor. More... | |
int | mdlElmdscr_convertTo3D (MSElementDescrH newDscrPP, MSElementDescrP oldDscrP, int eType, double elevation, TransformP transP, DgnModelRefP sourceModelRef, DgnModelRefP destModelRef) |
Converts the 2D element descriptor pointed to by oldDscrP to a 3D element descriptor. More... | |
int | mdlElmdscr_copyParallel (MSElementDescrH outDscrPP, MSElementDescrP inDscr, Dpoint3d *point, double distance, Dpoint3d *normal) |
Creates a copy of the element descriptor outDscr specified by inDscr that is offset parallel from the original element. More... | |
int | mdlElmdscr_signedOffset (MSElementDescrH outDscrPP, MSElementDescrCP curveDescrP, double distance, DVec3dP normal) |
Creates an offset of a curve element. More... | |
void | mdlElmdscr_display (MSElementDescrCP elemDescr, DgnModelRefP modelRef, int drawMode) |
Displays the element descriptor pointed to by elemDscrP in all active views. More... | |
void | mdlElmdscr_displayAllReferences (MSElementDescrP elemDescr, int drawMode, DgnModelRefP activeModel, int viewMask) |
Displays the element descriptor pointed to by elemDscrP in the views specified by viewMask if the descriptors modelRef can be reached from the root modelRef of the view. More... | |
void | mdlElmdscr_displayInView (MSElementDescrP edP, DgnModelRefP modelRef, DgnPlatform::DgnDrawMode drawMode, MSWindow *gwP) |
Used to display the contents of the specified element descriptor in the specified view window using the given drawing mode. More... | |
void | mdlElmdscr_displaySingle (MSElementDescrP elemDescr, DgnModelRefP modelRef, int drawMode) |
This function is identical to mdlElmdscr_display except that it displays a single element descriptor and will not display the elements pointed to by elemDescr->next. More... | |
int | mdlElmdscr_displayFromFile (UInt32 filePos, DgnModelRefP modelRef, MSElementP el, int drawMode) |
This function is similar to mdlElmDscr_display, but operates on elements in the design file rather than from an element descriptor supplied by the application. More... | |
int | mdlElmdscr_displayToWindow (MSWindow *windowP, BSIRect const *rectP, DgnPlatform::ViewFlags const *viewFlags, MSElementDescrCP elmDP, RotMatrixCP rotMatrixP, Dpoint3d const *originP, Dpoint3d const *rangeP, int threeD, int menuColor) |
Used to display the graphics element designated by edP in the window designated by windowP. More... | |
int | mdlElmdscr_extendedDisplayToWindow (MSWindow *windowP, BSIRect const *rectP, DgnPlatform::ViewFlags const *viewFlags, MSElementDescrCP elmDP, RotMatrixCP rotMatrixP, Dpoint3d const *originP, Dpoint3d const *rangeP, int threeD, int menuColor, void const *colormap, bool clearFirst, byte const *backgroundImageP) |
Provides some extensions to the mdlElmdscr_displayToWindow function that allow the display of rendered images within a window. More... | |
int | mdlElmdscr_distanceAtPoint (double *distance, Dpoint3d *position, Dpoint3d *tangent, MSElementDescrP edP, Dpoint3d *inputPoint, double inputTolerance) |
Returns the distance along an element from the beginning of the element to the projection of inputPoint on the element. More... | |
void | mdlElmdscr_extractAttributes (int *length, UInt16 *attributes, MSElementDescrP elDscr) |
Extracts the attribute information from the first element contained in the element descriptor elmdscrP. More... | |
int | mdlElmdscr_extractNormal (Dpoint3d *normal, Dpoint3d *point, MSElementDescrCP edP, Dpoint3d *inputDefaultNormal) |
Used to find the normal vector of an element, using the incredibly coarse classic IGDS/Microstation tolerance of 100 UORS. More... | |
int | mdlElmdscr_extractNormalTight (Dpoint3d *normal, Dpoint3d *point, MSElementDescrCP edP, Dpoint3d *inputDefaultNormal) |
Used to find the normal vector of an element, with tight tolerance for planarity test. More... | |
int | mdlElmdscr_extractNormalWithTolerance (Dpoint3d *normal, Dpoint3d *point, MSElementDescrCP edP, Dpoint3d *inputDefaultNormal, double absTol, double localRelTol, double globalRelTol) |
Used to find the normal vector of an element, with user-defined tolerance for planarity test. More... | |
StatusInt | mdlElmdscr_evaluateCurveSpace (MSElementDescrCP pDescr, DPoint3dP pOrigin, RotMatrixP pMatrix, int *pTangentDimensions) |
Determine the dimensionality of a curve – line, plane, or space. More... | |
StatusInt | mdlElmdscr_orientationExt (TransformP pTransform, MSElementDescrCP pSourceDescr, DgnModelRefP modelRef) |
return a natural coordinate frame for the element. More... | |
int | mdlElmdscr_operation (MSElementDescrP elemDescr, PFElemOperation elemFunc, CallbackArgP params, int opFlags) |
Sets a user call-back function to recursively iterate through all component elements in a complex element descriptor. More... | |
int | mdlElmdscr_partialDelete (MSElementDescrH outEdPP1, MSElementDescrH outEdPP2, MSElementDescrP inEdP, Dpoint3d *point1, Dpoint3d *point2, Dpoint3d *point3, int view) |
Returns the portions of inEdP that are not between the projection of point1 and point3 on the element. More... | |
int | mdlElmdscr_pointAtDistance (Dpoint3d *position, Dpoint3d *tangent, double inputDistance, MSElementDescrP edP, double inputTolerance) |
Returns the point and tangent vector at distance along the element. More... | |
UInt32 | mdlElmdscr_read (MSElementDescrH elemDescrPP, UInt32 filePos, DgnModelRefP modelRef, int expandSharedCells, UInt32 *readFilePos) |
Reads the element at the position filePos from the element cache for model modelRef and creates a new element descriptor. More... | |
UInt32 | mdlElmdscr_getByElemRef (MSElementDescrH elemDescrPP, ElementRefP elemRef, DgnModelRefP modelRef, int expandSharedCells, UInt32 *readFilePos) |
Get an element descriptor given an ElementRefP. More... | |
MSElementDescrP | mdlElmdscr_getThicknessEdP (MSElementDescrP edP, DgnModelRefP modelRef) |
Get a surface or solid element that represents a planar element with thickness. More... | |
UInt32 | mdlElmdscr_readToMaster (MSElementDescrH elemDescrPP, UInt32 filePos, DgnModelRefP modelRef, int expandSharedCells, UInt32 *startFilePos) |
Reads the element at the position filePos from the element cache for model modelRef and creates a new element descriptor. More... | |
UInt32 | mdlElmdscr_readComponentToMaster (MSElementDescrH edPP, DisplayPathCP pathP, int elementNumber, int expandSharedCells, bool returnNonCellHeader, bool allowGroupHoles, UInt32 *startFilePosP) |
Used to read an element from the specified design file and add it to the master design file. More... | |
UInt32 | mdlElmdscr_rewrite (MSElementDescrP newElemDscr, MSElementDescrP oldElemDscr, UInt32 filePos) |
Overwrites the existing MicroStation element(s) pointed to by oldElemDscrP with the new element(s) pointed to by newElemDscrP at file position filePos. More... | |
void | mdlElmdscr_stripAttributes (MSElementDescrH elDscrPP) |
Removes all of the attribute data on the elements contained in descriptor elmdscrPP. More... | |
int | mdlElmdscr_stripFill (MSElementDescrH edPP) |
Removes the fill attribute linkage from an element. More... | |
int | mdlElmdscr_stroke (Dpoint3d **points, int *nPoints, MSElementDescrP edP, double tol) |
Strokes the element descriptor pointed to by elmDscrP into vectors in an array pointed to by points. More... | |
int | mdlElmdscr_transform (MSElementDescrH edPP, TransformCP userTrans) |
Transforms the element descriptor by the supplied transformation matrix. More... | |
void | mdlElmdscr_transformAllowModification (MSElementDescrH edPP, TransformCP userTrans, DgnModelRefP sourceModelRef, DgnModelRefP destModelRef, const UInt32 options) |
Transforms the element descriptor by the supplied transformation matrix. More... | |
int | mdlElmdscr_undoableDelete (MSElementDescrP elemDescrP, UInt32 filePos, bool display) |
Deletes the element(s) pointed to by elemDscrP at file position filePos. More... | |
int | mdlElmdscr_deleteByModelRef (MSElementDescrP elemDescr, UInt32 filePos, DgnModelRefP modelRef, bool display) |
Deletes the element(s) pointed to by elemDscrP at file position filePos in the model specified by modelRef. More... | |
int | mdlElmdscr_displayFromFileViews (UInt32 filePos, DgnModelRefP modelRef, MSElementP elP, int drawMode, int viewMask) |
This function is identical to mdlElmdscr_displayFromFile, except that the viewMask argument determines the views in which element descriptor is displayed (see mdlElement_displayInSelectedViews for a discussion of viewMask). More... | |
void | mdlElmdscr_displayInSelectedViews (MSElementDescrCP elemDescr, DgnModelRefP modelRef, int drawMode, int viewMask) |
This function is identical to mdlElmdscr_display, except that the viewMask argument determines the views in which element descriptor is displayed (see mdlElement_displayInSelectedViews for a discussion of viewMask). More... | |
int | mdlElmdscr_generatePartial (MSElementDescrH outEdPP, MSElementDescrCP elmDescrP, double t1, double t2, bool splineParameters) |
Generates the portion of the element descriptor elmDescr that is between t1 and t2 and returns this portion in outEdPP. More... | |
int | mdlElmdscr_reverse (MSElementDescrH outEdPP, MSElementDescrCP inEdP, DgnModelRefP modelRef) |
Reverses the direction of inEdP and returns the reversed element in outEdPP. More... | |
int | mdlElmdscr_reverseNormal (MSElementDescrH outEdPP, MSElementDescrCP inEdP, DgnModelRefP modelRef) |
Reverses the normal direction for a surface, solid or closed element. More... | |
int | mdlElmdscr_unionShapes (MSElementDescrH edPP, MSElementDescrH obsoleteEdPP, MSElementDescrP shape1, MSElementDescrP shape2, double tol) |
Constructs a single complex shape or series of complex shapes that enclose the area represented by the union of the two input elements. More... | |
int | mdlElmdscr_intersectShapes (MSElementDescrH edPP, MSElementDescrH obsoleteEdPP, MSElementDescrP shape1, MSElementDescrP shape2, double tol) |
Constructs a single complex shape or series of complex shapes that enclose the area represented by the intersection of the two input elements. More... | |
int | mdlElmdscr_differenceShapes (MSElementDescrH edPP, MSElementDescrH obsoleteEdPP, MSElementDescrP minuend, MSElementDescrP subtrahend, double tol) |
Constructs a single complex shape or series of complex shapes that enclose the area represented by the difference between the two input elements. More... | |
int | mdlElmdscr_extractEndPoints (DPoint3dP startP, DPoint3dP startTangentP, DPoint3dP endP, DPoint3dP endTangentP, MSElementDescrCP edP, DgnModelRefP modelRef) |
Returns the start and end points (in start and end) for the open element, edP. More... | |
int | mdlElmdscr_fromCompoundElement (MSElementDescrH edPP, MSElementP elemP, DgnModelRefP modelRef, UInt32 graphicGroup, bool transformToWorld, bool expandNested) |
Converts a compound element (multi-line, dimension, shared cell) to a set of simple (pre-MicroStation 4.0 compatible) elements. More... | |
bool | mdlElmdscr_isClosed (MSElementDescrCP edP) |
Queries if an element descriptor is a closed element; i.e., a shape, complex shape, ellipse or closed B-spline curve. More... | |
bool | mdlElmdscr_isOpen (MSElementDescrCP edP) |
Queries if an element descriptor is an open element; i.e., a line, line string, curve, open B-Spline curve or complex chain. More... | |
bool | mdlElmdscr_isGroupedHole (MSElementDescrCP groupEdP) |
Queries if an element descriptor is a grouped hole element; i.e., an element that has a hole punched in it (such as can be created with mdlElmdscr_createShapeWithHoles). More... | |
bool | mdlElmdscr_hasLineStyle (MSElementDescrCP lineStyleEdP) |
Queries if an element descriptor has line style. More... | |
int | mdlElmdscr_createShapeWithHoles (MSElementDescrH outEdPP, MSElementDescrP solidEdP, MSElementDescrP holeEdP) |
Creates an orphan cell entity, outEdPP, that associates the solid element, solidEdP with the hole entity(s) in holeEdP. More... | |
int | mdlElmdscr_close (MSElementDescrH outEdPP, MSElementDescrP inEdP, DgnModelRefP modelRef) |
Converts the open element inEdP to a closed element, outEdPP. More... | |
int | mdlElmdscr_open (MSElementDescrH outEdPP, MSElementDescrP inEdP, DgnModelRefP modelRef) |
Converts the closed element inEdP to an open element, outEdPP. More... | |
int | mdlElmdscr_show (MSElementDescrP edP, WCharCP currentIndent) |
Used to print information from the element descriptor header in a formatted fashion. More... | |
int | mdlElmdscr_fromSelectionSet (MSElementDescrH edPP) |
Used to create an element descriptor chain from the set of elements that are currently in the selection set. More... | |
int | mdlElmdscr_fillet (MSElementP fillet, MSElementP pTemplate, MSElementDescrP in0EdP, MSElementDescrP in1EdP, double inputRadius, Dpoint3d *inputPoint, RotMatrixP inputRotMatrix) |
Used to create a two dimensional circular fillet between the specified elements. More... | |
int | mdlElmdscr_spaceFillet (MSElementDescrH ppFilletChain, MSElementP pTemplate, MSElementDescrCP pCurveA, MSElementDescrCP pCurveB, double radius, DPoint3dP pCenterSelect) |
Compute circular arc fillets between two elements. 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... | |
void | mdlElmdscr_setProperties (MSElementDescrH edPP, DgnPlatform::LevelId 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, element class, graphic group, and other properties in the element desciptor pointed to by edPP to the values specified. More... | |
void | mdlElmdscr_setSymbology (MSElementDescrH edPP, UInt32 *color, Int32 *style, UInt32 *weight, UInt32 *fillColor) |
Changes the color, weight, and style in the element desciptor pointed to by edPP to the values specified. More... | |
int | mdlElmdscr_createFromVertices (MSElementDescrH edPP, MSElementP templateElmP, Dpoint3d *pointP, size_t numPoints, bool closed, int fillMode) |
Creates a line string or complex chain if closed is zero and a shape or complex shape if closed is non-zero. More... | |
MSElementDescrP | mdlElmdscr_findElementId (MSElementDescrP edP, DgnPlatform::ElementId reqId) |
Get a pointer to the component element descriptor having the specified ElementId in the supplied complex element descriptor. More... | |
MSElementDescrP | mdlElmdscr_atOffset (MSElementDescrP edP, int offset, DgnModelRefP modelRef) |
Used to get the element descriptor at the specified offset from the start of an element descriptor chain. More... | |
UInt32 | mdlElmdscr_componentOffset (MSElementDescrP headerEdP, MSElementDescrP componentEdP, DgnModelRefP modelRef) |
Used to get the offset value of a component element in the specified element descriptor chain. More... | |
int | mdlElmdscr_fromCone (MSElementDescrH edPP, MSElementP coneP, TransformP transP) |
Used to create an element descriptor chain from the specified cone element. More... | |
int | mdlElmdscr_close2 (MSElementDescrH outEdPP, MSElementDescrP inEdP, DgnModelRefP modelRef) |
Used to create a closed element from an element that is not closed. More... | |
int | mdlElmdscr_extractNormal2 (Dpoint3d *normalP, Dpoint3d *pointP, MSElementDescrP edP, Dpoint3d *inputDefaultNormal, bool applyCurrTrans, bool cleanupNormal) |
Used to find the normal vector of an element. More... | |
int | mdlElmdscr_isSphere (double *radiusP, Dpoint3d *centerP, RotMatrixP rotMatrixP, MSElementDescrP edP) |
Used to determine whether the specified element is spherical. More... | |
int | mdlElmdscr_extractCellTMatrix (TransformP forwardP, TransformP inverseP, MSElementP cellP, DgnModelRefP modelRef) |
Used to get a transformation matrix from a cell element. More... | |
StatusInt | mdlElmdscr_simplifyComplexChainOrShape (MSElementDescrH edPP, DgnModelRefP modelRef) |
Used to simplify a complex element, if possible, by concatenating consecutive linear segments into linestrings. More... | |
bool | mdlElmdscr_isRule (MSElementDescrCP edP) |
Used to determine whether the specified element descriptor contains an element of either the DgnElementClass::PrimaryRule or the DgnElementClass::ConstructionRule. More... | |
UInt32 | mdlElmdscr_rewriteByModelRef (MSElementDescrP newEdP, MSElementDescrP oldEdP, UInt32 filePosition, DgnModelRefP modelRef) |
Replaces the specified element descriptor in the given file position, with a new element descriptor from the given modelRef. More... | |
UInt32 | mdlElmdscr_addByModelRef (MSElementDescrP edP, DgnModelRefP modelRef) |
This function is identical to mdlElmdscr_add except for the addition of a modelRef argument that allows elements to be added to models other than the active model. More... | |
int | mdlElmdscr_numElementsSingle (MSElementDescrCP edP) |
Used to find the number of child elements within an element descriptor chain. More... | |
void | mdlElmdscr_setVisible (MSElementDescrP edP, bool visible) |
Used to set the visibility flag of the contents of the specified element descriptor. More... | |
bool | mdlElmdscr_isAssociativeRegionChild (MSElementDescrH regionEdPP, MSElementDescrP edP) |
Used to determine whether the element contained by the specified element descriptor is a child element of an associative region. More... | |
bool | mdlElmdscr_isAssociativeRegion (MSElementDescrCP edP) |
Used to determine whether the specified element descriptor contains an element that is an associative region. More... | |
StatusInt | mdlElmdscr_addClip (MSElementDescrH ppElementDescr, RotMatrixP pRMatrix, DPoint3dP pOrigin, bool frontClipOn, double zFront, bool backClipOn, double zBack, UInt32 nPoints, DPoint2d *pPoints) |
Used to add a clip boundary linkage to the specified element. More... | |
StatusInt | mdlElmdscr_deleteClip (MSElementDescrH ppElementDescr) |
Used to remove any clip boundary linkage from the specified element. More... | |
void | mdlElmdscr_computeRange (Dpoint3d *minP, Dpoint3d *maxP, MSElementDescrCP edP, RotMatrixCP rotMatrixP) |
Computes the range of the element(s) in the specified element descriptor. More... | |
int | mdlElmdscr_getUsedLevels (BitMaskP pBitMaskOut, MSElementDescrP pElemDscrIn) |
Get a bit-mask which represents the set of the levels used by an element. More... | |
bool | mdlElmdscr_areTwoIdentical (MSElementDescrP edP1, MSElementDescrP edP2) |
Returns whether two element descriptors are exactly identical. More... | |
bool | mdlElmdscr_areIdenticalToTolerance (MSElementDescrCP edP1, MSElementDescrCP edP2, UInt32 comparisonFlags, double distanceTolerance, double directionTolerance) |
Returns whether two element descriptors are identical to a given tolerance and optionally ignoring certain characteristics. More... | |
int | mdlElmdscr_copy (MSElementDescrH elDscrPP, DgnModelRefP sourceModelRef, DgnModelRefP destModelRef, ElementCopyContextP copyContextP) |
Copies an element descriptor and adds it to the destination. More... | |
void | mdlCopyContext_setView (ElementCopyContextP ccP, int view) |
Sets the view that will be used to flatten the elements if the source model is 3D and the destination model is 2D. More... | |
ElementCopyContextP | mdlCopyContext_create (void) |
Used to allocate memory for and create a copy context structure. More... | |
void | mdlCopyContext_free (ElementCopyContextP *ccP) |
Used to dispose of a copy context structure and all of its related data after it has been used. More... | |
void | mdlCopyContext_setViewport (ElementCopyContextP ccP, ViewportP vp) |
Sets the view that will be used to flatten the elements if the source model is 3D and the destination model is 2D. More... | |
void | mdlCopyContext_setNewGGs (ElementCopyContextP ccP, bool assignNewGGs) |
Defines whether copied elements should maintain their current graphic group or should be assigned to a new group. More... | |
void | mdlCopyContext_setNewNodes (ElementCopyContextP ccP, bool assignNewNodes) |
Defines whether copied elements should maintain their current text node numbers or should be assigned a new number. More... | |
void | mdlCopyContext_setScaleToDestination (ElementCopyContextP ccP, bool transformToDestination) |
Defines whether copied elements should be scaled to match the units in the destination model. More... | |
void | mdlCopyContext_setModelFromElmdscr (ElementCopyContextP ccP, bool useElmdscr) |
Set the copy context so that the model ref from the element descriptor is used as the source model ref for the copy, unless it is NULL in which case the source model ref is used. More... | |
void | mdlCopyContext_setMatchDimToDestination (ElementCopyContextP ccP, bool changeDimension) |
Setting this option to false in the copy context will cause the element descriptor passed in not to take on the dimensionality (2D/3D) of the destination model ref. More... | |
void | mdlCopyContext_setWriteElements (ElementCopyContextP ccP, bool writeAllElements) |
Set the copy context value that determines whether the element descriptor passed to mdlElmdscr_copy will get written to the destination model ref. More... | |
void | mdlCopyContext_setLevelHandling (ElementCopyContextP ccP, DgnPlatform::CopyContextLevelOption levelOption) |
Determine the way in which levels are brought from the source model ref to the destination model ref. More... | |
void | mdlCopyContext_setRedirectInternalRefs (ElementCopyContextP ccP, bool redirectRefs) |
Set the copy context value that determines how to handle internal reference attachments. More... | |
void | mdlCopyContext_setRedirectExternalRefs (ElementCopyContextP ccP, bool redirectRefs) |
Set the copy context value that determines how to handle external reference attachments. More... | |
#define __mselmdscFDF__ |
#define COMPAREOPT_IGNORE_2D_RANGEZ (1<<10) |
#define COMPAREOPT_IGNORE_2D_ZRANGE (1<<15) |
#define COMPAREOPT_IGNORE_ATTRIBUTE_VALUE (1<<6) |
#define COMPAREOPT_IGNORE_CELL_HEADER_ELM (1<<21) |
#define COMPAREOPT_IGNORE_CELL_RANGEDIAG (1<<8) |
#define COMPAREOPT_IGNORE_CELL_TRANSFORM (1<<16) |
#define COMPAREOPT_IGNORE_DGNDWGTEXTDIFFERENCES (1<<9) |
#define COMPAREOPT_IGNORE_DGNSTORE (1<<5) |
#define COMPAREOPT_IGNORE_ELEMENT_CLASS (1<<20) |
#define COMPAREOPT_IGNORE_IDS (1<<2) |
#define COMPAREOPT_IGNORE_INVISIBLE_ELEMENTS (1<<19) |
#define COMPAREOPT_IGNORE_LEVEL (1<<14) |
#define COMPAREOPT_IGNORE_LINESTYLEDIRECTION (1<<13) |
#define COMPAREOPT_IGNORE_LINKAGES (1<<3) |
#define COMPAREOPT_IGNORE_MODEL_DIFFS (1<<0) |
#define COMPAREOPT_IGNORE_MODIFIED (1<<4) |
#define COMPAREOPT_IGNORE_MULTISPANNINGSIBLINGBOUNDARIES (1<<11) |
#define COMPAREOPT_IGNORE_SINGLE_EDF_VALUES (1<<7) |
#define COMPAREOPT_IGNORE_SYMBOLOGY (1<<1) |
#define COMPAREOPT_IGNORE_UNORDEREDSIBLINGORDER (1<<12) |
#define COMPAREOPT_IGNORE_XATTRIBUTES (1<<17) |
#define COMPAREOPT_STANDARD_IGNORES (COMPAREOPT_IGNORE_MODEL_DIFFS | COMPAREOPT_IGNORE_SYMBOLOGY | COMPAREOPT_IGNORE_IDS | COMPAREOPT_IGNORE_LINKAGES | COMPAREOPT_IGNORE_MODIFIED | COMPAREOPT_IGNORE_XATTRIBUTES) |
#define COMPAREOPT_TEST_FACEMATERIALS (1<<18) |
void mdlElmdscr_addToChain | ( | MSElementDescrP | chainDscrP, |
MSElementDescrP | newElem | ||
) |
Adds the element descriptor chain pointed to by newElem to the end of the element descriptor pointed to by chainDscrP.
It can create a chain of non-complex elements in chainDscrP.
[in,out] | chainDscrP | Existing element descriptor. |
[in] | newElem | Element descriptor to add. |
int mdlElmdscr_appendDscr | ( | MSElementDescrP | existingElmDscrP, |
MSElementDescrP | newDscr | ||
) |
Adds the element descriptor chain pointed to by newDscr to the end of the element descriptor pointed to by existingElmDscrP.
The difference between mdlElmdscr_appendDscr and ~mmdlElmdscr_addToChain is that mdlElmdscr_appendDscr requires the element descriptor to hold a single complex element and ~mmdlElmdscr_addToChain does not.
[in,out] | existingElmDscrP | Existing element descriptor |
[in] | newDscr | Element descriptor to add. |
MSElementDescrP mdlElmdscr_appendElement | ( | MSElementDescrP | existingElmDscrP, |
MSElementCP | element | ||
) |
Allocates a new element descriptor from an existing MicroStation element.
It appends the new descriptor to the end of an existing element descriptor, existingElmDscrP.
[out] | existingElmDscrP | Existing element descriptor. |
[in] | element | Element to append. |
void mdlElmdscr_clearPersistentInfo | ( | MSElementDescrP | elDscrP | ) |
Clear persistent info on this element descriptor.
[in,out] | elDscrP | The element descriptor to modify. |
StatusInt mdlElmdscr_copyXAttributes | ( | MSElementDescrP | toElDscr, |
MSElementDescrCP | frElDscr, | ||
bool | copyChildXAttributes | ||
) |
Copies the XAttributes of frElDscr to toElDscr.
1) if frElDscr has any scheduled XAttribute changes, copies of these changes are added to the XAttribute change set of toElDscr. 2) if frElDscr has any persistent XAttributes, they are loaded and copies are added as Writes to the XAttribute change set of toElDscr. If an XAttribute change was scheduled in step 1, then that XAttribute will be skipped in step 2. 3) Optionally apply this procedure to the children of toElDscr and frElDscr, recursively. The children of the two descriptors are iterated in parallel. This option makes no sense if the children do not line up. However, no error is returned if they do not. It is the caller's responsibility to make sure that the copyChildXAttributes option makes sense.
[in] | toElDscr | The element to which XAttributes are to be added. |
[in] | frElDscr | The element from which XAttributes are to be read. |
[in] | copyChildXAttributes | If true, the copy operation is propagated to the components of toElDscr and frElDscr pairwise recursively. |
int mdlElmdscr_duplicate | ( | MSElementDescrP * | newDscr, |
MSElementDescrCP | oldDscr | ||
) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor.
This function copies the element descriptor pointed to by oldDscrP, allocates a new element descriptor, and returns the new descriptor's address in newDscrPP.
[out] | newDscr | New element descriptor. |
[in] | oldDscr | Original element descriptor. |
int mdlElmdscr_duplicateEx | ( | MSElementDescrP * | newDscrP, |
MSElementDescrCP | oldDscr, | ||
bool | copyScheduledXaChanges = true , |
||
bool | loadPersistentXasAsChanges = true |
||
) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor.
This function copies the element descriptor pointed to by oldDscrP, allocates a new element descriptor, and returns the new descriptor's address in newDscrPP.
[out] | newDscrP | New element descriptor. |
[in] | oldDscr | Original element descriptor. |
[in] | copyScheduledXaChanges | Copy scheduled XAttribute changes? Pass true if you want to copy recent changes to the XAttributes of the original element(s). |
[in] | loadPersistentXasAsChanges | Add all persistent XAttributes from oldDscr as scheduled Adds to newDescr? Pass true if you want to copy the XAttributes of the original element(s). |
int mdlElmdscr_duplicateSingle | ( | MSElementDescrH | newDscrPP, |
MSElementDescrCP | oldDscr | ||
) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor.
This function copies the element descriptor pointed to by oldDscrP, allocates a new element descriptor, and returns the new descriptor's address in newDscrPP. The mdlElmdscr_duplicateSingle function is identical to mdlElmdscr_duplicate except that it duplicates a single element descriptor and will not duplicate the elements pointed to by oldDscr- >next.
[out] | newDscrPP | New element descriptor. |
[in] | oldDscr | Original element descriptor. |
int mdlElmdscr_duplicateSingleEx | ( | MSElementDescrH | newDscrPP, |
MSElementDescrCP | oldDscr, | ||
bool | copyScheduledXaChanges, | ||
bool | loadPersistentXasAsChanges | ||
) |
Since MicroStation must always allocate element descriptors, the mdlElmdscr_duplicate function creates a copy of an element descriptor.
This function copies the element descriptor pointed to by oldDscrP, allocates a new element descriptor, and returns the new descriptor's address in newDscrPP. The mdlElmdscr_duplicateSingle function is identical to mdlElmdscr_duplicate except that it duplicates a single element descriptor and will not duplicate the elements pointed to by oldDscr- >next.
[out] | newDscrPP | New element descriptor |
[in] | oldDscr | Original element descriptor |
[in] | copyScheduledXaChanges | Copy scheduled XAttribute changes? Pass true if you want to copy recent changes to the XAttributes of the original element(s). |
[in] | loadPersistentXasAsChanges | Add all persistent XAttributes from oldDscr as scheduled Adds to newDescr? Pass true if you want to copy the XAttributes of the original element(s). |
void mdlElmdscr_freeAll | ( | MSElementDescrH | elemDescrPP | ) |
Frees all memory allocated for the element descriptor chain pointed to by elmDscrPP.
This function should be called only once for every element descriptor.
[in,out] | elemDescrPP | Element descr to free. |
UInt32 mdlElmdscr_getFilePos | ( | MSElementDescrCP | elDscrP | ) |
Used to get the position of the element contained in the specified element descriptor.
If the element is not persistent, the function returns 0, an invalid file position.
[in] | elDscrP | Is the element descriptor that contains the element. to get the file position for. |
void mdlElmdscr_initOrAddToChain | ( | MSElementDescrH | edPP, |
MSElementDescrP | newElem | ||
) |
Adds the element descriptor chain pointed to by newElem to the end of the element descriptor pointed to by *edPP if *edPP is non-NULL and simply sets *edPP to newElem if *edPP is NULL in a similar manner to mdlElmdscr_addToChain.
This function is useful when a chain is being developed in a loop.
[in,out] | edPP | The output descriptor chain. |
[in] | newElem | Input descriptor. |
int mdlElmdscr_insertElement | ( | MSElementDescrP | existingElementP, |
MSElementP | elementP | ||
) |
Allocates a new element descriptor from an existing MicroStation element, element.
It inserts the new descriptor in an existing element descriptor chain before the element descriptor pointed to by existingElmDscrP.
[in,out] | existingElementP | Element descriptor. |
[in] | elementP | Element to insert. |
bool mdlElmdscr_isPersistent | ( | MSElementDescrCP | elDscr | ) |
Used to determine whether the element contained in the specified element descriptor is persistent.
[in] | elDscr | Is the element descriptor containing the element to test. |
int mdlElmdscr_new | ( | MSElementDescrH | elDescrPP, |
MSElementDescrP | elemHeader, | ||
MSElementCP | element | ||
) |
Allocates a new element descriptor from an existing MicroStation element, element.
It returns the element descriptor address in elmDscrPP.
[out] | elDescrPP | Pointer to element descriptor. |
[in] | element | Existing element. |
[in] | elemHeader | Points to a parent element descriptor, to which this element descriptor is attached. If hdrElmDscrP is non-NULL, mdlElmdscr_new sets the myHeader field in the new element descriptor structure to that value. It also sets the complex bit in the copy of element. hdrElmDscrP should be set to NULL unless the MDL functions that add or insert elements in an element descriptor cannot be used. |
MSElementDescrP mdlElmdscr_removeElement | ( | MSElementDescrP | elemDescr | ) |
Removes an element from an element descriptor chain.
It frees the memory allocated for the element and returns a pointer to the next element descriptor in the chain.
[in,out] | elemDescr | Element descriptor. |
void mdlElmdscr_replaceDscr | ( | MSElementDescrH | existingDescrPP, |
MSElementDescrP | newDscrP | ||
) |
Replaces the element descriptor pointed to by the existingDescrPP parameter with the new element descriptor pointed to by newDescrP.
[in,out] | existingDescrPP | Is a pointer to the address of the element descriptor to be replaced by the element descriptor pointed to by the newDescrP field. |
[in] | newDscrP | New element to descriptor to replace with. |
int mdlElmdscr_replaceElement | ( | MSElementDescrH | existingDescrPP, |
MSElementCP | elementP | ||
) |
Allocates a new element descriptor from an existing MicroStation element, element.
It replaces an existing element descriptor in an element descriptor chain.
[in,out] | existingDescrPP | Element description. |
[in] | elementP | Element to replace. |
void mdlElmdscr_validate | ( | MSElementDescrP | p, |
DgnModelRefP | modelRef | ||
) |
Sets the information in the complex header elements contained in elmDscrP based on the component elements in the descriptor.
Element types
Validated fields
CMPLX_STRING_ELM
CMPLX_SHAPE_ELM
SURFACE_ELM
SOLID_ELM
Header range, number of elements, total words in description.
TEXT_NODE_ELM
Header range, number of text strings, maximum length of text strings, total words in description.
CELL_HEADER_ELM
CELL_LIB_ELM
SHAREDCELL_DEF_ELM
Header range, class mask, level mask, total words in description.
BSPLINE_CURVE_ELM
Header range, number of poles, total words in description.
BSPLINE_SURFACE_ELM
Header range, total words in description.
SHARED_CELL_ELM
class mask. /table>
[in,out] | p | Element descriptor. |
[in] | modelRef | Element source. |