Efeezy Posted June 28, 2019 Posted June 28, 2019 Good Morning Everyone: Does anyone have a Lisp that will change all the layer in the drawing to Default lineweight? Thank you for your time, Efeezy Quote
Lee Mac Posted June 28, 2019 Posted June 28, 2019 (command "_.-layer" "_lw" "default" "*" "") 1 1 Quote
Lee Mac Posted June 28, 2019 Posted June 28, 2019 (vlax-for l (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (vla-put-lineweight l aclnwtbylwdefault)) 1 Quote
Efeezy Posted June 28, 2019 Author Posted June 28, 2019 Thank you Lee Mac It work if I cut and paste (command "_.-layer" "_lw" "default" "*" "") at the command line but I am not good an writing or modifying lisp. How to do I make the command work? -------------------------------------------------------------------- ; CHANGE ALL LAYERS TO DEFAULT LINEWEIGHT AUTOCAD LISP (defun c:111() (command "_.-layer" "_lw" "default" "*" "") -------------------------------------------------------------------- Quote
Lee Mac Posted June 28, 2019 Posted June 28, 2019 (edited) (defun c:YourCommand () (command "_.-layer" "_lw" "default" "*" "") (princ) ) (defun c:YourCommand () (vlax-for l (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (vla-put-lineweight l aclnwtbylwdefault)) (princ) ) I'm sure you could have worked this out Edited June 28, 2019 by Lee Mac 1 Quote
Efeezy Posted June 28, 2019 Author Posted June 28, 2019 Thank you looks like i missed on space after the command. It was driving me nuts!!! Thank you so much have a great weekend!!! Quote
ammobake Posted July 17, 2019 Posted July 17, 2019 the new LAYTRANS command would also work (kind of) but only a thing in 2019 or higher. ChriS Quote
SLW210 Posted July 18, 2019 Posted July 18, 2019 LAYTRANS has been around a while. AutoCAD 2016 and newer. Quote
ProvoZA Posted February 2, 2021 Posted February 2, 2021 On 6/28/2019 at 7:23 PM, Lee Mac said: (command "_.-layer" "_lw" "default" "*" "") You saved me hours in updating 5 drawings. Worked like a charm. Thanks a million. Stay safe! Barry from Cape Town, South Africa Quote
ammobake Posted February 5, 2021 Posted February 5, 2021 On 7/18/2019 at 2:26 AM, SLW210 said: LAYTRANS has been around a while. AutoCAD 2016 and newer. I didn't realize that but I was able to find posts online from 2009 about the LAYTRANS command so I'm assuming it came out 2008 or so - possibly earlier. There was a new features tutorial video I watched that was pre-release for like Autocad 2020 or something and it was talking about LAYTRANS having additional features. But for some reason it mentioned 2019 and newer. I dunno it was like a year and a half ago lol. -ChriS Quote
SLW210 Posted February 8, 2021 Posted February 8, 2021 It's been a while, but it may have been in Express Tools even before then. In AutoCAD 2008, they moved the Layer Tools from Express Tools into Core AutoCAD. Not sure where I got AutoCAD 2016 from. Quote
Recommended Posts
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.