Cylinder height?

Cylinder height?

Anonymous
Not applicable
424 Views
2 Replies
Message 1 of 3

Cylinder height?

Anonymous
Not applicable

How to get the height of a cylinder using API? If it is a full cylinder I can get the height by using the area from API. But i am having cut cylinders(cut along the height) so what can be the way to get the height/depth of the cylinder? .

0 Likes
425 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

 

One way to do this is to obtain the two ends of the cylinder as either Edge or EdgeProxy objects and then cast those to 'Circle' types. Now you can use the 'Center' property of the 'Circle' objects to get the distance. 
c# example with units conversion:
           
    double depth = m_Application.UnitsOfMeasure.ConvertUnits(circle.Center.DistanceTo(circle2.Center), "cm", "in");
    
Bob Summe
   
Software Developer   
75 Gilcreast Road Suite 311
Londonderry, NH 03053

 

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks buddy

I think it will work

0 Likes