pmadhwal7 Posted January 27, 2023 Posted January 27, 2023 Hi all, actually some time i forgot to change Defpoints layer to it's desire layer, result is that object are not print as the object is in Defpoints layers, is this possible whenever i open my autocad Defpoints layer color will be in different color instead of white Quote
mhupp Posted January 27, 2023 Posted January 27, 2023 Don't know what exactly what you want. This will make a Defpoint layer or if existing properties will be changed to color white, thawed, and plotting turned off. (defun C:start () (entmake '((0 . "LAYER") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (2 . "Defpoints") (70 . 0) (62 . 7) (290 . 0))) ) (C:Start) Quote
BIGAL Posted January 27, 2023 Posted January 27, 2023 Defpoints is a layer that you should never draw on, so fix what is causing objects to be drawn on that layer. Quote
troggarf Posted January 28, 2023 Posted January 28, 2023 I just found the below code in a folder and changed it to "defpoints". There are so many improvements to this code that can be made, but hopefully it can get you started... ;;;moves all objects from layer defpoints and places them on a new layer called "from_Def" (defun c:from0 () (setq ssl0 (ssget "x" '((8 . "0")))) (COMMAND "-layer" "N" "from_Def" "") (COMMAND "chprop" ssl0 "" "la" "from_Def" "") ) Quote
pmadhwal7 Posted January 30, 2023 Author Posted January 30, 2023 Actually my problem is i have some other object which should be in defpoints layers and i want whenever open autocad defpoints color default change from white to red or any other color Quote
Steven P Posted January 30, 2023 Posted January 30, 2023 Keeping it simple, run this to change Defpoints layer colour to Green (use number 1 for red), should highlight what objects are on that layer (command "-layer" "c" 3 "Defpoints" "") Using similar and a wildcard for the layer names you can also turn off all layers, and then turn on defpoints layer to move objects on that layer only if you want https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-turn-on-all-layers/td-p/6671292 it is also possible to select all objects using a selection set and filtering it for the later defpoints to do the same Quote
pmadhwal7 Posted January 30, 2023 Author Posted January 30, 2023 (edited) 1 hour ago, Steven P said: Keeping it simple, run this to change Defpoints layer colour to Green (use number 1 for red), should highlight what objects are on that layer (command "-layer" "c" 3 "Defpoints" "") Using similar and a wildcard for the layer names you can also turn off all layers, and then turn on defpoints layer to move objects on that layer only if you want https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-turn-on-all-layers/td-p/6671292 it is also possible to select all objects using a selection set and filtering it for the later defpoints to do the same what i understand it will be run every time and in every dwg, but is it possible to do once and it will automatically change the color whenever open any dwg or lisp will run at the startup when dwg will open Edited January 30, 2023 by pmadhwal7 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.