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
ADVERTISEMENT
Sep 5, 2013
AutoDesk released the dgnpurge tool a while back but it only applies to 2013 and 2014 and i have 2012. There appears to be a solution dgn purge 2012 on the swamp website, but the attachment is not there and there is some sort of C# code or something beyond my knowledge of autocad.
View 3 Replies
View Related
Mar 18, 2013
Attached LISP will toggle the 'Display Plot Styles' for all layout tabs or the current layout tab. In 2010 it would not affect model space.
With 2012, AutoCAD added 'Display Plot Styles' as an option on the model space tab. This routine now affects that tab.
How to make it not change this setting for the model space tab?
View 2 Replies
View Related
Sep 19, 2011
Why Autocad 2011 and Autocad 2012,Will occur on some computers,Can use the "_.layer" be executed,Some do not?Because on the Autocad 2006 can be executed.
View 1 Replies
View Related
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
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
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
Oct 18, 2002
How can you open a drawing read-only with autolisp.
View 9 Replies
View Related
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
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
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
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
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
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
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
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
Aug 9, 2013
I need lisp that draws rectangle between two lines by window selection. As attached.
View 3 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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
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
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
Mar 23, 2003
I have a lisp routine that uploads all the blocks contained within a specific folder and inserts or redefines all blocks of the same name within the current drawing.
My problem is that when I run the routine I prompts me that it can't fine the folder? I created a folder called "blocks" and is located straight onto my C:..........but it still doesn't work.
;FUNCTION TO UPDATE ALL BLOCKS WITHIN A DRAWING
;FROM A SPECIFIC DIRECTORY
(defun c:bup()
(SETVAR "cmdecho" 0)
(setq sst (ssget "X" (list (cons 0 "INSERT"))))
(setq c1 0)
[code].......
View 3 Replies
View Related