AutoCAD Visual LISP / AutoLISP :: ETransmit Multiple Documents Using Scripts

Nov 27, 2012

I'm currently working on a project that requires that I eTransmit a large quantity of files, which is becoming very time consuming. I need writing a script that will allow me to etransmit all of the files at once.

My requirements:

- All .dwgs must be saved as individual .zip files with all references included.
- .zip file must have same name as associated .dwg (basically just swap extensions).

My progress:

- Seems very simple, basically my script is:

Qsave
-eTransmit
-CH
-SetupName
-C
ROADBLOCK!!!!!!! D:<

My problem is that I want to have AutoCAD return the filename sans extension and filepath when I'm prompted to input the filename for the .zip file. How can I do this? I've been looking up options using VBA, but with limited success given.

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Deleting Recent Documents From Registry (DST Files)

Dec 30, 2013

I downloaded a Copy of AutoCAD Recent Documents Manager.exe from the autodesk website and it won't run on any of the computers in our system. I was thinking about writing a LISP routine to delete the filenames with a DST suffix by replacing them with the next filename in the list. My question is If I replace the file with the next one above and the filetime,filepinned and class respectively. When I reach the end of the list can I just use "" for the file,filetime and class and integer 0 for filepinned (it looks like it requires a double).

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Mirroring Lines

Aug 27, 2013

Project involves repeatedly mirroring a line by selecting mutiple lines to do the mirroring. Probably sounds confusing.

The progress so far can be found here: [URL] ........

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Multiple Hyperlinks On Objects

Jan 11, 2013

The below adds a hyperlink to the selected object.How might it have to change to add multiple hyperlinks?

(entmod
 (append (entget (car (entsel)))
     (list
      (list -3
         (cons "PE_URL"
            (list
             (cons 1000 "..\..\90 Submittals\90-3 O&Ms\fig83-clevishanger.pdf") ; Relative Path to a pdf file.
             (cons 1002 "{")

[code]...

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Scale Multiple 3D Polylines

Feb 7, 2013

Is there a way or a lisp to scale multiple 3d polylines, at same time, and the base point is the start point of each one?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Multiple Objects

Nov 2, 2011

How to modify this routine so that I can select multiple objects as opposed to one at a time?

(Defun c:cd ()
(setq newdim (entsel "
Select Dimension to clear:"))
(setq newdimvalue " ")
(command "dimedit" "n" newdimvalue newdim "")
(princ)
)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Area Of Multiple Objects

Nov 3, 2008

I have a lisp I use to calculate the area of an object. The section below is the area part of it:

(setq ojt (entsel "Select object to get area of... "))

(command "area" "o" ojt)

(setq oarea (getvar "area"))

I want to modify it to add the areas of multiple objects. Unfortunately it is not as simple as;

(setq ojt (ssget "Select object to get area of... "))
(command "area" "a" "o" ojt)
(setq oarea (getvar "area"))

So how would I go about doing it?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Lengthen Multiple Polylines

Sep 9, 2011

Lisp (or a native way) to lengthen multiple polylines or lines at once to the same length by entering that length?  I found the following lisp routine which extends a line an entered amount, but it has to be on a specific layer, and I want to enter the finished length, not how much to extend it. 

(defun c:blen (/ lSet tmp doMode objLst actDoc)
;; *lDel global variable remembered during session
(or *lDel (setq *lDel 2.0)) ; default value
(princ "
>>> Select lines to extend/reduce <<< ")
(if (setq lSet
[code].........

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Files Same Attribute In All

Jul 5, 2012

i am wondering if it is possible to alter a specific attribute in cca 250 files? I have this template which has like 50-70 attributes,but not all of them are used. I have to change only one attribute in all of the files. For instance, i have an attribute with a specisfic tag, but the content of it is ie MARK, i want to change MARK to PETER, without having to open,click,retype,save,close every file. Is it possible to automatize it somehow? maybe lisp, batch or even VB?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Join Multiple Lines Together?

Aug 3, 2013

I want to join multiple lines together like join command but with multi selection.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Ncopy From Xrefs

Oct 14, 2013

I have been using to copy multiple objects from x-refs. The problem I'm having is that when I have the user input prompts in a macro i can screw up the command if i accidentally miss picking my selection set. I'm new to LISP and having trouble with selection sets and selection filtering.

On another note: I'm trying to rename layers copied this way to remove the "$0$" and using the rename command swapping $0$* with * works, however in the -rename command it does not.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Multiple Search Path?

Dec 17, 2013

I'm using a Lisp which searches a certain folder and then updates all blocks, which are nested in that folder.

My issue is, that I'd like to use more than one folder on different path, where the LISP can search for this files. Is there a way to use multiple search path?

The code I'm using now to search for the blocks is: (setq dir "I:\AutoCAD Blöcke\Template\Support")

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Multiple Lines

Apr 25, 2013

I need to divide thousands of lines into half, but AutoCAD divide command can only allow you to select one line at a time.Is there any way we can divide multiple lines  at once.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script On Multiple Files

Feb 7, 2012

I have a lisp routine that gathers all xrefs from the current drawing and creates a script that opens each xref, runs specific commands then saves/closes each drawing. Once all commands have been ran in each xref I would like the script to reload all xrefs in the original drawing that the script was called from. I have a reload-all lisp that is already loaded in all of my drawings but for some reason when this command is called at the end of the script it will not run.

Is there a way to have the script continue to run in the original drawing that it was called from? Or maybe even pass control back to the lisp that created/called the script? Its seems to me that the easiest thing would be to have the script continue to run after it has gone through all of the specified drawings but this is not working.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Multiple Images At Once

Sep 8, 2013

How can Attach multiple images into autocad .? at a time ..!!

Any lisp available ?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Run Command According To Multiple Choice

Oct 7, 2013

For example :

command is beginning with choices

1- choose number ... ( 10 / 20 / 30 ) :

2- choose color ... ( red / blue / cyan ) :

after choices if 1.st choice is 10 and 2.nd one is red , then run to AAA command

after choices if 1.st choice is 20 and 2.nd one is blue , then run to BBB command

after choices if 1.st choice is 30 and 2.nd one is cyan , then run to CCC command

simply like that..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Values From Multiple Blocks With Same Name?

Mar 21, 2013

This time I'm wrestling with getting the values from multiple blocks. The blocks all have the same name but at least the attributes have names this time. Each block have exactly 4 attributes, like: att1 (a number representing chronological order), att2 (some data), att3 (the actual date as a string of when the data was added), att4 (some more data)

I need to get and store the attribute's values. I was hoping to make a selectionset of the blocks and step through using the chronological order number.

At this point I have tried several combinations of foreach and ssget "x" (list (cons 2 MYBLOCK)), but I keep getting errors that I'm sure are telling me that I'm not passing the correct information to the function for iterating through. I'm banging my head.

(DEFUN c:GFOR (/ ATTLST REVBLK CNT CNT1 BLK RBLK ATTVAL ATT REV#)
(SETQATTLST(LIST "R#" "INIT" "DATE" "DESC")REVBLK(ssget "x" (list (cons 0 "INSERT") (cons 2 "REVISION")))CNT0CNT10 )
(vlax-ldata-put "dict" "RevTotal" (BLKCNT "REVISIONS")) (FOREACH BLK REVBLK (SETQ RBLK (ssname BLK CNT1)) (setq ATTVAL (mapcar '(lambda (x) (vla-get-TextString x)) (vlax-invoke (vlax-ename->vla-object RBLK) 'GetAttributes))) (foreach ATT ATTLST (SETQ REV# (STRCAT "REVISION" (1+ CNT)))
(vlax-ldata-put "dict" REV# (member ATTVAL)) (setq CNT (1+ CNT)) ) (SETQ CNT1 (1+ CNT1)) ) (PRINC))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rotate Multiple Lines Around Their Midpoints?

Jun 11, 2007

I ment midpoint instead of center.Is it possible to select several different line entities and have them each rotated around its midpoint, or end point, so afterwards all have the same direction specified by a number or specified by direction of another entity?I wish command matchprop had that rotation option in its Settings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Read From Multiple External Files?

Sep 13, 2012

Is it possible to loop through multiple files in a directory?

Like this: (setq file (open "..\TOPO QUADS\*.jgw" "r"))
 
Windows 7 x 64 Professional
Nvidia Quadro 4000
8 GB Ram
i5 2500 @ 3.30 GHz
Civil 3D 2012 SP 2
Civil 3D 2013 SP 1

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move Multiple Text To Line

May 31, 2012

I have some general knowledge in lisp coding. But I can't seem to figure this one out (even to get started). What I want to do is make a lisp that:

 - selects a line

then

 - select any amount of text (any type)

then

 - moves all the text to that selected line without rotating the text

if a line is perfectly horizontal then move the text of the y axis.

if the line is vertical then move the text of the x axis.

or there can be a prompt asking the user to chose the angle or axis in which the text will move (say if they want to move the text to a slanted line, you can choose to move the text on an angle, while keeping the same format and not rotating the text, or you can ask the user if they want to move it only vertically or horizontally)

I would really like the code to integrate into my autocad.  

See pictures

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Working With Multiple Attributes Within Block?

Aug 8, 2012

I know how to retrieve the entity information from the block, but can't figure out how to write the loop statement to loop, look for first attribute, assign to a variable, goto next attribute, assign to different variable, etc., etc...

In my research, most programs I've seen it execute the loop, assign to a variable, then print/put that data somewhere, loop again and utilize the same variable to print/put the next data somewhere. 

I would like each attribute within a block to be assigned a separate variable.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Check If Layer Is In One Of Multiple Lists

Jul 18, 2013

I am trying to write a piece of a program that gets the layers from a drawing, and checks each one against a list of layers. If the layer is not a member of any of the lists it asks the user which layer list to add it to. This is what I have so far, but every time I try to run it I get a bad argument error.

(setq layerspresent (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))(setq i 0) (repeat (vla-get-count layerspresent)(setq thislayer (vla-get-name (vla-item layerspresent i)))(cond(((progn(or(= nil (member thislayer 0list))(= nil (member thislayer detaillist))(= nil (member thislayer clearancelist))(= nil (member thislayer clearanceelist))(= nil (member thislayer doorsdrawerslist))(= nil (member thislayer hiddenlist))(= nil (member thislayer hiddenelist))(= nil (member thislayer deletelist)))));ifs((progn(initget "0 DEtail CLearance CLEarance-e DOOrs-and-Drawers HIdden HIddEn-E DELete")(setq userchoice (getkword "

[code]...

 Depending on the user's choice the layer gets written to an external file where the layer lists get their layers from in the beginning and then adds the layer to the relevant list to use later in the program.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Select Attribute Colour?

Nov 11, 2011

Lisp program, by selecting on screen multiple block attribute and to change those selected (by picking) attributes to colour 252.

At the moment, I'm using a custom macro : ^C^C-ATTEDIT     C;252;;

But if I've got a lot of attributes to change, it takes awhile to complete.

I know about BATTMAN but I do not want to change the block entities in that way. The reason I want to change the attributes to colour 252 is because here at this company we do existing drawing in colour 252 and any new equipment on its proper layer colours.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Properties On Multiple Drawings

Nov 6, 2012

Any lisp routine on how to change "Drawing Properties" (fields via Mtext) on multiple single drawing files?

There are several instances where we would need to take a project to create another one and simply change the title block description.

As of now, we are opening each drawing (there could be hundreds) and modifiying the drawing properties on each drawing to change the customer name and other project descriptions.

These are not attributes, but fields. I've researched alot on here and couldnt find anything.

The drawing is attached.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Redefining Multiple Blocks Within Drawing

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

AutoCAD Visual LISP / AutoLISP :: SSGET For Selecting Multiple Objects

Nov 27, 2012

I have this code that I wrote years ago that I want to update to select two types of civil3d objects and show them selected with grips on the screen. This function works fine

(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)
(defun cF () (CELFEATURE))

but if I add the extra object like this which I assume is the wrong syntax i only get the second type of objects. Need correct syntax I should be using for selecting more than one object in an ssget statement.

(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE","AECC_AUTO_CORRIDOR_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)

(defun cF () (CELFEATURE))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Calculate Multiple Polyline Areas?

Mar 6, 2003

I have a drawing which contains about 100 "areas". These areas are closed polylines. I would like to get a total area of all these polylines.

I have tried using AutoCAD 2002's AREA command, but I am only able to select one item at a time, (AREA, Add, Object). This is fine for calculating a few areas. It gives me a running total of each item that I select.

Using the LIST command works OK for a few items, but you still have to wade through all the other information to get the area info for each item.

Is there a way to select crossing ALL the areas that I have, and have it return a total?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Resize Viewports Across Multiple Layouts

Jun 25, 2012

Any routine to re-size viewports in multiple layouts? We have to re-size viewports as they were created a little too small and are now spread across almost 1000 drawings in 18 dwg.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Block From Multiple Layouts

Apr 26, 2012

I got a model-file with several layout tabs and I want to delete a block in all layout tabs.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Layouts In Multiple Drawings

Aug 10, 2013

I have a csv file that has the drawing names and their layout names listed in columns A and B. Before I begin a project, I have to create the Sheet List (in Excel) and the csv file. The csv file is needed because I have a lisp routine that reads the csv and updates all my Title Block attributes in all my drawings. (VERY sweet program)  What I'm wanting to do, is create new layouts (using my dwt) based on the information in the csv file. So, when I start a new project all I need to do is create the base drawing files first. Then, in my csv file I've got those drawing names listed in Column A and their corresponding sheet titles (Layout names) in Column B. I run the lisp and it reads the csv and creates layouts in all those base drawings and naming the layouts with the sheet titles from column B.

Column A                                                      Column B
DRAWINGS                                                 SHEET TITLES
drawing1.dwg                                               A100
drawing1.dwg                                               A101
drawing"n".dwg                                            "n"500
Etc, etc.

I'm needing a way to automate creating hundreds of layouts at once. (very time consuming).So the lisp has to be able to read a csv (or Excel--doesn't really matter) and create new layouts (using my dwt) in as many drawing files represented in column A. [and filtered so it doesn't create duplicates so I can run the routine at a later date when new sheets are added to the drawings] Captcha?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating A Script To Run Multiple Routines?

Apr 17, 2012

I have hundreds of drawings I want to run through scriptpro with a script calling 3 different lisp routines.  I have the 3 lisps working independantly but can't figure out how to get them to all run in one script.

Two of the Lisps are for redefining the title block in 2 different types of drawings that have different title blocks.  The last lisp locks all viewports in all windows.  I'll attach the 3 lisps I'm trying to merge in the script.  I am not very versed in scripts and lisps so I'm guessing at least 2 of these lisps could be merged into a single lisp...

Here is what I have for the script file contents (which doesn't work):

(load "redefine100")

(load "redefine102")

(load "vlocker")

View 1 Replies View Related







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