[V8i - MDL/CPP] Include nested reference files when using mdlRefFile_attachByView


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

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,