Using mdlElement_setLineStyle(...) in a workdgn

Hi,

I must use a workdgn to store information in a function I wrote. Some element needs to be represented using custom linestyle but when I'm using mdlElement_setLineStyle on an element, this function systematicaly exits with status 32768. The elements written in the workdgn are not in the MASTERFILE: elements are directly written into workdgn.

I've tried to use mdlLineStyle_nameLoadMap and mdlLineStyle_reloadAll functions before using the call to mdlElement_setLineStyle but without success.

One problem is probably my poor understanding of how custom linestyles are managed by MicroStation (documentation are poor about this subject), but when I use mdlElement_setLineStyle in the MASTERFILE, I have no problem.

Anybody have some experience or idea with mdlElement_setLineStyle and workdgn ?

Many thanks to all in advance!

Philippe

Parents
  • If your work DGN is a separate file, then you must assume that no local resources (level table, line styles, text styles etc) are present in that DGN file. Therefore they are not available when you create your new element.  You must copy required resources to your work DGN file.

    Michael's suggestion may work, since mdlElmdscr_copy will copy required resources from one DGN file to another.  There may be other ways to achieve that result, but his suggestion is the simplest.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • If your work DGN is a separate file, then you must assume that no local resources (level table, line styles, text styles etc) are present in that DGN file. Therefore they are not available when you create your new element.  You must copy required resources to your work DGN file.

    Michael's suggestion may work, since mdlElmdscr_copy will copy required resources from one DGN file to another.  There may be other ways to achieve that result, but his suggestion is the simplest.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data