AutoCAD Visual LISP / AutoLISP :: Change To Layer 0 On Exit / Close
Feb 25, 2011
I am using 2011 Civil 3D and there is a bug I am trying to get a workaround for. If your drawing is not closed with layer 0 being the current layer several different civil 3D entities assume the color of the current layer of xref'd drawings.
From my reading it appears I need a reactor to thaw layer 0 and make it current before close or exit commands. I am not a programmer and have struggled making this work.
View 9 Replies
ADVERTISEMENT
Jan 10, 2012
I am trying to "purge on exit" when I close a drawing. I have changed the SAVE commands within the CUI to accomplish a purge on save as well as changed the CLOSE commands in the CUI.
What I want to do is modify the red X close option for the actual window or program close X in the top right corner of the screen.
View 9 Replies
View Related
Apr 17, 2012
lisp..It work fine but just that i need some minor modificatio to it...At moment, when i activate the lisp, it will automatic select all dimension,leader and multileader to a layer call "DIMENSION"...Anyway i wonder if it is possible to prevent any dimension,leader or multileader in layer "Section" will not be change to layer "Dimension"?
View 2 Replies
View Related
May 31, 2012
I'd like to have/write a lisp to change all objects on layer "0" to layer "PC - Module"
If possible also;
save the document close the document open next in directory run layer changer program again.
View 8 Replies
View Related
Nov 7, 2013
Lisp that can select all hatch in a drawing with a layer called AELE, even if it is embedded in a block and change it to layer AHAT with Green colour?
The layer AHAT may or may not already exist in the drawing.
We need to run the lisp on a lot of drawings (exported from Revit) so I need to use the script to run this lisp on multiple drawings.
View 3 Replies
View Related
Jul 25, 2006
I have been filtering through this descuession group for a whil this morning looking for what I need and have found somethings that are close but haven't managed to change them a little to do what I am wanting..
I have drawings with a block named UG101 and has been inserted on all sort of different layers.
What I would like to do is run a lisp routine that would select all blocks with the name UG101 and put them on the layer CableInfo.
I have many other blocks that i need to do the same to but with different names, so I was hoping, I could change the lisp routine around to do the rest of the blocks in the drawing..
View 9 Replies
View Related
Feb 6, 2012
I have the following Lisp command that changes a selected layer to a different layer. I have tried modifying it change known layer names to different known layer names. i.e run routine and it changes layer "2" to "3" then changes layer "dim" to "dims" ect then stops.
View 5 Replies
View Related
Mar 7, 2013
wondering if is possible to have a lisp routine to:After use the INSERT command, the routine will automatically change the layer of the inserted block to a specific layer according of its name.
i.e.
Step 1 : I will insert a block named Block A using the normal autocad INSERT command (I do not want to insert the block without the Insert window dialog box)
Step 2 : After the insertion, the routine will select the last insertion (or the last object, or any other best way to select this block and will take it's name)
Step 3 : The routine has a list that says:
(If the last insertion (or object) is named Block A, put it in the layer Layer A with color Bylayer and linetype Bylayer)
(If the last insertion (or object) is named Block B, put it in the layer Layer B with color Bylayer and linetype Bylayer)
and so on... I can make the approprieated list by myself folowing my standards.
I think it will be nice to avoid an error if the block is not in the list. So:
(If the last insertion (or object) name is not in the list, do nothing)
To finish, it will be nice to create the layer if it does not exist. Also, Unlock, Thaw and Turn on the layer if it's Locked, Frozen or Off.
View 9 Replies
View Related
Jun 24, 2009
I need to do three things in a LISP routine for around 200 drawings. First, I need rename lots of old layer to new standard layer name, like change layer name "CL-RAILWAY-0" to new layer name "CL-0".
Secondly, I need translate some layer to standard layer, like all the things on layer "CL-WATER-160" to layer "CL-0"
Last, change some linetype, like change linetype"CENTER" to "CENTERLINE". I can do all those things by "CHECKSTANDARD" manually, but I really need someway faster and easier.
View 9 Replies
View Related
Mar 9, 2012
how to write a lisp that when i activate it, it will change all the objects in the drawings to be change to "Layer 0" and all linetypes "Dashed" change to be "hidden"...
View 9 Replies
View Related
Nov 11, 2013
This is in regards to the LIP command in Toolpac. The layer properties for a selected nested object (LIP) used to default to nested. Now you have to select nested from the list of options. Why they would change LIP. My whole company had gotten so used to it.
View 4 Replies
View Related
Aug 14, 2009
I'm looking for a lisp that will change all the layer colors of selected xref by clicking the xref and select color from the color table palette. I have a routine that would change the layer color of a selected entity other than xref.
;;Changes selected object layer to a true color
;;of chose from a dialog
box
(defun c:cvc (/ ent ent_data rgb str objlay)
(setq ent
(entsel)
)
[code]....
View 5 Replies
View Related
May 21, 2003
I am looking for a lisp routine to search the layer table to find a particular layer color and change color.
View 9 Replies
View Related
May 30, 2013
Can I have a lisp to select all objects in the layer "Defpoints" (including model and paper space, and including objects inside blocks) and change the color of those objects to color 30?
View 7 Replies
View Related
Sep 24, 2013
I want to change all pline in drawing to a specific object color (color 253). My code is not working & my brain is not functionning properly today...
(DEFUN C:TR() (SETQ ALL_PLINE_IN_DRAWING (ssget "_X" '((0 . "LWPOLYLINE")))number_of_pline_in_dwg (sslength ALL_PLINE_IN_DRAWING)entity (ssname ALL_PLINE_IN_DRAWING 1)data (entget entity)new_LAYER (list(cons 62 253))data (append new_LAYER data))(entmod data));END OF DEFUN
View 8 Replies
View Related
Aug 1, 2012
I need to be able to grab all polylines and change global width at once. This is a repetitve task that i have created a button for. I am trying to use this but it is not working. It gets hung up on me wanting to manually select the polylines when i thought i grabbed them with the first line.
(ssget "X" '((8 . "LayerName")))
(command "PEDIT" "w" "9")
View 6 Replies
View Related
Aug 25, 2005
Is there a tool out there that will allow me to pick an object and change it's layer properties?
View 9 Replies
View Related
Nov 2, 2011
I have 2000+ drawings that have either the layer state "LMAN_DWF" or "DWF". I want all of them to read "DWF" for scripting purposes. LSIP routine that will go into a drawing and change rename a layerstate if it is named incorreclty, but do nothing if it is named correctly?
Does Layer State "DWF" exist?
If Yes, skip file and move on to next file
If No, does Layer State "LMAN_DWF" exist?
if Yes Rename Layer State to "DWF"
If No, skip file and move to next file.
Or a LSIP routine that can simply dump a list of all drawings in a directory that contain "LMAN_DWF" as a layer state. I could then use that list to do a simple script to change the layer state names on those specific files.
View 2 Replies
View Related
Sep 24, 2013
URL....i need a liitle bit change as my latest comments in that topic. I dont want to change defpoint layer to layer 0.
View 9 Replies
View Related
Mar 27, 2010
I want a lisp to change all object colours from bylayer to its color Example (if layer doors its color is blue the color of objects drawn in this layer will by blue not bylayer)
View 9 Replies
View Related
Jan 24, 2012
I have a library that has a primary folder with 11 subfolders. If the LISP can go through all the subfolders, that would be great. But, if it cannot, I can work with going into each subfolder and running the routine. There are over 12,000 files and I don't have the time to open each one and change the color.
Here's what I need the LISP to do:
open the drawing
select everything
change the color to "bylayer"
save
close
open next drawing in folder and repeat
Once it gets to the end of the folder it can stop.
View 9 Replies
View Related
Mar 7, 2012
Is there any way with a click of a button by using LISP, it will change all the selected object to be changed to a pre-set layer...
Example, after i select a certain entities in a drawing, with LISP, it will change all the object to layer "0"?
Additionally, u also need it to change all selected entities that are in "dashed" linetype to be change to "hidden" linetype..
View 3 Replies
View Related
Aug 1, 2013
I'm attempting to create an easier way to change layer colors of nested linework by selecting the linework and having the ACAD index color dialog box appear to select the replacement color.
defining the "ic" variable;
(defun c:clc (/ ent ent_data ic ent_lay) ;change layer color(setq ent(nentsel)) (setq ent_data(entget(car ent)))(setq ic ;index color(cdr(assoc 62(ACAD_COLORDLG))))(setq ent_lay(cdr(assoc 8 ent_data)))(command "-layer" "c" ic ent_lay ""))
View 3 Replies
View Related
Sep 3, 2013
I have too many blocks with specific layers inside.
develope lisp can change all to layer 0 but keep color and linetype as it is.
I will use this as a part of script to change multiple block.
View 9 Replies
View Related
May 30, 2013
Is there a way Autocad could just do what I asked for, and nothing more?A few examples
- After publishing, the publish dialog auto closes. I don't wat that. After publishing dwf I also want pdf.(I know you can save the list, that's not the point. If you didn't close the dialog I wouldn't need it)
- When selecting a hatch, the ribbon automatically jumps to Hatch Editor. I don't want that. Maybe I just want to change the layer. I can find the Hatch editor my self..Dito for XREFS
- I do not want any dialog giving me warnings, about anything.
If an XREF doesn't get attached, I can see that. I don't need a dialog telling me.If a shape file is missing, I can see that..A triangle sign above the command line is totaly adequate.Don't auto open or close dialogs, for what ever reason.
So ... don't auto do anything I can perfectly do manualy. No doubt there are a few more examples I can't think of right now.The nice thing would be to get a variable that gives me that "no auto" mode.
View 4 Replies
View Related
May 26, 2010
how to make a routine for zoom extents, save all, and close all open drawings in a single routine?
View 3 Replies
View Related
May 8, 2012
We are working with a company that will be sending us DWG files. They do not use the same layer colors as us and I am trying to find a lisp that would allow me to set up a table with the layer names and the color I want them to be so that I can quickly change all the layers to our companys color standards.
Example:
Layer 1 = Color 1
Layer 2 = Color 15
Layer 3 = Color 10
Etc.
I don't know a lot about lisp but I figure if I could find a lisp that did this I could plug in my layer/color assignments and it would work.
View 9 Replies
View Related
Jul 31, 2009
Is it possible to run a lisp which can extract all the xref names, make a layer with that name and then change the xref on the layer? I have got a similar routine from earlier posts but it doesn't work if any xrefs inserted in paper space (works fine on model space). could change this routine allowing to change the layer of xref in paper space too.
(defun dxf (i a) (cdr (assoc i a)))
(defun c:lxr ( )
(setq ss (ssget "x" '((0 . "INSERT"))))
[Code].....
View 8 Replies
View Related
Oct 31, 2013
How can I draw a wipeout matched with a closed polyline?
in the other word, a lisp program that prompted for a closed polyline and draw a wipeout by selected polyline.
View 9 Replies
View Related
Jun 20, 2012
Say I have 2 items, one is on layer "M-Duct" and the other on "M-Pipe" (they are in the same drawing). Any lisp routine that would create the layers "M-Duct-New" and "M-Pipe-New" (based on the same color and LT as the original layers) and then move those objects to the newly created layers?
View 9 Replies
View Related
Feb 21, 2013
Possible to link an xref layer and local layer so they display the same (eg. sync viewport colour, linewieght, line type)?
I insert xref's for my base drawing but legend is on local layers and I would like to be able to ensure that the line colour and linetype always match...
View 4 Replies
View Related