Get Component Position(x, y, z)


#1

I have been looking into PickHelper to see if I can get a components position in the model.

“The PickHelper class is used to pick entities that reside under the current cursor location”

Is there a way to pick/get the x, y, z position of a component in the model?


#2

Assume you have somehow got a reference to a component-instance, named ‘compo’, then

point = compo.transformation.origin

gives you a ‘point’ that determines its insertion point.
If you want separate X/Y/Z values, then
point.x
etc gives you those…


#3

Thank you. I will try that out.


#4

That worked great! Appreciate the help!!