In a circular reference drawing (A>B>C>A) how to find the link between C and A which makes the three drawing circular?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have 3 drawings A, B and C. I have nested the drawings as A>B, B>C, C>A, which makes the three in circular relation. when I open A, the structure is like A(root)>B>C(leaf), when I open C its like C>A>B, and similarly for B.
According to my understanding when a drawing having circular dependencies is opened, say A, the circular reference is broken as a dialog pops up to continue opening the drawing(if ok, then the circular link is broken)A>B>C(*>A). I iterate from Root graphNode to the leaf but as soon as I reach the leaf the count for the out referencing is 0, which is not true as leaf is parent to the root(making it circular)(C>A).
How can I get the link from C>A as the link between C and A is still maintained in other drawings(C>A>B)?
Is there any object that is the single source of truth for a drawing and that holds the information of wherever the drawing is referenced?
Currently I am using AcDbXrefGraphNode::out() method to get the outgoing references for the active drawing but unfortunately it does not include the circular reference.
I tried the following too, but I am not sure if I am doing it correctly:
1. get the XREFBlockID from the active document using xrefBlockId()
2. Use the blocID in acdbOpenObject() to get AcDbBlockTableRecord, further I can get the BlockTable.I am not sure if this is the right method and what to do next.
Here BAS1, BAS2, BAS3 can be considered as A,B,C.
I am looking for a relevant AutoCAD API that can give me the indication that the drawing is circular.
More specifically my expectation is that I get the link between [the leaf] Drawing1 and [the root] Drawing2 , the circular link.
is there any property that conveys that the drawing had a circular link originally?