AutoCAD Visual LISP / AutoLISP :: Script That Assigns Lineweights To Layer Based On Color Of That Layer

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Move Objects To New Layer Based On Their Present Layer

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

AutoCAD Visual LISP / AutoLISP :: Select Layer By Color

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

AutoCAD Visual LISP / AutoLISP :: Dimension Color By Layer

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

AutoCAD Visual LISP / AutoLISP :: Change Xref Layer Color

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

AutoCAD Visual LISP / AutoLISP :: Routine To Change Layer Color

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

AutoCAD Visual LISP / AutoLISP :: Change Object Color (not The Layer)

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

AutoCAD Visual LISP / AutoLISP :: Change Layer Of Object To Color Not Bylayer

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

AutoCAD Visual LISP / AutoLISP :: Change Library Of Drawings To Color By Layer?

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

AutoCAD Visual LISP / AutoLISP :: Prevent Certain Object In Layer Change To New Layer Automatic?

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

AutoCAD Visual LISP / AutoLISP :: Link Xref Layer To Local Layer - Same Display

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

AutoCAD Visual LISP / AutoLISP :: Draw Leader On Layer And Still Remain On Original Layer

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

AutoCAD Visual LISP / AutoLISP :: Change All Objects On Layer 0 To Existing Layer PC Module

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

AutoCAD Visual LISP / AutoLISP :: Layer Index Color Change Via Selection And Dialog Box

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

AutoCAD Visual LISP / AutoLISP :: Change All Block Element To Layer 0 Without Changing Color / Linetype

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

AutoCAD Visual LISP / AutoLISP :: Using Macro Parameter Contains Space (changing Layer Color From Command Line)

Sep 19, 2013

I'd like to change a layer's color from command line because of a user icon. I figured out from previous topics that I should use macro similar to this: ^C^C_filedia;0;-la;s;Verdeckt (ISO);c;1;l;dashed;;_filedia;1;re;

(I want to use this macro to change layer's linetype, too, but that's not the point)

The only problem with this macro: layer's name contains a space therefore Autocad tries to recognize Verdeckt as a command (and macro interrupts there) instead of setting Verdeckt (ISO) as the current layer. I've tried using different quote marks, none of them worked (' and " and <>). I hope there's a method for entering a parameter that contains space.

Software: Inventor Series 2011 SP1 x64
OS: Vista Business x64
CPU: E6400
RAM: 2*2Gb GeIL
VGA: Quadro FX 550

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Lineweights Of All Layers By A Factor

Jan 22, 2013

I was wondering if it is possible to change the line weights of all layers in a drawing by factor? What I am trying to do is multiply all lineweights by 0.5 so that all lineweights are cut in half. I could just manually do this, but I have around 1000 layers in the drawing, so I'd rather not lol. However, I forsee a problem becuase layer lineweights cannot be assigned just any value, but instead they come from a predefined list. Which means that when a number is divided in half, that new number might now not be in the list.

So another option would be some way to remap all lineweights. This would work pretty well for me since I only have about 4-6 different lineweights throughout the drawing. So I could just say: All layers with lineweight = 0.024" go to 0.014", and all with 0.014" go to 0.006", and so on.

I am aware of how STBs, CTBs, and the "scale lineweights" option all work. But I am not looking to use those. I want the lineweights coming from the layers themselves.

I have used LISPs before, but unfortunatly I have never written one, so I am not familiar with the syntax.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Converting Special Layer With Special Line Weight To Special Layer Name

Aug 9, 2013

i have line in the drawing that exists on layer A-Wall it has different lineweight 0.05 from true wall. Now usually my routine : i select this line and then select similar to convert it to layer glazing.

i need lisp that by one command convert the objects on layer A-wall with layer 0.05 only to glazing.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getting Objects Layer?

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

AutoCAD Visual LISP / AutoLISP :: Using Layer Translator?

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

AutoCAD Visual LISP / AutoLISP :: Selecting All On Layer 5

Mar 26, 2013

What a lisp routine would look like for selecting all items on layer 5. 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Draw Line In A Layer

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

AutoCAD Visual LISP / AutoLISP :: Change All Hatch To Particular Layer

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

AutoCAD Visual LISP / AutoLISP :: Autoselect Layer For Dimensions?

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

AutoCAD Visual LISP / AutoLISP :: Layer State Delete

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

AutoCAD Visual LISP / AutoLISP :: Unreconciled Layer Filter

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

AutoCAD Visual LISP / AutoLISP :: Change Block Layer

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

AutoCAD Visual LISP / AutoLISP :: Command / If Layer Is Frozen

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

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Layer States

Mar 14, 2012

How can i retrieve the layer states via lisp.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert All Attributes To Layer 0

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

AutoCAD Visual LISP / AutoLISP :: New Layer For Selected Objects

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







Copyrights 2005-15 www.BigResource.com, All rights reserved