How can i retrieve ComponentInstance geometrical coordiantes?


#1

Hello.

Does anyone know the way to rertrieve ComponentInstance geometrical coordinates? I need to pair elements exported to dxf from Autodesk Revit with the elements imported to SketchUp in order to attribute them. The only possible solution for this problem seems to be geomtrical comparision but i cannot get any geom data from SketchUp ComponentInstance. Is there any way to achieve this using Ruby Console or C SDK?

Many Thanks,
Paweł


#2

In Ruby:
ci = # fetch the instance by some means, e.g. selection
t = ci.transformation
origin = t.origin
xaxis = t.xaxis
yaxis = t.yaxis
zaxis = t.zaxis


#3

AND there’s ci.bounds
That gives your its three XYZ dimensions and the 8 corners of it’s bounding box, its center, te box’s diagonal etc.
It depends on what you want to know…

Of course you can also get the ci.definition which includes more data…