AutoCAD 2013 :: Lisp Can Change All Elements In Block To Layer 0 Except Layer Defpoint
Sep 3, 2013I need a lisp can change all elements in block to layer 0 except layer defpoint but still keep linetype, color as it is.
View 1 RepliesI need a lisp can change all elements in block to layer 0 except layer defpoint but still keep linetype, color as it is.
View 1 RepliesI 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..
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.
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 RelatedI 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.
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 RelatedI'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.
what does it mean when someone says a block is created on layer 0 vs a regular layer?
View 3 Replies View RelatedIt appears that the Layer Filters functionality is broken again with 2013. Unchecking the "Apply layer filter to layer toolbar" disables the function of layer filters in the tool palette.
View 5 Replies View RelatedWe are using autocad 2010 and I have written a routine that will insert several blocks on to several layers. I thought it worked flawlessly, until I used it. Our drawings use layer states. When one state is in use, all the other layers are frozen. We want to insert a block, at a specific point chosen by the user, and the lisp routine will insert a couple of other blocks at that same point, but on a layer that is frozen. Three blocks installed in all, at the same point, on two layers. The routine works if all layers are thawed, but not if the layers are frozen.
(defun c:lP1 () ; this starts the routine
(setq temperr *error*) ; saves *error*
(setq *error* rerr) ; sets the new error variable
(command "_.Undo" "_mark") ; start of "undo" command
[code]....
I have blocks that were created on one layer but inserted on another layer. So, when i turn the layer off that the blocks were inserted on they remain visible because you have to turn off the layer they were created on to have them disappear. Is there a way for me to determine what layer the blocks were created on?
View 9 Replies View RelatedI've inserted a block into my drawing with this
....
Dim tmpDb As New Database(False, True)
tmpDb.ReadDwgFile(nombrebloque, System.IO.FileShare.Read, True, "")
Dim Transform As Matrix3d = Matrix3d _
[Code]...
and I would like to change some properties (layer, color,...) of the entities. (without modify the original block)
How can I access to these entities?
I've a symbol of three layers as a block in a dwg file. When I copy and paste the block in a other dwg file, all layers are displaced. And I don't know why.
View 4 Replies View RelatedIf there any lisp for the below sequence:-
1) select a few group of pre-set block name
2) change all these pre-set bloack name to a layer " Eye Bolt"
At moment, i have several kind of block such as example of "EB10", "TEB10","EB8","TEB8" and etc.
I've read this post:
[URL]
Everything works fine, but I have one problem.
I just want to change colors for all objects in current model space. But this command also changes attributes/blocks definitions (I mean, any new block which I insert has the color that I specified previous).
Where I have to change the code?
I am in search of a add on program or a lisp that I can change an architects layers to the layers we use. I know layer translation command is available but every time I have to select what the layers translate to. It would be nice if there was a way to add the new architect layers into a database so when we run the lisp or program the layers will automatically change to our layers we use.
View 2 Replies View RelatedI am trying to figure out if there is a LISP or autocad add-on to start a library of architectural layers to be translated to our layers. So all I would need to do is hit a toolbar button and the LISP/Program would take a layer from archetects prints that I already added to a database that already knows what layer to change that layer to and so if there are different layers in the CAD drawing I can add them to the database so it will be saved for future layer translations. So once we get the database started I am hoping after awhile I wouldn't have to add any layers since they are already in the database to change the layers too.
View 8 Replies View RelatedSay 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 RelatedPossible 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...
I have a customized button to draw an ‘ac-arrow’. I created a lisp to create the layer “G-ANNO-LEDR”
if the layer name is not found. The advanced part I would like is:
Current layer: E-ANNO-WIRE
Ac-Arrow Leader: G-ANNO-LEDR
OPTION 1:
If, say I am on current layer “E-ANNO-WIRE” and need to draw my “ac-arrow” leader, and continue working
on the original layer “E-ANN-WIRE” (and have the leader be drawn [remain] on the layer “G-ANNO-WIRE”).
With this option, I have the block “ac-arrow” imbedded in my template drawing file to have the block at hand.
With this option, the layer “G-ANNO-LEDR” will be created IF it is not on the drawing.
OPTION 2:
- Currently be on layer “E-ANNO-WIRE”
- Bring in the block “ac-arrow” from my block library “L:AutoCADSymbols”
- Draw the “ac-arrow” leader which will be on layer “G-ANNO-LEDR” (this layer created IF it is not
on the current drawing).
- After the leader is drawn’
- Be put back to the layer I was, “E-ANNO-WIRE”, and continue working.
The OPTION 2 is what I would really like to have. A while back, I happen to see one like OPTION 2, but I cannot
find it anymore on the users groups. I have been searching for a while now.
Currently, I use the button in my customized toolbar (see image) and have to have the “ac-arrow” block in my drawing and have its layer created in the drawing.
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.
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 RelatedAny script that when ran will set lineweights of a layer based on what color the layer is assigned. For instance if I have 3 lines that are green on 3 different layers. I need the script to change all 3 layers lineweight to .015mm. I have drawings that are inconsistant with layer names so layer translator and methods of that nature will not work because I do not know all the layer names and I have 100 drawings to do this to.
View 3 Replies View RelatedI 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.
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 RelatedThis 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 RelatedI'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]....
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.
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 RelatedCan 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 RelatedI 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