In V8i I was able to specify a reference file attachment method by:
ReferenceFile *pRefFile=mdlRefFile_getInfo( attachedModelRefP ); if ( pRefFile ) { pRefFile->display.fb_opts.attachMethod = ATTACHMETHOD_CoincidentWorld; ... }
but I don't see ATTACHMETHOD_CoincidentWorld nor do I see anything like display.fb_opts.attachMethod in a CONNECT DgnAttachmentP struct.
Bruce
Upon searching the header files, I see a note in DgnPlatform.h in the struct for fb_opts.attachMethod: "see RefAttachMethod enumeration" The enumeration seems to not exist. Also, fb_opts is a part of struct referenceFileElm as defined in DgnElements.h. How does one retrieve a Reference Attachment Element? Do you iterate the model's elements, looking for type=100 and level=0? Can it be obtained from the DgnAttachment pointer?
Hi Bruce,
In MSCE this function mdlRefFile_getInfo returns a pointer to a DgnAttachment object, whose members are private.Please see also line 24 in 0811to1000Published.remap file from SDK.In MSCE the function GetAttachMethod should be used (line 35 in same file), which is missing in public SDK.Also missing is enum RefAttachMethod.
To address this Defect # 822809 is filed.
Best regards,Artur
OK. So it's not currently possible to set a Reference File's attachment mode to "Coincident World" via code?
When Artur Goldsweerand I reviewed this issue, in addition to filing a defect we considered being able to provide a work-around (we always try to). Artur may need a day or two to schedule this in and test the code paths we believe may provide the desired results; until the defect is corrected possibly in MSCE SDK U9. Please allow Artur a bit of time to see if he can confirm and provide a safe clean public work-around.
Thank you,Bob