[Closed] Getting Xref Bounding box values
Hi Brains trust
In this example I have a Xref box thats somewhere in world space other than 0,0,0 . How can I get some coordinates for the bounding values and the coordinates for the bounds centre. Is there even a way to get this data from an object thats an xref. ?
B
so what you have to do:
get xrefscene
s = xrefs.getxreffile 1
get xref scene root node
r = s.tree
get the bbox
r.children.min
r.children.max
r.children.center
it works because r.children is a node collection which caches bbox info and has related properties (same as selection, objects, etc.)
YES. I know this is a few years too late, but this is the top found item on google and has no answer.
You can easy ‘see’ the objects in an Xref scene by getting the xref scene and looking at it’s tree.children
chkXref = xrefs.getXRefFile 1
chkXrefRoot = chkXref.tree.children
chkXrefBounds = [ chkXrefRoot.min.x, chkXrefRoot.min.y, chkXrefRoot.max.x. chkXrefRoot.max.y ]
You can also change children position values . Know that all these will be lost when it’s reloaded.
chkXref.tree.children[1].position.x = 0