HI
When using the MDL-function mdlRefFile_attachByView I want to include the nested reference files from the file containing the saved view:
DgnModelRefP modelRefP; int rc = mdlRefFile_attachByView(&modelRefP, tcb->dgnfilenm, L"SavedViewName", L"", viewName, referenceScale, &ptdOrigin, REF_FILE_LEVEL_DISPLAY_DEFAULT, 1, 1);
I've tried to use the function mdlRefFile_setParameters:
int doNotNest = 0; mdlRefFile_setParameters(&doNotNest, REFERENCE_DONOTNEST, modelRefP); int nestDepth; nestDepth = 10; mdlRefFile_setParameters(&nestDepth, REFERENCE_NESTDEPTH, modelRefP); mdlRefFile_writeAttachment(modelRefP);
I've also tried to set the userpreferences:
userPrefsP->refFilePrefs.defaultNestMode = 2; userPrefsP->refFilePrefs.defaultNestDepth = 12; // just as example
The function mdlRefFile_attachByView seem to ignore these preferences.
What can I do to include the nested reference files ?
TIA and regards,
Evan
EvanH said:What can I do to include the nested reference files ?
Try bracketting the functions that set attachment parameters in …
mdlRefFile_beginAttachment (); ... // Set attachment parameters here ... mdlRefFile_completeAttachment ();
mdlRefFile_completeAttachment () is where you specify the nesting.
mdlRefFile_completeAttachment ()
Regards, Jon Summers LA Solutions
Hi Jon
Thank you for your reply.
I know these functions and I've used them before but the problem is that mdlRefFile_beginAttachment creates a new DgnModelRefP and I need to modify the DgnModelRefP returned from mdlRefFile_attachByView.
Regards, Evan
EvanH said:I need to modify the DgnModelRefP returned from mdlRefFile_attachByView
Doesn't the saved view already contain the setting for nested attachments?