AutoCAD Visual LISP / AutoLISP :: Auto Change To Layer 0 And Linetype?
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
ADVERTISEMENT
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 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
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
Nov 8, 2012
In our Structural department, we use a layer called S-35-WALL-LB to denote a load-bearing wall, and what the guys typically do when they are on the sheet showing the floor above, is dbl-clk the VP to activate model space, open the Layer Manager and change the VP linetype to HIDDEN to show the afore-mentioned loadbearing walls as walls under.
way to accomplish this through a viewport...but instead of using the Layer Manager, use a lisp routine I can link to a toolbar button where all the user has to do is dbl-clk the VP, press the toolbar button, and either it will convert the default VP linetype (continuous) for S-35-WALL-LB automatically, or get the user to select an object on that layer and it changes the whole lot?
View 1 Replies
View Related
Oct 26, 2012
I would like converting all objects that has forced linetype to be on a linetype layer.
So if there are objects that have forced linetypes - dashed/hidden/phantom, etc., those entities would be moved to a linetype layer based on their forced linetype. The entities would all be changed to color bylayer, linetype bylayer.
So if there is a rectangle that is sitting on an EQUIPMENT layer, the routine would put that rectangle on a new layer called DASHED and change its forced linetype to BYLAYER.
Lastly, once that's done, the next and final step is to locate a the existing layers with matching linetype - say, OBJECTS with DASHED as a linetype, and merging it to that layer.
View 9 Replies
View Related
Aug 22, 2012
I have a Lisp that I have been working on with some folks in the office, and i feel like i am close, but i am not getting the cigar. The idea would be to have the lisp allow the user to select a nested x-ref entity, and change the color and linetype of the selected layer, similar to the old "LAP" command (I know it is a dinosaur, but I still miss it). I seem to be doing swimmingly, code I have quasi-plagiarized. It seems to crap out where i try to pass the selected linetype back to the layer. I get the nastygram "Command: ; error: no function definition: GETLINETYPE" right after selecting the linetype from the dialog.
Code below...
x(defun c:CX (/ Sel EntList DataList cnt Num ClrNum EntData)
(if (setq Sel (nentsel "
Select object to change layers color and linetype: "))
(progn
[Code]...
HP Elitebook Workstation
Windows 7
View 6 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
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
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
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
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
Nov 6, 2013
I have some drawing that contains PHANTOM2 linetype.
I can't delete this linetype from my drawings!
View 9 Replies
View Related
Jul 25, 2012
I draw a linetype in my file with text in it (HW), I need to flip the text (Not the line itself) ...how is this done?
View 9 Replies
View Related
Sep 12, 2013
I've got a linetype that's part of our autocad template file and has been for so long that nobody around here even knows where the original line file is.
I need to extract the linetype out so that I can make some minor modifications. I did do a search and found a nifty lsp routine from Paul Turvill. (Here's the thread that pointed me there: [URL] ..........
I ran it and it SEEMED to work. All the linetypes in the file it created look good EXCEPT for the one I needed to extract. That one looks like this in the line file:
*TREELINE,Series of arcs used to indicate tree drip lines
A,0.0001,-0.0001,
The linetype DOES display properly in the dwg file (meaning lines drawn using it look good).
View 5 Replies
View Related
Nov 2, 2011
How can I get the color that a layer has assumed in an specific viewport, and the same for an specific Linetype when it changed with an VPLAYER command
I found a function LM:GetOverrideData ( layer / data ) ;; © Lee Mac 2010
but return me the same data if I hask about an specific layer in all vports, and in one of them the layer color is modified.
View 2 Replies
View Related
Jun 12, 2009
Linetype code that represents blocks in a retaining wall, lets say for instance Keystone type blocks?
View 1 Replies
View Related