I would like to know how to write a routine to thaw all layers in current drawing and multiple xrefs; then freeze all, then thaw only certain layers globally for a drawing that is open. Such as a dimension plan will thaw only *-BLDG, *-DIMS, *-RD-*, *BNDRY.
I would like to create one that will fit every project which has a different xref name.
I'm looking for a way to make a LISP routine that will create multiple dimstyles.I'm having difficulties creating annotative dimstyles.I would like to use the variable 'dimanno'. However, 'dimanno' is 'read only'.
How should/could I go about creating a LISP routine that will create annotative dimstyles.
Having trouble with my lisp routine to read from a directory which includes several folders. There is no problem when the files are all mixed in the directory but when dealing with hundreds of files, it makes sense to organize files by types.
Using (ade_aliasadd "BASE" "S:\") and there is no problems when the files are actually there and not in a subfolder called APN_DWG or EAS_DWG. Should I be setting up the environment differently and if so how?
Is there a way to have a Lisp Routine open multiple script files?
I have 10 types of scripts, that are specific to the type of file they open (as shown below). which simply open a file, purge/audit, save and close.
open "Q:PROJECTS321700Field ManagementCoordinationElectricalSleeving613321700_ES-613-Lev01.dwg"audit y-purge all * n-purge R * naudit yqsavecloseopen "Q:PROJECTS321700Field ManagementCoordinationElectricalSleeving613321700_ES-613-Lev02.dwg"audit y-purge all * n-purge R * naudit yqsaveclose The file above was named ES-613.
I would like to create a Lisp Routine that opens this script, *Some how closes the file*, and then opens another script.
Any LISP routine that can create multiple paper space layout tabs and can name them incrementally. I have a template and I wanted to copy tab2 of my layout multiple times and name them incrementally. I have a code shown below that comes close to what I need it to do but it creates a "New Layout" instead of copying the tab I need it to. Please see code below:
(vl-load-com)(defun c:LAYOUT+ (/ *error* prefix i n acDoc oLayouts layoutName) (defun *error* (msg) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat " ** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (and (setq prefix (getstring " Enter layout name prefix: "))
Is it possible to change the system variable "TEXTSIZE" with an autolisp routine? I have hundreds of drawings that have varying textsize settingings and I can't get it to let me change it, unless I go into "Style" and manually change the value to "0" before I run the routine, and there are simply too may drawings to do that everytime. So, is there a way to reset the textsize to 0 through Lisp?
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.
We are trying to update our company logo on hundreds of autocad drawings, any lisp routine or a better way to get this updated. We are trying to update our title blocks that have company logo in it and want to change the logos to the new one.
If I had some custom lisp routes that I used with ACAD 2009, then 2012...do you think I would need to upgrade, modify or change any of the lisp to work correctly in 2014?
Could a custom lisp that I used in 2012, corrupt, effect performance, screw with other key commands (although with worked in the 2012 software) in 2014 if I didn't upgrade the 2012 lisp?
I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.
I have very little knowledge in complex Autolist routines and routine to do the following:
I would like to be able to provide a Prefix and/or Suffix via dialog then pick any line of text or multiple lines of text and have it concentrate. For example: Prefix: First Floor Suffix: M100. I pick the room text on an arch floor plan "Mechanical room" and the second line "100" The result will be "First Floor Mechanical room 100 M100".
But lets take it a final step further; once condensed, I want it added to a perticular tag attribute in a block I inserted.
Example of how I would use it. I insert a symbol for an addressable smoke detector that has several tags; one of them being Location. I would use this routine to gather the information provided by the Arch floor plan and join it with the block attribute for exporting later for use in the Fire Alarm Panel Programming.
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.
We wanted to automatically fill a block's attributes from a selection in Excel. I have a piece of code that has the user select/pick a block to fill. What I want is for the selection to fill multiple blocks in an active drawing. Some of the blocks are the same - which means the same tags/attributes. I've included the code that allows the user to select the block and throws the Excel selection to certain attributes.change the code so that
1) I don't have to manually select blocks - it will find them.
2) One cell (from Excel) will go to multiple blocks - some are same block name.
3) An IF statement that if a certain cell isn't blank/nil
(pretend it would be (nth 21 vl) change DESC11 to XYZ and DESC12 to ABC. For Block namesake we'll call one, BLOCK1 (say it has 3 instances and gets different info in each case) BLOCK2 (say it has 2 instances, also gets different info) BLOCK 3 AND 4 both have an attribute - DESCAA1 that gets different info from Excel.
I am trying to select multiple objects and change them. However, the following code lets me only change one at a time. Even when I select a window around obejcts, it only changes a single item.
start of Same_Cannoscale.lsp(defun C:SCS ( / anno-v ent dict cansc entsc sc-list test oce) (setq anno-v (getvar "ANNOALLVISIBLE")) (setvar "ANNOALLVISIBLE" 1) (if (= (getvar "CVPORT") 1) (princ " In Paperspace. ") (if (setq ent (ssget ":S:L")) [Code] ........
We have a few hundred drawings that we need to change certain block attributes. We need to change the valve of the text in that attribute from whatever it is (doesn't matter what it is) to a specific text string.
For example: If the attribute is called "name" and has the text string of ALAN in it in some drawing or BRUCE in other drawings, we want to chaneg all drawings to TOM.
What I am trying to do is grab the value of the owner tag (of which there are four), and use that value to determine which layer to place it on. What it seems to be doing is hanging.
I put mleader into a LISP routine and it is doing the text attached to it only in the command line instead of in the drawing is ther a way to put mleader into a LISP routine and have it do the same as when you just type in mleader?
We are moving from AutoCAD Map 3d ver 10 to ver 11. There's a lisp routine I use all the time and it doesn't seem to want to work in the newer version 11. this routine is supposed to fill but like I said doesn't work in ver. 11.
We have just finished modelling hundreds of pits/manholes in 3d, to import into 12d as required by our current project.
After importing into 12d we have realised that all the faces are back to front as the dark edges are facing outwards, and the light edges are facing inwards on the pits.
Is there a way to globally flip, or perhaps a lisp routine to flip all the faces?
Basically, the routine asks for the user to choose the hatch type (Retirer/Percer), then the layer (Defpoints/Select/Current) and finaly the type of the object to draw (Polyline/Rectangle). My original routine has also a Circle and a Boundary options, and an Error trap to reset the variables but I will keep it simple for the purpose of my issue.
So, my issue is: when I choose the type of object to draw, it draws just one of it and the routine ends. I would like to have something that "says" to the routine that I want to keep drawing that object (Polyline or Rectangle) and putting the hacth inside until I do enter and then the routine goes to its end.