mel-wlp Posted February 16, 2023 Posted February 16, 2023 (edited) Need some help please - this is probably quite simple but just not for me .. I found this lisp that works great .. only my client wants all lineweights to be be set as default not 0 - can someone tell me how to change this please https://autocad.fandom.com/wiki/Lineweight_stripper_(AutoLISP_tool) ;;; AutoCAD Wiki AutoLISP code header. ;;; ;;; Copy this code to a file on your computer. ;;; Start highlighting OUTSIDE the code boxes and use the mouse or keyboard to ;;; highlight all the code. ;;; If you select too much, simply delete any extra from your destination file. ;;; In Windows you may want to start below the code and use [Shift]+[Ctrl]+[Home] ;;; key combination to highlight all the way to the top of the article, ;;; then still holding the [Shift] key, use the arrow keys to shrink the top of ;;; the selection down to the beginning of the code. Then copy and paste. ;;; This program is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation, either version 3 of the License, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; The working version of this software is located at the AutoCAD Wiki. ;;; Please AutoCAD:Be_bold in adding clarifying comments and improvements at ;;; https://autocad.fandom.com/wiki/Lineweight_stripper_(AutoLISP_tool) ;;; C:LWSTRIP ;;; Makes all lineweights 0 in the current drawing ;;; ;;; Copyright holders: ;;; 2008 Hubbard Enterprises, Inc. dba Hubbard Engineering Gilbert, Arizona (DEFUN C:LWSTRIP (/ EG EN ICURRENTOBJECT SSALL) (SETQ SSALL (SSGET "X") ICURRENTOBJECT -1 ) ;;For every object in the selection set, (WHILE (SETQ EN (SSNAME SSALL (SETQ ICURRENTOBJECT (1+ ICURRENTOBJECT)))) ;;Set the lineweight to 0 (SETQ EG (ENTGET EN)) ;;Entmod modifies the entity based on the new list after the substitution. (ENTMOD (SUBST (CONS 370 0) (ASSOC 370 EG) EG)) ) ;;Set various drawing settings to make sure lineweights don't appear unexpectedly. (SETVAR "celweight" -1) (SETVAR "dimlwd" -2) (SETVAR "dimlwe" -2) (SETVAR "lwdefault" 0) ;;Exit function silently (PRINC) ) ;|«Visual LISP© Format Options» (72 2 40 2 nil "end of " 60 2 2 2 1 nil nil nil T) ;*** DO NOT add text below the comment! ***|; Edited February 16, 2023 by SLW210 Added Code Tags! Quote
SLW210 Posted February 16, 2023 Posted February 16, 2023 I moved your thread to the AutoLISP, Visual LISP & DCL Forum and put your code in code tags. 1 Quote
marko_ribar Posted February 16, 2023 Posted February 16, 2023 (edited) Have you tried : (ENTMOD (SUBST (CONS 370 25) (ASSOC 370 EG) EG)) And : (SETVAR "lwdefault" 25) Edited February 16, 2023 by marko_ribar Quote
Steven P Posted February 16, 2023 Posted February 16, 2023 59 minutes ago, marko_ribar said: Have you tried : (ENTMOD (SUBST (CONS 370 25) (ASSOC 370 EG) EG)) If you put (CONS 370 25) the lineweight becomes 25mm, try -3 (ENTMOD (SUBST (CONS 370 -3) (ASSOC 370 EG) EG)) 1 Quote
thecocuk07 Posted February 16, 2023 Posted February 16, 2023 2 hours ago, Steven P said: If you put (CONS 370 25) the lineweight becomes 25mm, try -3 (ENTMOD (SUBST (CONS 370 -3) (ASSOC 370 EG) EG)) -1 isn't it ? Defaul -3 , ByBLock -2 , ByLayer -1 Quote
Steven P Posted February 16, 2023 Posted February 16, 2023 Default, -3 (" all lineweights to be be set as default") Though yes, I would usually go ByLayer as a standard setting 1 Quote
mel-wlp Posted February 17, 2023 Author Posted February 17, 2023 @Steven P this isn't about what I want - its what the client wants and they don't want bylayer Quote
mel-wlp Posted February 17, 2023 Author Posted February 17, 2023 thanks all - i knew it would be easy - I just couldn't figure where the change needed to be Quote
Steven P Posted February 17, 2023 Posted February 17, 2023 6 hours ago, mel-wlp said: @Steven P this isn't about what I want - its what the client wants and they don't want bylayer Yeah, clients.... 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.