Jump to content

Recommended Posts

Posted

 

hello:

some routine to change all the lines of a drawing to thicknees 0?

 

thanks

Posted
(defun c:linesthickness-0 ( / s i e ex )
  (prompt "\nSelect LINE entities...")
  (setq s (ssget "_:L" (list (cons 0 "LINE"))))
  (repeat (setq i (sslength s))
    (setq e (ssname s (setq i (1- i))))
    (if (assoc 39 (setq ex (entget e)))
      (entupd (cdr (assoc -1 (entmod (subst (cons 39 0.0) (assoc 39 ex) ex)))))
    )
  )
  (princ)
)

 

  • Like 1
  • Thanks 1
Posted

This one works well for me

(DEFUN C:PLW0 (/ ss1)  ;; Set PolyLine Width to 0.0
  (setq ss1 (ssget ":L"))
  (command "_.PEDIT" "_M" ss1 "" "_W" 0.0 "")
  (princ)
)

 

Steve

  • Like 1
Posted

Autolisp way

 

(defun C:PL0 (/ ss)  ;; Set PolyLine Width to 0.0
  (setq ss (ssget ":L"))
  (foreach poly (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))))
    (vla-put-lineweight poly 0)
  )
  (princ)
)

 

  • Thanks 1
Posted
8 hours ago, mhupp said:

Autolisp way

 

(defun C:PL0 (/ ss)  ;; Set PolyLine Width to 0.0
  (setq ss (ssget ":L"))
  (foreach poly (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))))
    (vla-put-lineweight poly 0)
  )
  (princ)
)

 

For those who don't know the basics of Visual LISP: don't forget to add (vl-load-com) to the top of the routine.

  • Like 1
Posted

THANKS ALL MASTERS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...