AutoCAD Visual LISP / AutoLISP :: Adding LAYERS To Tool Palettes?

Jul 10, 2013

I've inherited management of CAD standards. A third party developed the tool palette - mostly blocks, etc. but there are also icons to add whole series of layers to drawings. Click 'Architectural Layers' you add the architectural layers. Click 'Plumbing Layers' you add the plumbing layers. Since the original implementation, things have been changed.

How do I update these tools?

View 5 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: How To Unlock Tool Palettes

Oct 11, 2006

I have a problem when creating new Tool Palettes..

As soon as I exit autocad after creating them and then re-open CAD the next day all the Tool Palettes have the locked icon in the bottom corner so I'm unable to add to them.. I've tried everything to unlock them...making sure the atc files aren't read only, unlocking all tool bars in menu customization etc but nothing works.....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Migrate Custom Tool Palettes And Toolbars

Dec 2, 2013

How do I migrate my Custom Tool Palettes and Custom Toolbars from Civil 3D 2012 to Civil 3D 2014?

What files do I need to create or copy to transfer to 2014?

My Custom Tool Palette consists of Block Symbols, Border Sheets, Scales and Seals, Lisp Routines etc.

My Custom Toolbar is just a number of standard cad commands I've put together in my toolbar like Revision Cloud, Layer Isolate, Match Properties, Attach Image, etc.

Do I need to export out my cui file, do I need to create a Profile file, do I need to setup the same directory structure naming and copy my files into those same directory names?

Or is there some easy hidden Magic Button in Civil 3D that you click on and it does the rest?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding To A Selection Set

Jan 27, 2003

R14 Autolisp:

I can create an empty selection set (setq EMss (ssadd)). As I loop through a list I can use the counter to create selection sets on the fly by using:

(set (read (strcat "ss" (itoa cnt))) EMss) and even keep a list of the ssets created with (setq sslst (cons (strcat "ss" (itoa cnt)) sslst)). But when I try to add an ename to the ss with (ssadd ename (read (strcat "ss" (itoa cnt))), I get a error: bad argument type (SSADD NEXTE (READ (STRCAT "ss" (ITOA CNT)))).

why I can create the sets but not add to them this way? I can add to them from the command line.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Blocks Automatically?

May 29, 2012

I want to find a Lisp routine for building rooms (bedroom, bath, kitchen etc).  example: I want to build a bedroom and every bedroom has the following blocks: smoke detector, door, window, bed, night stand, closet.    Is there a way to run a lisp routine that would just ask me for basepoints and rotation angles of all those blocks?  Basically it would automate building a bedroom by inserting all the blocks for me and just prompting me for basepoints + rotation angles. 

Would a macro be better suited for this? I want to do one for every room - kitchen, bath, bedroom, living, dinning etc.  I already have a nice collection of blocks. 

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Up Attribute Values

Oct 26, 2012

Any routine where I could keep picking on my exit arrow blocks (showing how many persons exiting from each space) one-by-one and the program would add up the numbers.  For example I pick on blocks with numbers of 2, 4 & 3 and I would get 9.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Point As Extended Data?

Jan 29, 2013

I was trying to add a point as extended data to a block.

Therefor i used this data but i get an error every time:
 
(setq lastent (entget (CAR (entsel))))(regapp "list")(setq exdata '((-3("list" (1011 . 3277.82) (1021 . 5782.5) (1031 . 369.5) ) ) ))(setq newent (append lastent exdata))(entmod newent)

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding A Text To Selected Texts?

Jan 24, 2013

I need a LISP program to add a text given by user to all selected text.

in other words:

1- user selects some texts.

2- user give a text to program.

3- Program added this text to all selected text.

selected text: text1, text2, text3,text4,....,textn

given text by user: _xyz

Result:

text1_xyz, text2_xyz, text3_xyz,text4_xyz,....,textn_xyz

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Standard Drawing Sheets?

Dec 27, 2013

I've created a couple of programs:

One - that will start a new project file, add our standard drawing sheets

two - Insert a bunch of wblocked components based on user input

programs 3 - 6 all do the same as program 2, just different components for different sheets.

I can run all these programs and they work  (i need to do a lot of "clean-up" but they work)...

I have them set-up to open the next drawing.But i have to type in the next command, and continue until all my programs and done running.

My questions is how can I accomplish this without having to continually type in commands?I can't run these as a script, but is there another method?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding / Subtracting In Diesel Expression

Nov 14, 2013

I have been asked to make the title text larger (drawing are being issued at 1/2 scale, A1 to A3) on a large set of drawings. My solution was to copy the title attribute block to a temporary location, resize the attributes and redefine the block by running a script (scriptpro). Some drawings needed the title line split to next line so I had to move the sheet counter (1 of xx, 2 of xx etc.) which was linked to drawing file name for number with a field/formula.

The diesel expression shown below extracts that number. My problem is I cant figure out how to I can edit this expression to allow for a set not starting at 1. I had used a formula to subtract the difference,but how do you express this to run in a script?

This is my script......

attreq
0
-insert
ftc-gwp-a1-nosheet-stb=ftc-gwp-a1-nosheet-stb
0,0
1
1
0
[code]........

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Numbers Which Increasing In Blocks

Apr 5, 2012

I have draws with a a lot of layouts.In each layout, there is a block (CARTOUCHE) with a an attribute (PAGENUMBER)

I am looking for a way to select the block in my first layout, indicates a number for my attribute (PAGENUMBER). The lisp will automatically increase the attributes of the next others layout. How can I start this lisp.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding / Removing Vertex To Several Plines At Once

Feb 27, 2012

I'm looking for something that, after selecting several plines (overlaped or not), I can insert/remove vertexes.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Variable To Existing File

Oct 4, 2012

I have attached 2 lisp files. datblkx5 makes a block of selection, inserts the block with a 5x distortion, explodes it, and corrects the text for width factor and text height. This one works fine.

I wanted to add the feature of scaling my selection with a user input value. This is the lisp datblkxxx. This one doesn't work. (that is it doesn't correct the text for width factor). I can't figure it out.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layers ON / OFF Automatically

Jan 25, 2013

I know that for layers ON/OFF in current open dwg file, I should use:

[I just want to On/Off for my "STAMP" layer]

(COMMAND "LAYER" "ON" "STAMP" "")
(COMMAND "LAYER" "OFF" "STAMP" "")

but I have more than 150 dwg file and I should open all of dwgs one by one and setting ON/OFF for STAMP layer for every drawing and it takes so much time!  

I just want to select files and LISP program set the STAMP layer to ON or OFF value.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script For Layers

May 31, 2012

I am running a simple script to color some layers in XRefs. I need to colour all layers in XRef files that don't have part of their name containing the characters NWP and I can do this with the line

-layer c 32 ~*|*NWP*

but then all the layers in the sheet file (not in Xrefs) also turn to 32 which I do not want. Is there some way to include an "except" statement in scripts.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Import Layers From DWT

Oct 23, 2013

I'm trying to set up an easy way to import layers from a certain dwt. file with a shortcut. 

Now I found this code, which kind of works, but doesn't do the whole trick. It works with a Popup where I have to insert the dwt. file. It's also annoying that it opens this file than and I have to close it manually.

I would like to have this without any import options and automatically takes this one file always for the layers.  

My file would be located here:

"I:AutoCAD BlöckeTemplate\__Bürostandard"
(defun c:IL (/ oAcad oCurDoc strFile oOpenDoc oOpenDocLayers lstObj oLayer array)
(setq oAcad (vlax-get-acad-object))
(setq oCurDoc (vla-get-ActiveDocument oAcad))
(setq strFile (getfiled "choose file:" (getvar "DWGPREFIX") "dwt" 0))
[code]........ 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Partial Cuix - Adding Commands To Shortcut Menus

Oct 17, 2013

I'm able to add custom panels/buttons into the Ribbons, by cloning the existing ribbon (from acade.cuix) into my partial cuix. However.. I'm not able to add more commands to the shortcut menus, using the same technique.

Is it possible to add custom commands to existing shortcut menus using a partial cuix?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Numbers In Sequence Underneath Dimension Lines

Apr 16, 2012

I have an opportunity to make a good impression at a new job, but ive never had the initiative to learn how to write a lisp routine. at my work we make walk-in coolers and freezers. these coolers are modular with a standard wall piece measuring a certain length. these wall sections have to be numbered sequentially. is there any way to automate this? sometimes we get change order from the client and it means going back and manually changing multiple texts (sometimes in the hundreds), but i thought if there was a way these wall sections could be scheduled somehow that when a new wall panel is inserted in the beginning of the sequence it would update everything after it automatically.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing XREF Layers In DWG

Oct 1, 2012

How to edit this string so that it would change ONLY XREF layers in a dwg. to color 3 bylayer, and leave all of my additional layers in the current dwg. as is.

^C^Cchprop;(ssget"x");;color;bylayer;;-layer;color;3

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Locking Several Layers With One Button

Aug 23, 2011

What the require setting to enable me to lock of several layer continuously when i click the "LAYER OFF" button at the toolbar? I wish to set to be like whenever i use the "LAYER OFF" command, i can direct just continue to click several layers for it to be turn off.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Copy A Block To All Layers

Apr 24, 2013

If I have BLOCKA on a layer (or specifically layer 0), how do you copy blockA onto every layers?  I'm sure there are 5 ways of doing this. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Layers By Their Index

Dec 11, 2013

I want to make a list of layers due to their index (order) in the "layers combo box" in the AutoCAD. I prepared this:

(defun c:ListLayers ( / a b)(setq a(list(cdr(assoc 2(tblnext "layer" T)))))(while(setq b(tblnext "layer")) (setq a(append a(list(cdr(assoc 2 b))))));while);end

But, It's not match with the order of layers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Turn Off All Frozen Layers

Feb 13, 2013

I have an old routine that freezes layers that are off. I would like it to also turn off layers that are frozen. It took a while but I think I figured out how the old routine works. I was having trouble determining how the routine would know if a layer was off or not. I found if the color was a negative number that meant the layer was off  (cond ((< (dxf 62 l) 0) (command "f" (dxf 2 l)))). How do I tell if the layer is frozen?

I was also wondering what the character was after the DXF code ie. (dxf 62 l). Is is a lowercase L or an upper case i and what function does it have?

Below is the old routine that freezes layers that are off.

(defun c:fo (/ l dxf code list)
(defun dxf (code list)
(cdr (assoc code list))
);defun
(setq l (tblnext "layer" T))
[code].........

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Freeze All Xref Layers?

Apr 24, 2013

I have the following code that works, most of the time.  Actually, it works or completes itself all the time, but there is no "all encompassing" measures incorporated.

All of the reference entities, believe it or not, are on layer "0".  There are also some consistent layers, that you can see in the code below.  However, a user may create or even remove any layer in the reference drawing.  Therefore in my current drawing, I may have layers that are not frozen in the xref.

Like i said, the following code works, but not all encompassing.

(setq filename "7102-002-950 UC10-03")
(setq FreezePRD (strcat filename "|_PRD"))
(setq FreezeSLD (strcat filename "|_SLD"))
(setq FreezeBORDER (strcat filename "|0_BORDER"))

[Code] ........

I guess what I'm looking for is to freeze all layers that begin with "7102-002-950 UC10-03|".

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File To Plot All Layers ON?

Mar 6, 2013

Lisp file to plot all layers on,

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deleted The Extra Layers

Dec 3, 2013

I found a lisp in an old post and I edited it alittle with my own layers to have it change to but when I use it, it doesn't deleted the extra layers. It says layer cannot be deleted. Below is part of the code that I am using, I didn't copy all of them since there are alot of layers in the lisp that I added. maybe I copied something wrong I am not sure.

{code}
( defun c:FIXMYLAYERS ( / ss_newlayer change_en )
( setq layerlist ( list ( cons "ENB_ROW-1" "ENB-ROW-1" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB-LOGO" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB-NPLT" "DefPoints" )

[Code]...

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Import Layers From A Text File?

Mar 12, 2012

Is there a way to import layers from a text file?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Sort Through A Database And Rename Layers

Apr 5, 2013

I'm new to working with scripts and have played with it a little bit but my knowledge is severly lacking, I picked up script pro and have had some success batching simple commands.

What I have is a large database with differing layer convensions that I want be able to run a script that will open rename layers save and close, the layers are not of the same name but similar enough that I could set peramiters for less then a duzon layer names and catch my target then rename it to a standard, for example "A-wall exterior" to "A-WL-EXT", a simple enough command but within the database the "A-wall exterior" could be one of a duzon simmilar names.

My thought was to run the -rename la "layername" "layername" qsave script but when the original layer is not found it gets stuck untill script pro times out and fails. If there is some way to search out names and once found rename that would work.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Freezes Layers In Viewports But Not In Model Tab

Dec 27, 2013

Here is the lisp I am attempting to use:

(defun c:ada ()(setvar "cmdecho" 0)(command "-layer" "t" "*" "on" "*" "s" "0" "f" "*" "t" "*ex_*" "t" "*all_*" "t" "rev*all*" "t" "*prop_*" "f" "*geo_*" "f" "*util_*" "t" "*grd_*" "t" "rev*grd*" "f" "*z_*" "f" "alt*" "f" "*grd_elev*" "")(command "_vplayer" "f" "*grd_elev*" "c" "t" "*grd_ada_*" "c" "" "") (setvar "cmdecho" 1))

 The purpose is to show the proposed grading plan at a smaller scale so that we can give detailed grading plans to meet City Regulations per ADA codes. I understand that this can be accomplished by blocks and attributes, but when you have hundreds of spot elevations that can become cumbersome and less customizable than mtext. The large scale drawings can not have all of the spots shown or it would be too cluttered. But I want to be able to see all of my elevations when I am working in model space to ensure that all of my leaders and spots move together.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Block On Different Layers With Different Blocks

Jun 20, 2012

I was able to write a LISP that replaced each node with a block of my choice.However, now I need to find a way now to replace the blocks with different blocks.Each point shares the exact same block called "PILE". Different blocks are on different layers and have 11 different colors. I'd like to replace blocks on layer 1 with a block called "1" and blocks on layer 2 with a block called "2" and so on.I was hoping there would be an easy way to do this in LISP, but I've been unable to get any of my scripts to work.

I've attached a link that visualize what my drawing is currently looking like: [URL] ......

View 2 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







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