Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Kent1Cooper
en respuesta a: iuvcureadhesive


@iuvcureadhesive wrote:

.... to create an overall width and height of the object....


Will this help?

 

(defun C:BB (/ minpt maxpt); Bounding Box of selected object
  (vla-getboundingbox (vlax-ename->vla-object (car (entsel))) 'minpt 'maxpt)
  (setq
    box (list (vlax-safearray->list minpt) (vlax-safearray->list maxpt))
    delta (mapcar '- (cadr box) (car box))
  ); setq
  (prompt
    (strcat
      "\nBounding Box [in 'box' variable]: " (vl-princ-to-string box) ";"
      "\nExtents: X direction " (rtos (car delta))
      "; Y direction " (rtos (cadr delta))
      "; Z direction " (rtos (caddr delta)) "."
    ); strcat
  ); prompt
  (prin1)
)

 

[I don't know how Corel Draw shows the information.]   It could be made to draw Dimensions if that's what you're after.  I also have a command that will draw the bounding box as a rectangle, and that can do it on multiple objects.

Kent Cooper, AIA