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.

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Segregate Closed Polylines In Drawing By Area Range?

Mar 21, 2013

I need to segregate closed polylines in my drawing by area range. Ideally, I would input the number of ranges I need.

Then somehow find the smallest and largest pline area to determine the range values (rounding up to a sensble number)

Then with the ranges determined the polylines would be segregated and moved to new layers.

I've been trying to hobble together pieces but with no joy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert List Of Numbers To A Range Of Missing Numbers

Jul 18, 2013

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

(Get_Missing List_DN)
return
4,8-9,13-16

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Outline / Contour Of End Of Pipe To Stretch Flatten 2D Model

Aug 17, 2011

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?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Saveas Drawing With Default Drawing Name

Oct 13, 2013

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.

(defun c:client ()
(setq old-echo (getvar "CMDECHO"))
(setvar "cmdecho" 1)

[Code]...

I don't have any experience with LISP or any other programming. I have just been cobbling this together from bits and pieces I have found on the web.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Another Drawing Layout Tabs Contents In Current Drawing

Mar 7, 2013

I want to insert another drawing layout tabs contents in current drawing.

It's easy for MODEL tab, but for LAYOUT tabs, I dont know how!?

I prepared a code for INSERTING MODEL tab in current drawing:
 
(defun INS_DWG (TAB path dwg P / blk)(setq blk (strcat ""*" path dwg """));(setq N (vla-get-count (vla-get-layouts)));;Number of LAYOUT TABS in dwg(if (or(= TAB 0) (= TAB nil))(command "INSERT" blk P 1 0)); TAB=0 or omitted ==>Insert MODEL;(if (= TAB 1));==>Insert the 1st LAYOUT in dwg file;(if (= TAB 2));==>Insert the 2nd LAYOUT in dwg file;and so on....);;;usage:;;(INS_DWG 0 "c:\test\" "test.dwg" '(0 0))

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All OLE Objects From Drawing

Nov 26, 2012

how to delete all OLE objects from drawing by most efficient way.

There are abt 150 drawings, each has from 2 to 20 or so OLE objects which need to be deleted. OLE objects are on many paper spaces.

I tried to use qselect but it selects only what is in current space.

Would need some lisp or some other methode than all can be deleted (excluding those which resides in blocks).

Tried also yto use ssx and then erase but still it deletes only what is on current space.

Just as additional info, those OLE are all pictures, not xls files for example.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Drawing Read-only?

Oct 18, 2002

How can you open a drawing read-only with autolisp.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Text To All Dtext In A Drawing

Oct 7, 2011

Any lisp routine out there to append (prefix) text to dtext?

i have 100s of dtext that has numbers in them, and i need to place the "#" symbol in front of them now.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert One Or Another Block Into Drawing

Apr 22, 2013

I am trying to insert one or another block into a drawing, and i need to do this 8 times per drawing. 

(defun C:detector (/ filename gas pressure)
(repeat 8 (initget 1 "Gas Pressure")
(setq filename (getkword "
Enter Detector Type [Gas/Pressure]: "))
(if (= filename "gas") (command "-insert" "*T:\acad\schematic_circuits\suny\sunygasdetectornew.dwg" pause "" "")
(or (if (= filename "pressure")
(command "-insert" "*T:\acad\schematic_circuits\suny\sunypressuretransmitternew.dwg" pause "" ""))
) ;;end or
) ;;end if
) ;;end repeat
)

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Showing Tubes While Drawing

May 27, 2012

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..

(defun c:test () ;;------------=={ Set Dynamic Property Value }==--------------;;;;;;;; Modifies the value of a Dynamic Block Property ;;;;-------;;;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;;;---------------------;;;; Arguments: ;;;; block - VLA Dynamic Block Reference Object ;;;; prop - Dynamic Block Property Name ;;;; value - New value for Property ;;;;------------------;;;; Returns: Value property was set to, else nil ;;;;-------------------;;(defun LM:SetDynamicPropValue ( block prop value ) (setq prop (strcase prop)) (vl-some (function (lambda
[code]....

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).

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Number Of Layouts In Another Drawing

Oct 4, 2013

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.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Use It For Drawing Lines Between Two Points

Aug 19, 2013

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.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Of Drawings From One Drawing To Next

Dec 5, 2012

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.

(defun GetDrawings ()
(setq currentpath (getvar "dwgprefix"))
(command "pspace")
(setq DrawingList (dos_getfilem "Select a file" currentpath "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||"))
(setq ListOfDrawings (cdr DrawingList))
(setq DrawingPath (nth 0 DrawingList))
[code]...

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Exports Entities From One Drawing To Another

Oct 2, 2011

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.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rounding Up Drawing Measurements To The Next Whole Cm

Jul 30, 2013

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.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Drawing Rectangle Between Lines

Aug 9, 2013

I need lisp that draws rectangle between two lines by window selection. As attached.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Start It With No Drawing Open?

Nov 13, 2001

can you start autocad with no drawing open ?

i would think that some type of script would work or could you change your target on a shortcut?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Toggle Drawing Units

Nov 28, 2013

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.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Drawing Two Different Lines Over Each Other In One Step

Dec 5, 2011

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?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Annotative Drawing Scale

Apr 26, 2012

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:

;;;Add Engineering Scales
(defun C:AES ()
 (command ".CANNOSCALE"
   "1" = 1'"
 (command "-scalelistedit"
[code]...

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.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Parts Of Drawing To Another DWG

Oct 1, 2012

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?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Two Lines In Drawing - How To Flatten

Jun 19, 2013

There are two lines in attached drawing. It seems FLATTEN doesn't work on them. How can I flatten them with lisp code?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reload Routine For Every Drawing

Oct 16, 2013

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.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create Macros Of A Drawing

Aug 6, 2012

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??

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create Some Plines In A Drawing

Sep 10, 2013

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.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating New Drawing With Specific Template

Sep 20, 2013

I have some code that starts a new drawing with a specific template from a lisp routine

(defun ghd:load_newdwg (template / ae-acad-object newdwg)
  (setq ae-acad-object (vlax-get-acad-object))
  (setq newdwg (vla-add (vla-get-documents ae-acad-object) template))
  (vla-put-activedocument ae-acad-object newdwg)
)

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:

Command: ; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Unknown exception occurred
; warning: unwind skipped on unknown exception

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:

(cond ((= startnewdwg 1) (ghd:load_newdwg clienttemplate)))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer Name And Description As Text In The Drawing?

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

AutoCAD Visual LISP / AutoLISP :: Automated Drawing Using Input Data?

Jul 4, 2013

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 just need a LISP code for such program.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Rename All Blocks In Drawing?

Feb 29, 2008

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.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Electrical 2012 / How To GET And SET Drawing Descriptions

Nov 16, 2011

how to programatically in AutoLisp GET and SET the drawing descriptions from Drawing Properties (Description 1, 2 and 3) in AutoCAD Electrical 2012 ?

I need change this values ​​through a script in LISP.

View 2 Replies View Related







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