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);