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

Re: [V8i MDL] LineStyle scale problem

$
0
0

Following still does not work, mdlElement_setLineStyle does not return SUCCESS:

also element size increasing did not help: elem.ehdr.elementSize += 4;

StatusInt dpElmdscr_setLineStyleScale( MSElementDescrH edPP, DgnModelRefP modelRef, double scale )
{

  MSElementDescrP edP = *edPP;

  StyleParam ls_sp;
  char ls_name[LS_MAX_NAME];
  if ( SUCCESS == mdlElement_getLineStyle( ls_name, &ls_sp, &edP->el, modelRef, 0 ) )
  {
    MSElement elem;
    mdlElement_memcpy( &elem, &edP->el );

    ls_sp.scale = scale;
    ls_sp.modifiers |= STYLEMOD_SCALE;

    if ( SUCCESS == mdlElement_setLineStyle( &elem, modelRef, 0, ls_name, &ls_sp ) )
    {
      return mdlElmdscr_replaceElement( edPP, &elem );
    }
  }

  return ERROR;

}

Is there any line style exists check? ([edit]  I mean inside of mdlElement_setLineStyle function which stops assigning linkage)


Viewing all articles
Browse latest Browse all 1677

Trending Articles



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