Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/31/2021 in all areas

  1. No need to cycle through tabs to change object properties .. this one will exclude hatch. (defun c:foo (/ s) ;; RJP » 2021-03-31 ;; Change all color byblock objects to bylayer (if (setq s (ssget "_x" '((0 . "~HATCH") (62 . 0)))) (foreach e (mapcar 'cadr (ssnamex s)) (entmod (append (entget e) '((62 . 256))))) ) (princ) )
    1 point
  2. This is help for you. (vl-load-com) (defun _pac (e / l v d lst) (setq d (- (setq v (/ (setq l (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e))) 100.)))) (while (< (setq d (+ d v)) l) (setq lst (cons (vlax-curve-getPointAtDist e d) lst)) ) ) (defun c:dd (/ s i e p r n x lss t1 t2) (setq p 0) (= 1 (getvar 'Dwgtitled)) (setq collectedData nil csvFile (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) ".csv") ) (if (setq s (ssget "_:L" '((0 . "POLYLINE,LWPOLYLINE") (-4 . "<OR") (70 . 1) (70 . 3)(-4 . "OR>")))) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i)))) (setq r (getpropertyvalue e "area")) (setq t2 (strcat "AREA" "," (rtos r 2 1))) (foreach itm (setq ptlist (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget e)))) (setq p (1+ p)) (princ "\n") (princ (setq coor (strcat (rtos p 2 0) "," (rtos (car itm) 2 3) "," (rtos (car itm) 2 3)))) (setq x (cons (list coor) x)) ) (foreach lk x (setq lss (cons lk lss))) (if (setq ss (ssget "_WP" (_pac e) (list '(0 . "TEXT,MTEXT") ))) (repeat (setq n (sslength ss)) (setq hnd (ssname ss (setq n (1- n)))) (setq vobject (vlax-ename->vla-object hnd)) (if (vlax-property-available-p vobject 'textstring); test if object has textstring property (setq vobjstring (vla-get-textstring vobject)) ; String value (princ "\nSelected object don't have \"TextString\" property... ") ); if (setq t1 (strcat "ID" "," vobjstring)) ) ) (setq lss (cons (list t2) lss)) (setq lss (cons (list t1) lss)) (setq p 0 x nil) );repeat );if main (setq opf (open csvFile "w")) (foreach rowValue lss (write-line (apply 'strcat rowValue) opf) ) (setq lss nil) (not (close opf)) (princ) ) I am not a lisp expert .. Pline area to csv.lsp
    1 point
  3. Steven has given a good hint, we always name our layouts D01, D02 etc If you have a common layout name you could use excel to make a sequence of commands that you just copy and paste a column to the command line pretty sure works in LT, even a txt file copy the number of lines, if you name them all different then sorry. Layout s D01 Zoom E Layout s D02 Zoom E Layout s D03 Zoom E Layout s D04 Zoom E
    1 point
×
×
  • Create New...