Exemplo n.º 1
0
        public static void CalculateWidthAndLength(DirectShape shape, out double width, out double length)
        {
            width  = 0;
            length = 0;
            try
            {
                BoundingBoxXYZ bb  = shape.get_BoundingBox(null);
                XYZ            min = bb.Min;
                XYZ            max = bb.Max;

                width  = Math.Abs(max.X - min.X);
                length = Math.Abs(max.Y - min.Y);
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }
        }