Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/27/2020 in all areas

  1. See if this code can be of some help... https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-2-countour-lines/m-p/8824932/highlight/true#M385912
    1 point
  2. Here is some very old code (defun c:cent (/ obj rgn pt) (if (and (setq obj (car (entsel "\nSelect object to calculate centroid: "))) (setq spc (vlax-ename->vla-object (cdr (assoc 330 (entget obj))))) (setq obj (vlax-ename->vla-object obj)) (= 'list (type (setq rgn (vl-catch-all-apply 'vlax-invoke (list spc 'addregion (list obj)))))) ) (progn (setq pt (vlax-get (setq rgn (car rgn)) 'centroid)) (vl-catch-all-apply 'vla-delete (list rgn)) (entmake (list '(0 . "POINT") (cons 10 pt) '(8 . "centroid"))) ) ) (princ) )
    1 point
×
×
  • Create New...