Element.get_BoudingBox problem!


I’m making a node duplicate view and place on new sheet, everything is ok but in the step place view on new sheet, i want to get the bounding box of origin view and set it for new view.

But i don’t know when i make python code, i have a problem with it. Why they don’t have attribute ??? When i use Node Geometry.BoundingBox everything is ok, but i want to use python code for my purpose. Please help me !!

7 8



Still need help! Somebody else has python code for " Geometry.BoundingBox" node, i need to view for reference.



Are you trying to get the BB of a 2d view? If so, you might need to use view.Outline instead.



thanks Dimitar Venkov for reply, but i don’t know the result of function "Outline.Min or Outline.Max " ??

I need to get bounding box of view and then difine the center point of the view on a sheet, so i need to get the max and min of the bounding box.

Still need your help !!


The view’s outline is similar to to a bounding box for 2d views. However it’s the paper space size, so you’ll need to scale it by the view’s scale. Once you do that, you should be able to get the average of the min and max XYZ.