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

RE: [CONNECT C++] Converting old hidden line removal code using mdlView_findNamedElmdscr.

$
0
0

I have tried using code below but the resulting file has no saved views.

DgnFileP destination = hln_file->GetDgnFileP();
NamedViewPtr nm = namedView->CopyAndConvertToFile(*destination);

For the current issue of copying saved view to work file, a simplified V8i code to convert to CE is like below.

  DgnModelRefP hln_file;
  MSElementDescr* eldP;
  UInt32 filePos;
  mdlWorkDgn_createFile(&hln_file, filename, DGNFILE_FORMAT_V8,
    ACTIVEMODEL, SEED_CopyDefaultData, NULL, NULL,TRUE);
  mdlView_findNamedElmdscr(&eldP, &filePos, viewName, NULL, ACTIVEMODEL);
  mdlElmdscr_read(&eldP, filePos, ACTIVEMODEL, FALSE, NULL);
  mdlWorkDgn_write(eldP, -1, hln_file);
  mdlElmdscr_freeAll(&eldP);
  mdlWorkDgn_saveChanges(hln_file);
  mdlWorkDgn_closeFile(hln_file);


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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