Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1677

Re: Drop a LineStringElement to a series of LineElement(s)

$
0
0

    int         numVerts;
    DPoint3d    stringPoints[MAX_VERTICES];
    MSElement tempElement;

    if (SUCCESS != mdlLinear_extract (stringPoints, &numVerts, lsElement, modelRef))
        return;

    for (int i=0; i < numVerts-1; i++)
        {
        // skip over DISCONNECTs...
        if (DISCONNECT == stringPoints[i].x || DISCONNECT == stringPoints[i+1].x)
            continue;

        // use linestring element as template to retain symbology and attributes
        if (SUCCESS != mdlLine_create (&tempElement, lsElement, &stringPoints[i]))
            continue;
             
        // do something...call mdlElement_add etc.
        }

     // delete original linestring element if desired...


Viewing all articles
Browse latest Browse all 1677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>