AutoCAD Visual LISP / AutoLISP :: Ultra-pipe (Drawing Name Versus Circuit ID And TML Range)
Sep 12, 2012
For those who are familiar with the Ultra-Pipe Program, when I open a drawing from Ultra-Pipethe title layer is updated by the kbupdate.lsp file and the drawing decription (title Layer) is updated with the Circuit ID and TML range. Referencing the attached pdf, you can see that this would be misleading in some cases. I need the description in the title block to be updated with the drawing name instead.
We have changed the default layer colors before in the kbupdate.lsp so I know it's not impossible. I am 99% sure that the changes needed for the problem above would be in the same file.
I have subroutine that retrieves a list of detail numbers in a drawing. Sometimes there are missing numbers. I am looking to find a list of any missing numbers.
Example -
(setq List_DN (list 1 2 3 5 6 7 10 11 12 17))
Missing numbers are - 4,8,9,13,14,15,16
I would like a subroutine to take the List_DN are return the following missing numbers as text
how i have to make something. In the attached file i've made a pipe/tube under a angle (see attachment). What i would like to have is that I get the outline/contour of the end of the pipe to a stretch flatten 2D model (see pdf attachment). Is this already a standard autocad command or lisp for this?
I am trying to put together a lisp routine for exporting a Civil3D drawing to basic autocad entities and convert it to a clients layer standards.
I don't want any user input, so I see two problems with the routine at the moment.
Step 2. SAVEAS - I want the drawing to be saved in the same directory as the current drawing, either called "CLIENT_export.dwg" or preferably "Export_{current drawing name}.dwg". If the dwg exists I want it either to overwrite or increment a suffix number.
Step 4. At the moment it askes the user for a selection, I want it to select "ALL"
;;;Purpose to convert a Civil3D drawing into CLIENT layer standards.
I am working on a lisp that automaticaly draws some tubes and fittings.First the user has to select the block where the tubes start and then he selects where the tubes has to end.Herefor i whrote this lisp..
Is it posible to show the user how the tubes gow befor chozing the second point?(A litle bit like when you stretch a dynamic block where you can see how the object will look like while preforming the stretch action).
As you smart individuals can figure out, we do up drawing packages for construction that consist of several drawings, hundreds of drawings, for several modules of construction. Our process usually consists of one layout per drawing, so that the lisp guy can do a drawing count and put in sheet numbers based on how I manipulate the list of drawings in the one directory folder.
Now I have a client, despite the way we currently do things, requires that about 70% of the drawings will have multiple layouts. Now we're back in the stone ages, manually putting in sheet numbers, eating up our budget for this contract.
how to use AutoLISP to draw lines between two points. I have x,y,z coordinates for the end points in an excel sheet which I can save as a text file. I need to pull the coordinates from the file and use them to draw the lines. There are 2000+ lines so it is not feasible to draw them manually.
I have the following string of code, that I'll write in everyone's start-up suite. I'm able to retrieve a list of files I want to modify, for whatever reason. (One example, when plotting drawings with layouts, sometimes the shadeplot setting is wireframe, and not classic hidden, though it's been set up in our templates).
The huge question is, can I get a list of drawings to a variable in one drawing, and have access to that variable list, in the next drawing I open? I'll iron out the bugs on read-only statuses, or manipulating drawing states later.
I know through the block command you can write out a selection of entities to a single drawing.But what I am wondering is if it is possible to have two drawings open, and transfer data quickly between the two?
As an example as we are detailing an assembly we create a title block around a detail, put dimensions and notes on as needed and would then like that to be transfered into another drawing next to the previously transfered detail drawing.
I'd like to create a lisp that would check my drawings for stray vertices (I only draw in full measurements per UCS), and automatically round them up to the closest whole value, or at least mark them up in circles for manually fixing them.
Is there a way of opening existing cmds in the visual lisp editor and edit them to do something else? I'd like to set up a lisp where 'uu' would switch the drawing units from decimal to architectural units and hittng 'uu' again would switch it back.
I want to draw a line which shows a particular color scheme, I at current do this by drawing a solid line of one color and then use a dashed line of another color top go over it.
The obvious problem is that these lines are being double drawn. Is there a way using lisp that I can draw both lines at once?
I am attempting to create an AutoLISP that removes all un-used drawing scales from a file, then adds the standard scales used in civil engineering. This is what I tried using:
Now, I am only a beginner to writing LISP, but I know that my problem is that it is reading the inch marks after the one in the scale name as a enter, but I don't know how to get around this. Also, I don't know how to get it to skip scales that are still in the drawing.
i have one big pipeline drawing and need to "split" it into smaller drawings..there are layers, v500, v250, v100 that represent size of pipeline.i'd like to extract all elements from layer v500 to drawing v500.dwg, after that v250... etc.
problem is that i would select only elements from v500, erase all other and than save it as v500.dwg... and then what? undo all and repeat everything with another layer?
is there a way to copy elements to another drawing and save and then return to original drawing and execute another set of commands?
I recently upgrading to ACA 2014. I have set my trusted locations, my file path, the startup suite, and the system variable to load acad.lisp on startup. Most of my lisp routines load, but not all. I still have my ACA 2011 loaded, all settings are applied as required, yet I do not have the same issue with the same lisp routines. I have to reload my lisp routines for every drawing.
How to create macros of a drawing and then hw can we change the drawing by editing the macro. E.g.. I have drawn a circle of 30 mm dia.. than need to crate macros for same and then by changing the dia of circle in macros I want to create new circle of 50 mm dia.
Another thing I wanted to ask is what is difference between visual lisp and visual basic. Which is easier??
I have to create some plines in a drawing from the inputs provided by the client. I prepared a lisp code for it. I have to use it to 1000 drawings. Every time I open the drawing and running the lisp command.
Is any lisp code to run in bulk open drawings with out entering command prompt.
The template location and file is stored in variable clienttemplate (and is not the standard template path set under options). All works okay except if I close the new drawing, when I return to the previous drawing that was current when the new drawing was created (i.e. the drawing that the routine was run from). I get the following error:
I assume this has something to do with the original routine not closing/finishing before switching to the new drawing. This is the last line of the routine:
I would like to automate drawing process for certain data. Using some LISP codes User will be asked to provide some data and using that data an automatic drawing needed to be developed at Drawing editor of AutoCAD. For example;
Enter the width of Sheet: 50 mm enter the length of Sheet: 200 mm Enter the sheet thickness: 5mm Enter type of feed: Automatic Are there holes in Strip: Yes/No Specify nu of holes: 5 Position of holes Centre: 5,5 Distance between the holes: At an interval of 20mm each
I would like to batch rename all blocks in a drawing to NEWJOB01, NEWJOB02 ,etc. I can't use wildcards with RENAME command because the old names don't always have a common name. I prefer to use a lisp routine.