Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/27/2019 in all areas

  1. FWIW, rather than defining separate variables for each retrieved property, you can use a single mapcar expression to return the desired sublist: (defun cogo_list_coor ( / i l o s ) (if (setq s (ssget '((0 . "AECC_COGO_POINT")))) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) l (cons (mapcar '(lambda ( p ) (vlax-get o p)) '(number easting northing elevation)) l) ) ) ) l )
    1 point
  2. Lot of lines well thats what coding is about the more complex the more lines.
    1 point
  3. @bdan One way should be replacing the LM:substnth routine with: (defun LM:substnth (itm idx lst) (if lst (if (zerop idx) (cons itm (mapcar '(lambda (x) 0) (cdr lst))) (cons (car lst) (LM:substnth itm (1- idx) (cdr lst))) ) ) )
    1 point
×
×
  • Create New...