When using mdlSystem_saveDesignFileAs() and saving from a .DGN format to .DWG/.DXF, is there any way to specify a "translation" .csv file should be used? For example, I wish to save my .DGN file as a .DXF file, but I want some levels "re-mapped" when the .DXF file is created.
Thanks,
Bruce
Hi Bruce,
I can use following code snippet to set CSVFILE and toggle on remap level, then save current DGN to DWG. I believe to DXF is similar.
mdlSystem_unloadMdlProgram("REMAP"); mdlSystem_defineCfgVar("MS_REMAP_CSVFILE", "C:\\Bentley\\MicroStation\\08.11\\WorkSpace\\Projects\\Examples\\General\\data\\test.csv", CFGVAR_LEVEL_USER); mdlSystem_loadMdlProgram ("REMAP", NULL, NULL); MdlDesc* pMdlDescr = mdlSystem_findMdlDesc("REMAP"); if (NULL == pMdlDescr) { mdlDialog_dmsgsPrint("REMAP application not loaded !"); return; } CExprValue value; value.type = CEXPR_TYPE_LONG; value.val.valLong = 1; mdlCExpression_setValueForApp(&value, NULL, "g_remapOptions.destDwg.remapLevels", VISIBILITY_CALCULATOR, pMdlDescr); mdlSystem_saveDesignFileAs("C:\\atemp\\test.dwg", mdlModelRef_getDgnFile(ACTIVEMODEL), DGNFILE_FORMAT_DWG, FALSE);
HTH, YongAn
Is this API mdlSystem_saveDesignFileAs,work on Microstation V8 ??????
Hi Sujit,
this is quite old (over 5 years) discussion and it's recommeneded to do not extend such discussions and to ask in a new post.
Sujit Bhunia said:work on
It's not clear what you are asking about. Is your question whether this function exists or there are known bugs or you experience any issue / error when using this function?
Sujit Bhunia said:work on Microstation V8
What is MicroStation V8? Please read and follow this forum best practices and specify exactly what version of MicroStation do you use. V8 can be original 8.0 and also V8 XM Edition or even V8i, so it's span 15 years of product and API development.
When discussing older APIs, it's also recommended whether you use old pseudocode MDL or native C/C++.
Sujit Bhunia said:??????
Why so many qestion marks? Do you expect more question marks lead to faster answer or bigger attention?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan
Microstation V8 ,i mean original 8.0 of Microstation.
MicroStation 8.0 is 18 years old software, not certified for any active operating system. In such situation it's hard to discuss why some internal function / API does not work.