AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

 

  Entity Length

This will display the length of most entities :

;Coding starts here

(defun c:lg ( / x_object x_length)
(vl-load-com)
(setq x_object (entsel))
(setq x_object (vlax-Ename->Vla-Object (car x_object)))
(setq x_length   (vlax-curve-getdistatparam x_object 
                         (vlax-curve-getendparam x_object )))
(alert (strcat "Length = " (rtos x_length)))
(princ)
);defun
(princ)
;Coding ends here
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website