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

using mdlAssoc_createLinear to create an assocPoint to associate with line element in the reference file

$
0
0

I am creating an dimension element. The inserted points  associate with start and end point of the line element  in the reference file. When I use mdlAssoc_createLinear to create an assocPoint,it fails. I have tested if the line element is in the activemodel,it always successes. The code is as follows:

                    EditElemHandle eeh(edP,true,false);
                    DPoint3d startPt;
                    DPoint3d endPt;
                    mdlElmdscr_extractEndPoints(&startPt,NULL,&endPt,NULL,edP,eeh.GetModelRef());
                    DisplayPathP path = mdlDisplayPath_new(eeh.GetElemRef(),eeh.GetModelRef());
                    AssocPoint point1;
                    if (SUCCESS == mdlAssoc_createLinear(&point1,&startPt,0,0,0,path,0))
                    {
                        printf("SUCCESS\n");
                    }
                    else
                    {
                        printf("UNSUCCESS\n");
                    }


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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