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

Save as DXF with level re-mapping

$
0
0

I am trying to save out a DXF similar to this post

https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/101832/v8i-c-mdlsystem_savedesignfileas

However I am using the Connect version and I keep getting a 'not a structure or union member' error after trying to set the value.  I did add the loading of DWGSETTINGS.ma but that didn't seem to help.  Here is the code

	WString s;
	CExprValue      value;
	value.type = CEXPR_TYPE_LONG;
	value.val.valLong = 1;

    mdlSystem_unloadMdlProgram(L"REMAP");
	mdlSystem_defineCfgVar(L"MS_REMAP_CSVFILE", myCSV, DgnPlatform::ConfigurationVariableLevel::User);
	mdlSystem_loadMdlProgram(L"DWGSETTINGS.MA", NULL, NULL);
	mdlSystem_loadMdlProgram(L"REMAP.MA", NULL, NULL);
	MdlDesc*      pMdlDescr = mdlSystem_findMdlDesc(L"REMAP");
	if (NULL == pMdlDescr)
	{
		mdlDialog_dmsgsPrint(L"REMAP application not loaded !");
		return ERROR;
	}

	if(SUCCESS !=mdlCExpression_setValueForApp(&value, NULL, "g_remapOptions.destDwg.remapLevels", VISIBILITY_CALCULATOR, pMdlDescr)) {
		mdlCExpression_generateMessage(s, mdlErrno); mdlOutput_error(s.c_str());
		}

Viewing all articles
Browse latest Browse all 4331


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