When using the MDL-function mdlRefFile_attachByView I want to include the nested reference files from the file containing the saved view:
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);
nestDepth = 10;
mdlRefFile_setParameters(&nestDepth, REFERENCE_NESTDEPTH, 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,
EvanH said:What can I do to include the nested reference files ?
Try bracketting the functions that set attachment parameters in …
// Set attachment parameters here
mdlRefFile_completeAttachment () is where you specify the nesting.
Regards, Jon Summers LA Solutions
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.
EvanH said:I need to modify the DgnModelRefP returned from mdlRefFile_attachByView
Doesn't the saved view already contain the setting for nested attachments?