Jump to content

Recommended Posts

Posted

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 

Posted

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)

 

 

Posted

Defpoints is a layer that you should never draw on, so fix what is causing objects to be drawn on that layer.

Posted

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" "")
)

 

Posted

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

Posted

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

 

Posted (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 by pmadhwal7

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...