More Free AutoLISP and Visual LISP code snippets for AutoCAD

 Click here to download the code as a file.

;;; By Jimmy Bergmark
;;; Copyright (C) 1997-2006 JTB World, All Rights Reserved
;;; Website:
;;; E-mail:
;;; returns the length or the perimeter of selected object
;;; Made for AutoCAD 2000
(defun c:lengthOfObject (/ en curve len)
  (if (setq en (entsel))
      (setq curve (vlax-ename->vla-object (car en)))
      (if (vl-catch-all-error-p
            (setq len (vl-catch-all-apply
                        (list curve
                                (list curve)