Functions

Functions

StatusInt mdlMline_joinTee (MSElementP line1, int segNo1, DPoint3dP locatePoint, MSElementP line2, int segNo2, int type)
 Creates open, closed or merged "tee joints" in precisely the same manner as the Tee Joint tools described in the Multi-line joints section of the MicroStation Reference Guide. More...
 
StatusInt mdlMline_joinCross (MSElementP line1, int segNo1, MSElementP line2, int segNo2, int type)
 Creates open, closed or merged "cross joints" in precisely the same manner as the Cross Joint tools described in the Multi-line joints section of the MicroStation Reference Guide. More...
 
StatusInt mdlMline_joinCorner (MSElementP line1, int segNo1, DPoint3dP point1, MSElementP line2, int segNo2, DPoint3dP point2)
 Creates "corner joints" in precisely the same manner as the Corner Joint tool described in the Multi-line joints section of the MicroStation Reference Guide. More...
 
int mdlMline_deletePoint (MSElementP mline, int pointNo)
 Delete the vertex at pointNo from the multi-line element. More...
 
int mdlMline_deleteBreak (MSElementP mline, int segNo, int breakNo)
 Delete a break from the specified multi-line segment. More...
 
int mdlMline_getElementDescr (MSElementDescrH edP, MSElementP mline, DgnModelRefP modelRef, int grphGrp)
 Converts a MicroStation multi-line element to primitive elements, which are then stored in an element descriptor. More...
 
int mdlMline_getBoundaryDescr (MSElementDescrH edPP, MSElementP mlineP, int minLine, int maxLine, DgnModelRefP modelRef)
 Create an element descriptor in edPP containing one or more elements that represent the boundary of the multi-line element mlineP. More...
 
int mdlMline_getCapDef (UInt32 *capColor, long *capStyle, UInt32 *capWeight, UInt32 *capLevel, int *conClass, int *capOption, double *capAngle, MSElementP mline, int capNo)
 Retrieve the definition of one of three possible caps in a multi-line. More...
 
int mdlMline_setCapDef (MSElementP mline, int capNo, UInt32 *capColor, long *capStyle, UInt32 *capWeight, UInt32 *capLevel, int conClass, int capOption, double capAngle)
 Change the definition of capNo in mline to the values of color, style, weight, cap options (line, inner arc, outer arc) and cap angle. More...
 
int mdlMline_insertBreak (MSElementP mline, int segNo, double offset, double length, UInt32 lineMask, UInt32 breakFlags)
 Insert a break in mline starting at a distance of offset from the origin of the segment indicated by segNo. More...
 
int mdlMline_create (MSElementP outEl, MSElementCP inEl, DPoint3dCP normal, DPoint3dCP points, int nPoints)
 Create a multi-line element in mline. More...
 
int mdlMline_insertPoint (MSElementP mlineP, Dpoint3d *newPointP, DgnPlatform::AssocPoint *assocPointP, int pointNo, int pointType, DgnModelRefP modelRef)
 Insert a point at the specified position in the multi-line element mlineP. More...
 
int mdlMline_modifyPoint (MSElementP mline, int pointNo, DPoint3dCP newPoint, DgnPlatform::MlineModifyPoint option)
 Replaces the multi-line vertex at pointNo in mline with the point data in newPoint. More...
 
StatusInt mdlMline_getStyleName (WCharP pName, int bufferLen, MSElementP mline, DgnModelRefP modelRef)
 Get the style name from the multi-line style. More...
 
void mdlMline_getInfo (int *nPoints, int *nLines, double *dist1, double *dist2, DPoint3dP zVector, MSElementCP mline)
 Retrieve general information from a multi-line. More...
 
int mdlMline_extractPoints (DPoint3dP outPoints, MSElementP mline, DgnModelRefP modelRef, int pointNo, int nPoints)
 Extract nPoints vertices of the work line from the multi-line starting at vertex pointNo. More...
 
int mdlMline_getBreak (int *nBreaks, double *offset, double *length, int *lineMask, int *breakFlags, MSElementP mline, int segNo, int breakNo)
 Return information about a requested break or the number of breaks on a segment. More...
 
int mdlMline_getLineDef (UInt32 *color, Int32 *style, UInt32 *weight, UInt32 *level, int *conClass, double *offset, MSElementP mlineP, int lineNo)
 Retrieve the definition of 1 of the 16 possible lines in a multi-line. More...
 
int mdlMline_setLineDef (MSElementP mlineP, int lineNo, UInt32 *color, long *style, UInt32 *weight, UInt32 *level, int conClass, double offset)
 Change the definition of a single line in a multi-line to new values of color, style, weight level, class, and offset. More...
 
int mdlMline_setClosure (MSElementP mline, int close)
 Set the closure status of a multi-line element. More...
 
StatusInt mdlMline_getClosure (int *closed, MSElementP mline)
 Get the closure status of a multi-line element. More...
 
int mdlMline_validate (MSElementP mline)
 Set the multi-line range block and checks for invalid points and/or settings. More...
 
StatusInt mdlMline_applyStyle (MSElementDescrH mlineEdPP, MlineStyleConstP mlineStyle, DgnModelRefP modelRef)
 Apply a multi-line style to the multi-line element. More...
 
StatusInt mdlMline_applyOffset (MSElementP elP, DgnPlatform::MlineOffsetMode offsetMode)
 Set the offset mode for a multi-line element. More...
 

Detailed Description

Function Documentation

StatusInt mdlMline_applyOffset ( MSElementP  elP,
DgnPlatform::MlineOffsetMode  offsetMode 
)

Set the offset mode for a multi-line element.

Generally the offset mode is stored so that modifying the multi-line element by reapplying a style will not shift the multi-line.

Parameters
[in]elPThe element to modify.
[in]offsetModeThe new offset mode.
Returns
MDLERR_BADARG if the element is not a multi-line; SUCCESS if the offset mode is changed.
StatusInt mdlMline_applyStyle ( MSElementDescrH  mlineEdPP,
MlineStyleConstP  mlineStyle,
DgnModelRefP  modelRef 
)

Apply a multi-line style to the multi-line element.

This will copy all the data from the style to the element.

Parameters
[in,out]mlineEdPPThe element to modify.
[in]mlineStyleThe multi-line style to apply.
[in]modelRefThe modelRef for the element. This is used to set the offsets to the correct scale.
Returns
MDLERR_BADARG if the element is not a multi-line or if the style or modelRef are not valid; SUCCESS if the style is applied.
int mdlMline_create ( MSElementP  outEl,
MSElementCP  inEl,
DPoint3dCP  normal,
DPoint3dCP  points,
int  nPoints 
)

Create a multi-line element in mline.

If seed is not NULL, the multi-line definition is extracted from seed. Otherwise, the active multi- line definition is used.

Parameters
[out]outElThe new multi-line element. The memory pointed to by mline should be a full size MSElement.
[in]inElSeed multi-line element or NULL to use active settings.
[in]normalThe plane of the multi-line is defined by the unit vector in normal. If normal is NULL or the current file is 2D, the vector [0,0,1] is used.
[in]pointsThe vertices for the multi-line.
[in]nPointsThe number of vertices in the points array.
Remarks
This function does not allow associative points. To add associative points to a multi-line, you must use the mdlMline_insertPoint function.
Returns
SUCCESS if a valid multi-line was created. Otherwise, it returns an error status.
See also
mdlMline_insertPoint
int mdlMline_deleteBreak ( MSElementP  mline,
int  segNo,
int  breakNo 
)

Delete a break from the specified multi-line segment.

Parameters
[in,out]mlineThe multi-line element to be changed.
[in]segNoThe multi-line segment number (zero-based) containing the break.
[in]breakNoThe index of the break within the segment segNo.
Returns
SUCCESS if the break was located and deleted. Otherwise, it returns an error status.
See also
mdlMline_insertBreak mdlMline_getBreak
int mdlMline_deletePoint ( MSElementP  mline,
int  pointNo 
)

Delete the vertex at pointNo from the multi-line element.

Remarks
Before the modified multi-line element is written to the file, it must be validated with mdlMline_validate.
Parameters
[in,out]mlineThe multi-line element.
[in]pointNoThe point number (zero-based) to delete.
Returns
SUCCESS if the point was deleted. Otherwise, it returns an error status.
See also
mdlMline_insertPoint mdlMline_validate
int mdlMline_extractPoints ( DPoint3dP  outPoints,
MSElementP  mline,
DgnModelRefP  modelRef,
int  pointNo,
int  nPoints 
)

Extract nPoints vertices of the work line from the multi-line starting at vertex pointNo.

Parameters
[out]outPointsmust be at least nPoints long. If a multi-line vertex is represented by an associative point, the association is resolved before the point is added to outPoints.
[in]mlineThe multi-line element.
[in]modelRefSource model for element (ACTIVEMODEL for the active model).
[in]pointNoFirst point to extract.
[in]nPointsNumber of points to extract.
Returns
If successful, the number of points extracted is returned. -1 is returned on error.
See also
mdlMline_insertPoint mdlMline_deletePoint
int mdlMline_getBoundaryDescr ( MSElementDescrH  edPP,
MSElementP  mlineP,
int  minLine,
int  maxLine,
DgnModelRefP  modelRef 
)

Create an element descriptor in edPP containing one or more elements that represent the boundary of the multi-line element mlineP.

If the boundary requires fewer than MAX_VERTICES segments the boundary is represented by a primitive shape element. Otherwise a complex shape is created.

Remarks
The minLine and maxLine parameters indicate the minimum and maximum profile index numbers (line numbers) used to define the boundary. Pass -1 for both to use the outermost lines of the multi-line element.
Parameters
[out]edPPShape representing boundary
[in]mlinePMulti-line element
[in]minLineIndex of minimum profile line (-1 for limit)
[in]maxLineIndex of maximum profile line (-1 for limit)
[in]modelRefIndicates the model that contains the multi-line mlineP.
Remarks
It is the responsibility of the calling application to free the memory allocated to edPP by calling mdlElmdscr_freeAll.
Returns
SUCCESS if the operation was successful and a shape was created; otherwise an error status is returned.
int mdlMline_getBreak ( int *  nBreaks,
double *  offset,
double *  length,
int *  lineMask,
int *  breakFlags,
MSElementP  mline,
int  segNo,
int  breakNo 
)

Return information about a requested break or the number of breaks on a segment.

Remarks
If the break, breakNo, exists in the requested segment, its offset and length are placed in offset and length. lineMask contains the mask of the lines cut by the break.
The value of breakFlags determines whether the values of length and offset are used in the break. See mdlMline_insertBreak for a description of lineMask and breakFlags.
Parameters
[out]nBreaksNumber of breaks in this segment; can be NULL.
[out]offsetOffset value of requested break; can be NULL.
[out]lengthLength value of requested break; can be NULL.
[out]lineMaskLine mask - lines cut by break; can be NULL.
[out]breakFlagsBreak flags; can be NULL.
[in]mlineMulti-line element.
[in]segNoSegment number to search.
[in]breakNoBreak number in segment.
Returns
SUCCESS if the requested break was found. Otherwise, it returns an error status.
See also
mdlMline_insertBreak mdlMline_deletePoint
int mdlMline_getCapDef ( UInt32 capColor,
long *  capStyle,
UInt32 capWeight,
UInt32 capLevel,
int *  conClass,
int *  capOption,
double *  capAngle,
MSElementP  mline,
int  capNo 
)

Retrieve the definition of one of three possible caps in a multi-line.

A NULL pointer can be passed for any output arguments. In this case, the argument is ignored.

Remarks
The values returned in color, style and weight are the line color, line style and line weight, respectively. The values can be INVALID_COLOR, INVALID_STYLE, or INVALID_WEIGHT, respectively. In this case, the line uses the value from the multi-line display header, which can be extracted using the mdlElement_getSymbology function.
Parameters
[out]capColorCap Color; INVALID_COLOR means that it uses the value from the multi-line element. This parameter can be NULL.
[out]capStyleCap Style; INVALID_STYLE means that it uses the value from the multi-line element. This parameter can be NULL.
[out]capWeightCap Weight; INVALID_WEIGHT means that it uses the value from the multi-line element. This parameter can be NULL.
[out]capLevelCap level number; INVALID_LEVEL or 0 means that it uses the value from the multi-line element. This parameter can be NULL.
[out]conClassIf conClass is true the line will be treated as construction class. Otherwise, it will be treated as primary class. This parameter can be NULL.
[out]capOptionCap option is a combination of the flags MLCAP_LINE, MLCAP_INNER_ARCS, and MLCAP_OUTER_ARCS; see table. This parameter can be NULL.
[out]capAngleCap angle, in radians. If the requested cap is an end cap, the counter-clockwise angle in radians from the work line to the cap line is returned in capAngle. It is not set for a mid cap. This parameter can be NULL.
[in]mlineMulti-line element
[in]capNoThe value of capNo must be 0 (origin cap), 1 (joint cap), or 2 (end cap).
Remarks
The value in capOption is used as a bit mask and it is set when any of the following constants are set with the bitwise OR (|) operator:
Value Description
MLCAP_NONE Use no end caps.
MLCAP_LINE Display a line connecting the two outermost lines.
MLCAP_INNER_ARCS Display circular arcs connecting all but the two outermost lines. (Not used for joint cap).
MLCAP_OUTER_ARC Display a circular arc connecting the two outermost lines (Not used for joint cap).
If the requested cap is an end cap, the counter-clockwise angle in radians from the work line to the cap line is returned in capAngle.
Returns
SUCCESS if the requested cap definition was found. Otherwise, it returns an error status.
See also
mdlMline_setCapDef
StatusInt mdlMline_getClosure ( int *  closed,
MSElementP  mline 
)

Get the closure status of a multi-line element.

If close is true, the multi-line is closed. If close is false, the multi-line is not closed.

Remarks
When a multi-line is closed, the start and end cap definitions are no longer used. Instead, the start and end caps are automatically adjusted to appear as a single joint using the joint options and symbology.
A multi-line cannot be closed unless it has a minimum of four points and the first and last points are identical.
Parameters
[out]closedtrue if multi-line is closed; false if not closed.
[in]mlinemulti-line element
Returns
SUCCESS the element is a multi-line; else MDL_BADARG is returned.
See also
mdlMline_setClosure
int mdlMline_getElementDescr ( MSElementDescrH  edP,
MSElementP  mline,
DgnModelRefP  modelRef,
int  grphGrp 
)

Converts a MicroStation multi-line element to primitive elements, which are then stored in an element descriptor.

The address of the element descriptor is returned in edP.

Remarks
The model the multi-line element came from (MASTERFILE for the active model) is passed in modelRef.
It is the responsibility of the calling application to free the memory allocated to edP by calling mdlElmdscr_freeAll.
Parameters
[out]edPElement descriptor containing dropped multi-line.
[in]mlineMulti-line element
[in]modelRefModelRef that contains multi-line.
[in]grphGrpIf not 0, then the elements will be put into this graphic group.
Returns
SUCCESS if the element descriptor was created. Otherwise, it returns an error status.
void mdlMline_getInfo ( int *  nPoints,
int *  nLines,
double *  dist1,
double *  dist2,
DPoint3dP  zVector,
MSElementCP  mline 
)

Retrieve general information from a multi-line.

If NULL is passed for any of the output arguments, it is ignored.

Parameters
[out]nPointsThe value returned in nPoints is the number of vertices in the multi-line work line.
[out]nLinesThe number of line definitions in the multi-line profile.
[out]dist1The line definition offset of the outermost line 1.
[out]dist2The line definition offset of the outermost line 2.
[out]zVectorMulti-line Z axis direction.
[in]mlineThe multi-line normal vector is returned in mline.
Returns
The mdlMline_getInfo function returns no value.
int mdlMline_getLineDef ( UInt32 color,
Int32 style,
UInt32 weight,
UInt32 level,
int *  conClass,
double *  offset,
MSElementP  mlineP,
int  lineNo 
)

Retrieve the definition of 1 of the 16 possible lines in a multi-line.

If NULL is passed for an output argument, that argument is ignored.

Remarks
The values returned in color, style and weight are the line color, line style and line weight, respectively. The values can be INVALID_COLOR, INVALID_STYLE, or INVALID_WEIGHT, respectively. In this case, the line uses the value from the multi-line display header, which can be extracted using the mdlElement_getSymbology function.
Parameters
[out]colorLine color; INVALID_COLOR means that it uses the value from the multi-line element. This parameter can be NULL.
[out]styleLine style; INVALID_STYLE means that it uses the value from the multi-line element. This parameter can be NULL.
[out]weightLine weight; INVALID_WEIGHT means that it uses the value from the multi-line element. This parameter can be NULL.
[out]levelLine level; 0 means that it uses the value from the multi-line element. This parameter can be NULL.
[out]conClassIf conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class. This parameter can be NULL.
[out]offsetThe value returned in offset is the distance of lineNo from the multi-line work line. This parameter can be NULL.
[in]mlinePMulti-line element to extract parameters from.
[in]lineNoprofile index in the multi-line of the line of interest.
Returns
SUCCESS if the requested line definition was found. ERROR is returned if the element is not a multi-line or if the lineNo is less than 0 or exceeds the number of profiles in the multi-line.
See also
mdlMline_setLineDef
StatusInt mdlMline_getStyleName ( WCharP  pName,
int  bufferLen,
MSElementP  mline,
DgnModelRefP  modelRef 
)

Get the style name from the multi-line style.

Parameters
[in,out]pNameA buffer to hold the style name.
[in]bufferLenThe number of wide characters in pName.
[in]mlineThe multi-line element which may have a style.
[in]modelRefThe model ref that mline comes from..
Returns
MDLERR_STYLENOTFOUND if the element does not have a style; SUCCESS if the style is found.
int mdlMline_insertBreak ( MSElementP  mline,
int  segNo,
double  offset,
double  length,
UInt32  lineMask,
UInt32  breakFlags 
)

Insert a break in mline starting at a distance of offset from the origin of the segment indicated by segNo.

Parameters
[in,out]mlinemulti-line to modify
[in]segNosegment to contain break
[in]offsetbreak offset
[in]lengthbreak length
[in]lineMaskmask of lines cut by break; The low order word of lineMask determines which of the 16 possible lines are cut by the break.
[in]breakFlagslength and offset options
[in]lengthThe length of the break is specified by length.
Remarks
If any bit 0 through 15 is set, the break will cut the corresponding line. For example, setting lineMask to 0xff cuts all lines. breakFlags overrides the values in length and offset when either of the following constants, combined with the bitwise OR operator (|), is used:
Value Description
MLBREAK_FROM_JOINT The break starts at the joint line at the specified segment's origin, and the value of offset is ignored.
MLBREAK_TO_JOINT The break ends at the joint line at the specified segment's end, and the value of length is ignored.
MLBREAK_STD Use offset and length.
If the inserted break overlaps an existing break, the conflicting break is removed.
Returns
SUCCESS if the break was inserted. Otherwise, it returns an error status.
See also
mdlMline_getBreak mdlMline_deleteBreak
int mdlMline_insertPoint ( MSElementP  mlineP,
Dpoint3d newPointP,
DgnPlatform::AssocPoint *  assocPointP,
int  pointNo,
int  pointType,
DgnModelRefP  modelRef 
)

Insert a point at the specified position in the multi-line element mlineP.

Parameters
[in,out]mlinePMulti-line to modify.
[in]newPointPPoint to add; NULL when inserting an associative point.
[in]assocPointPAn DgnPlatform::AssocPoint from one of the mdlAssoc_* functions. Pass NULL when inserting a non-associative point.
[in]pointNoThe vertex number (zero-based) for the new point. Pass -1 to insert the point as the last vertex in the multi-line.
[in]pointTypeThe type of the point, which determines whether newPointP or assocPointP is used. It must be either POINT_STD to use newPointP or POINT_ASSOC to use assocPointP.
[in]modelRefThe model for the multi-line which is used to evaluate the association.
Remarks
Before the modified multi-line element is written to the file, it must be validated with mdlMline_validate.
Returns
SUCCESS if the point was inserted. Otherwise, it returns an error status.
See also
mdlMline_deletePoint mdlMline_validate
StatusInt mdlMline_joinCorner ( MSElementP  line1,
int  segNo1,
DPoint3dP  point1,
MSElementP  line2,
int  segNo2,
DPoint3dP  point2 
)

Creates "corner joints" in precisely the same manner as the Corner Joint tool described in the Multi-line joints section of the MicroStation Reference Guide.

Parameters
[in,out]line1is the first of the two multi-line elements that will be joined.
[in]segNo1is the zero based segment number of line1 that will be modified by the join operation.
[in]point1is an arbitrary point that identifies the portion of the Multi-line line1 that will be kept if line1 is shortened by the join operation.
[in,out]line2is the second of the two multi-line elements that will be joined.
[in]segNo2is the zero based segment number of line2 that will be modified by the join operation.
[in]point2is an arbitrary point that identifies the portion of the Multi-line line2 that will be kept if line2 is shortened by the join operation.
Remarks
If a Multi-line element is located by means of the mdlState_start...Modify... or mdlLocate_... functions, the locate point and segment number can be found by calling mdlLocate_getProjectedPoint.
Returns
SUCCESS or an error status.
See also
mdlMline_joinTee mdlMline_joinCross
StatusInt mdlMline_joinCross ( MSElementP  line1,
int  segNo1,
MSElementP  line2,
int  segNo2,
int  type 
)

Creates open, closed or merged "cross joints" in precisely the same manner as the Cross Joint tools described in the Multi-line joints section of the MicroStation Reference Guide.

Parameters
[in,out]line1the first of the two multi-line elements that will be joined.
[in]segNo1the zero based segment number of line1 that will be modified by the join operation.
[in,out]line2the second of the two multi-line elements that will be joined.
[in]segNo2the zero based segment number of line2 that will be modified by the join operation.
[in]typedetermines the cross join type and must be one of the following three constants: MLJOIN_CLOSE Creates a closed cross join.
MLJOIN_OPEN Creates an open cross join.
MLJOIN_MERGE Creates a merged cross join.
Remarks
If a Multi-line element is located by means of the mdlState_start...Modify... or mdlLocate_... functions, the locate point and segment number can be found by calling mdlLocate_getProjectedPoint.
Returns
SUCCESS or an error status.
See also
mdlMline_joinTee mdlMline_joinCorner
StatusInt mdlMline_joinTee ( MSElementP  line1,
int  segNo1,
DPoint3dP  locatePoint,
MSElementP  line2,
int  segNo2,
int  type 
)

Creates open, closed or merged "tee joints" in precisely the same manner as the Tee Joint tools described in the Multi-line joints section of the MicroStation Reference Guide.

Parameters
[in,out]line1a Multi-line element that will be extended or shortened to create a tee joint with Multi-line element line2.
[in]segNo1the zero based segment number of line1 that will be modified by the join operation.
[in]locatePointis an arbitrary point that identifies the portion of the Multi-line line1 that will be kept if line1 is shortened by the join operation.
[in,out]line2a Multi-line element that will be extended or shortened to create a tee joint with Multi-line element line1.
[in]segNo2the zero based segment number of line2 that will be modified by the join operation.
[in]typedetermines the tee joint type and must be one of the following three constants: MLJOIN_CLOSE Creates a closed tee joint.
MLJOIN_OPEN Creates an open tee joint.
MLJOIN_MERGE Creates a merged tee joint.
Remarks
If a Multi-line element is located by means of the mdlState_start...Modify... or mdlLocate_... functions, the locate point and segment number can be found by calling mdlLocate_getProjectedPoint.
Returns
SUCCESS or an error status.
See also
mdlMline_joinCross mdlMline_joinCorner mdlLocate_getProjectedPoint
int mdlMline_modifyPoint ( MSElementP  mline,
int  pointNo,
DPoint3dCP  newPoint,
DgnPlatform::MlineModifyPoint  option 
)

Replaces the multi-line vertex at pointNo in mline with the point data in newPoint.

Parameters
[in,out]mlineMulti-line to modify.
[in]pointNoIndex of vertex to modify (zero-based).
[in]newPointNew point to add.
[in]optionThe modification option. Use MlineModifyPoint::ShiftBreaks to move any breaks following the point so that they appear as close as possible to their current location. Use MlineModifyPoint::RemoveAssociations to make a point non-associative. Pass 0 if not special handling of breaks is required.
Remarks
Before the modified multi-line element is written to the file, it must be validated using mdlMline_validate.
Returns
SUCCESS if the point was modified. If the requested point is an associative point and the MlineModifyPoint::RemoveAssociations option is not specified or the point does not exist, it returns an error status.
See also
mdlMline_insertBreak mdlMline_deletePoint mdlMline_validate
int mdlMline_setCapDef ( MSElementP  mline,
int  capNo,
UInt32 capColor,
long *  capStyle,
UInt32 capWeight,
UInt32 capLevel,
int  conClass,
int  capOption,
double  capAngle 
)

Change the definition of capNo in mline to the values of color, style, weight, cap options (line, inner arc, outer arc) and cap angle.

Remarks
If the color, style, weight, or level are NULL, the default value from the multi-line element display header is used. This value can be set with the mdlElement_setSymbology function.
Previously this function used -1 values to indicate that the values in the header should be used. Now NULL pointers are used to indicate that because -1 precluded BYLEVEL and BYCELL options.
The output values from mdlMline_getCapDef can be used directly in this function.
Parameters
[in,out]mlineMulti-line element
[in]capNoThe value of capNo must be 0 (origin cap), 1 (joint cap) or 2 (end cap).
[in]capColorthe color for the cap; NULL or VALID_COLOR means to use the value from the multi-line element.
[in]capStylethe line style for the cap; NULL or VALID_STYLE means to use the value from the multi-line element.
[in]capWeightthe weight for the cap; NULL or VALID_WEIGHT means to use the value from the multi-line element.
[in]capLevelthe level for the cap; NULL or VALID_LEVEL or 0 means to use the value from the multi-line element.
[in]conClassIf conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class.
[in]capOptionThe value of capOption must be set to one or more of the following constants combined with the bitwise OR (|) operator:
Value Description
MLCAP_NONE Use no end caps or arcs.
MLCAP_LINE Display a line connecting the two outermost lines.
MLCAP_INNER_ARCS Display circular arcs connecting all but the two outermost lines. (Not used for joint cap).
MLCAP_OUTER_ARC Display a circular arc connecting the two outermost lines. (Not used for joint cap).
[in]capAnglecapAngle is the counter-clockwise angle in radians from the work line to the cap line. This value is used only for end caps (0 and 2).
Returns
SUCCESS if the requested cap definition was changed. Otherwise, it returns an error status.
See also
mdlMline_getCapDef
int mdlMline_setClosure ( MSElementP  mline,
int  close 
)

Set the closure status of a multi-line element.

If close is true, the multi-line is closed. If close is false, the multi-line is not closed.

Remarks
When a multi-line is closed, the start and end cap definitions are no longer used. Instead, the start and end caps are automatically adjusted to appear as a single joint using the joint options and symbology.
A multi-line cannot be closed unless it has a minimum of four points and the first and last points are identical.
Parameters
[in,out]mlinemulti-line element
[in]closetrue to close multi-line; false for not closed.
Returns
SUCCESS if the operation is successful. Otherwise, it returns an error status.
See also
mdlMline_getClosure
int mdlMline_setLineDef ( MSElementP  mlineP,
int  lineNo,
UInt32 color,
long *  style,
UInt32 weight,
UInt32 level,
int  conClass,
double  offset 
)

Change the definition of a single line in a multi-line to new values of color, style, weight level, class, and offset.

Remarks
If the color, style or weight are NULL, or if the values are INVALID_COLOR, INVALID_STYLE, or INVALID_WEIGHT respectively, the default value from the multi-line element display header is used. This value can be set with the mdlElement_setSymbology function. The function is set up this way so that it can work directly with the output of mdlMline_getLineDef.
Previously this function used -1 values to indicate that the values in the header should be used. Now NULL pointers are used to indicate that because -1 precluded BYLEVEL and BYCELL options.
Parameters
[in]mlinePOUT Multi-line element to modify
[in]lineNoLine number or profile index to change (zero-based).
[in]colorLine color; NULL or VALID_COLOR means to use the value from the element header.
[in]styleLine style; NULL or VALID_STYLE means to use the value from the element header.
[in]weightLine weight; NULL or VALID_WEIGHT means to use the value from the element header. Valid values are 0 to 31, WEIGHT_BYLEVEL, and WEIGHT_BYCELL.
[in]levelLine level, NULL or 0 or VALID_LEVEL means to use the value from the element header.
[in]conClassIf conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class.
[in]offsetThe value of offset is the new distance of lineNo from the multi-line work line.
Returns
SUCCESS if the requested line definition was changed. Otherwise, it returns an error status.
See also
mdlMline_getLineDef
int mdlMline_validate ( MSElementP  mline)

Set the multi-line range block and checks for invalid points and/or settings.

If mdlMline_insertPoint, mdlMline_deletePoint, or mdlMline_modifyPoint has modified mline, mdlMline_validate must be called before the element is written to the file.

Parameters
[in,out]mlineMulti-line element to validate.
Returns
SUCCESS if the element was validated. Otherwise, it returns an error status.
See also
mdlMline_insertPoint mdlMline_deletePoint mdlMline_modifyPoint

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.