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

Changing Line Weight in Microstation 2004

$
0
0

Hello,

I'm want to change line thickness and I looked at these 2 articles

http://communities.bentley.com/products/programming/microstation_programming/f/343173/t/83313

communities.bentley.com/.../126376

but neither one has worked for me. Below is the code snippet that I have for changing line thickness

MSElement	tmpElem;
    MSElementDescr elmD;
    
    Dpoint3d lsPointss[2] = { {0, 0, 0},{10000,1000,0}};
    DPoint3d	dir = { 0, 0, 1 };
    
    mdlLine_create(&oElm, NULL, lsPointss);
    mdlElmdscr_new(&elmD, NULL, &oElm);
    elmD.h.dgnModelRef = ACTIVEMODEL;
    if(mdlLinkage_addThicknessToDescr(&elmD, 4.0, &dir, FALSE)==SUCCESS){
        mdlElmdscr_addByModelRef(&elmD,MASTERFILE);
    }

The mdlLinkage_addThicknessToDescr does not return SUCCESS. If I remove the IF condition, it adds the line without changes to thickness.

I searched in MDL Programmer's guide for this version of Microstation but there is just little information about this.

int      mdlLinkage_extractThickness
(
double*      thicknessP ,
DPoint3d*      directionP ,
BoolInt*      cappedP ,
MSElement*      elemP
);

Description

      Extracts the

thickness

    value from the linkage of the specified element.

Required Header

      <mslinkge.fdf>

How can I change weight for a line or linestring?

Regards,

Mohammad


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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