I am trying to improve upon my program that clips all of the reference files to a shape.
I need to find out the masterOrigin of the DgnModelRef in order to do this.
I have looked into mdlRefFile_getParameters(...) , but none of the parameters shown under mdlRefFile_setParameters is the masterOrigin.
There is a REFERENCE_CLIP_ROTMATRIX for angle, unless it is REFERENCE_SCALE_BY_UNITS or REFERENCE_LOCATE.
I have looked into mdlRefFile_getInfo, but this gives me a pointer to a ReferenceFile structure (as in ReferenceFile.h), but none of the functions give me the masterOrigin.
I was able to find a referenceFileElm structure that contains the DPoint3d masterOrigin (which is what I want), but I am unsure how to get a reference to this structure for my DgnModelRef.
Thank you for your continued help,
Chad
Unknown said: was able to find a referenceFileElm structure that contains the DPoint3d masterOrigin (which is what I want), but I am unsure how to get a reference to this structure for my DgnModelRef
ReferenceFile* pRef = mdlRefFile_getInfo (attachmentModel);
Through that pointer you now have access to all the internal data of that reference attachment. For example...
DPoint3d masterOrigin = pRef->display.mast_org; DPoint3d refOrigin = pRef->display.ref_org;
Regards, Jon Summers LA Solutions
Answer Verified By: HDR_Coder
How to read Reference file attach in MASTER File in Microstation V8(version v8)
Hi Sujit,
this discussion is over 4 yyars old with verified answer (so can be treated as closed).
If you have any question (even a similar to this discussion), I recommend to as in a new post (and of course to follow the forum best practices).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
Thanks for you replay,can you suggest me how do i extract masterOrigin and referenceOrigin of attached reference file.
Sujit Bhunia said:can you suggest me
No.
Is it so complicated to understand the recommendation to follow the forum best practices and to ask in a new post and do not hijack old discussion? When you will not follow best practices, you cannot assume your question will be answered.
Regards,
Sujit Bhunia said:How to read Reference file attach in MASTER File in Microstation V8
Please make a new post for your new question. Tell us (a) the version (e.g. v8.x.y.z) of MicroStation you are using and (b) the programming language you prefer.