AutoCAD Visual LISP / AutoLISP :: Layer Description In Script File?
Aug 13, 2012
I'd like to add Layer descriptions , but I cannot seem to get out of the "D"escription option when the script runs so I get the some crazy descriptions. Is there a special key stroke to get to the next line to "M"ake a layer?
HP Z210 Workstation
Intel Xeon CPU E31240 @ 3.30 Hz
12 GB Ram
64 Bit Win7 OS
View 9 Replies
ADVERTISEMENT
Nov 14, 2013
is it possible to make a LISP program whcih write down my layer name and description as text or Mtext in the drawing, so it will look like:
A_Wall architecture wall
A_Column architecture column
something like that.Each text, which is written in the drawing should have the same layer like the layer name.
the closest i can get is this code below, which write the layer as text, but what missing is: i want to add the description behind the layer name:
(defun c:layerlegend (/ osm ortho clayer celtype cecolor start-point line-length text-height *error*)
(defun *error* (msg)
(setvar "osmode" osm)
(setvar "orthomode" ortho)
(setvar "clayer" clayer)
(setvar "celtype" celtype)
(setvar "cecolor" cecolor)
(princ msg)
)
[code]...
View 4 Replies
View Related
Apr 13, 2013
Lisp file that create a layout for each layer,I’m looking for a lisp file that creates layout for each layer instead of doing this manually.
Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.
View 7 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
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
Aug 28, 2012
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.
View 1 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 19, 2013
Any 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 Related
Feb 7, 2010
How can I get the layer that an entity is on. I have tried numerous method but they don't seen to be retrieving the layer information.
View 8 Replies
View Related
Aug 29, 2013
I am trying to improve quality of exported drawings from Revit. We had troubles with lines and setting „by layer“. We found solution, but unfortunately we have to do it manually for each drawing.
how to program (by using LISP for instance) following commands?
Start Layer Translator (command „laytrans“)In Layer Translator, load the same drawing in section „Translate To“In Settings check only „force object colour to ByLayer“ and „Translate objects in blocks“Click on „map same“Click on „translate“Done
View 1 Replies
View Related
Mar 26, 2013
What a lisp routine would look like for selecting all items on layer 5.
View 4 Replies
View Related
Jun 5, 2013
How do I select the layer in which I want to draw?
for example i draw two line and Each of them has to be in different layer.
How do I select the layer which I want to draw?
View 9 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
Jun 29, 2013
When selecting any dimension type (from the standard AutoCAD toolbars) i would like it to already be in the layer "dimensions". Currently it starts in layer 0.
I've been browsing the web a bit and found a lot about it but people are talking about LISP's?? I can do magic things in AutoCAD but i am a complete stranger to LISP's, Macro's, etc... Would like to learn but where to start..
Anyway i can cover this with something else then writing an LISP?
View 9 Replies
View Related
Feb 20, 2013
i have a small lisp and i would like for it to:
when i invoke the plot command, it will first check if there is a layer state called "Temp"if "Temp" exists, then delete "Temp", then re-create "Temp", then switch layer state temporariliy to "Plot" to plot the file, and then switch back to the "Temp" layer state againbasically, the "Plot" layer state will be set based on how the drawing(s) will plot. if a user makes changes here-n-there in the drawing, when the user wants to plot, the software will save current state as "Temp", plot using the "Plot" state, and switch back to "Temp" state at the end. all i am trying to achieve is to somehow over-write the "Temp" state. below is the LISP.
(command "undefine" "plot")
(defun clot ()
(if (layerstate-has "Temp")
(layerstate-delete “Temp”)
)
[Code]....
Civil 3D 2013 SP1, Win 7-64 bit
12GB RAM
View 9 Replies
View Related
Jun 2, 2013
How to automate the unreconciled layer list to automatically freeze all the layers in the list when opening drawing. This would force the user to select what layers they want shown rather than freezing / turning off the layers they don't want.
View 1 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
Mar 29, 2012
I have a Layer named "Arch - Niveau 1".I would like to enter in the command prompt "a1"..It would read if the layer is frozen or thawed and if it is frozen, it will thaw it?
And if the layer is thawed, it would freeze it..What could be added is: To check up if the layer exists and if not, create it.Would do the same for 2 other layer named "Arch - Niveau 2" command "a2" and "Arch - Niveau 3" command "a3". Is it clear?Now the lisp I've found and modified is this:
(defun c:a1 (/ lay ldef flag) (setq layn "Arch - Niveau 1") (command "_.LAYER") (if (not (tblsearch "LAYER" layn)) (command "_Make" layn) (progn (setq ldef (tblsearch "LAYER" layn) flag (cdr (assoc 70 ldef))) (and (= (logand flag 1) 1) (command "_Thaw" layn)) )) (command ""))
This lisp looks if it exists, if not, create it and only thaw the layer.
I'm not enough familiar with the "not", the "progn" the "flag", "and" and "logand" (!!!!)
View 9 Replies
View Related
Mar 14, 2012
How can i retrieve the layer states via lisp.
View 3 Replies
View Related
Sep 12, 2013
I have searched the web and the Autodesk Discussion Group for a LISP Routine that allows me to convert all attributes in a drawing to Layer 0 but i have had no luck. It would be great if the LISP could edit xrefs as well although not sure if this is possible.
**BATTMAN command will take too long for the hundreds of blocks, xrefs and drawings i need to edit.
View 2 Replies
View Related
Jan 1, 2014
I need a LISP that create a new layer and ask me for the name and the other properties (color,lw,lt..).
ask me if I want move the selected object for the new layer (yes is the default value)
View 9 Replies
View Related
Oct 22, 2013
I created a block with attributes on various layers to make it possible to turn them on/off by need. The I created a multileader style and set this block as a content. When I create a multileader all attributes appear on the same layer as the multileader itself (text entities in the block keep their layer). Is it possible to manage attribute's layer in multileader?
Please see the attached file.
View 5 Replies
View Related
Mar 29, 2012
i have this LISP as attach...at moment it works like this as below:-
1) Activate the LISP
2) Automatic select all the preset block name in the lisp and change to a pre-set layer
3) LISP end
Now i wish it to be like this:-
1) Activate the LISP
2) Automatic select all the preset block name in the lisp and change to a pre-set layer
3) At command prompt, will state out " n block have been change to layer Eye Bolt"
4) LISP end
View 1 Replies
View Related
Aug 28, 2011
I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.
Example:
Layer Names: Layer Color: New Layer Names: New Layer Color:
Wall 2 Z-Wall 100
Berm 2 Z-Berm 100
Fence 2 Z-Fence 100
I found a program (below) that works pretty close to what I am looking for but not quite.
;;; Change the color of a layer to another color by Jeff Mishler July 9, 2003
;;; Usage - (lay_col_chg oldcolor newcolor
;;; example: Command: (lay_col_chg 142 100)
[code]...
View 7 Replies
View Related
Aug 14, 2012
I have a drawing that i know has xdata attached to layer zero. the problem is, it's not an object i can find. Any routine to remove xdata from ALL objects. like a global remove xdata?
View 6 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
Oct 31, 2011
I have been looking around the web to find a quick lsp routine that will take all the xrefs in a drawings and move them back onto layer "xref" or "0" depending on what the design team wants.
The ones I have found don't work or move all the xrefs to separate layers.
View 9 Replies
View Related
Oct 20, 2011
As a consultant we grey out architectural backgrounds for our sheets. We use the SetByLayer command to change the color of the objects in our sheets to gery out. The issue is with dimsensions. Dimension Line Color, Extension Line Color, and Text Color are all set at By Block as default and no one ever bothers to change it unless they are setting it to a specific color which is even more of a problem for us. You can edit the properties of an existing dimension and set Dim Line Color, Ext Line Color, and Text Color to by layer, I am looking for a way to automate this. Something that can search through a drawing, grab all the dimensions (even in blocks) and set everything by layer.
View 9 Replies
View Related
Nov 26, 2013
I find that the command to move objects to a different layers runs very slow in one of the drawing. I want to find out what wrong with the drawing and how to speed things up.
I have a LISP program that batch processes a large number of drawings. One of the step to process each drawing is to change the colors of some objects according to the status of the objects. I do this by moving the objects to a later that has the right color. So far the program only takes 2 to 4 minutes to process each drawing. But the program takes close to 90 minutes to process one specific drawing. I track down the problem has to do with the command that moves the objects to the right layer, like this:
(vl-cmdf "_.chprop" (ssget) "" "_layer" "ABC-Prod-Good-Pcs" "")
This command takes a very long time to finish, like 40 minutes each time it runs (to move 1200+ objects), and the program needs to run it twice for a total of approximately 80 minutes.
Please note that the drawing itself is not the largest drawing, and it doesn't have the largest number of objects to be moved either. It is close to the top-5 drawings in term of drawing size and the number of objects to be moved. I cannot say that the drawing size or the number of objects to be moved are the cause of the problem.
I tried to "speed up" by moving 200 objects incrementally. That didn't work. I tried to "speed up" by moving 100 objects incrementally and saving the drawing after each 100 objects are moved. That didn't work either; actually the speed is slightly slower than simply moving 1200+ objects all at once.
I don't know what to do. I believe there may be something unusual about that drawing. By the way, the reason why I choose to change color by moving objects to a different layer has to do with the fact that I have found this is the best way so far. I tried to change the color of the objects directly. But I find that the color of some sub-parts of the objects are not changed (because their color is by-layer). That's why I choose to change color by moving objects to a different layer.
How I can check the drawing, any different way to change color that is better.
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