AutoCAD Visual LISP / AutoLISP :: Batch Plotting Isn't Working

Jun 15, 2012

I recently upgraded to a new PC.

We get a lot of files from customers where there are multiple drawing borders all in model space.

Sometimes as many as 150-200 borders in one file that we need to print for the shop floor.

Years ago, I wrote a LISP routine that prompts for printer settings (Fit or To scale, etc.) and then prompts for

2 corners of each border and then writes a script file and launches it to batch plot each drawing.

My thinking was that I had to manually pick each drawing anyway, this LISP routine saved me from having to issue the plot command over and over.

Anyway, since my PC upgrade, the LISP routine fails.

There is a line of code that answers the plot prompt for output device name where I have the same printer as always.

When the script runs up to that line, AutoCAD tells me that printer is "not found".

So then it keeps reading the rest of the script lines which answer other plot prompts and repeatedly says "device not found".

If I manually print, I can choose the same print settings in the dialog box that the script file has and it can "find" that same device.

Why I can print manually but the LISP/script file gives me a "not found" error.

BTW, when I upgraded my PC, I also upgraded AutoCAD from 2012 to 2013..

View 8 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Routine During Batch Plotting

Jun 17, 2013

I cannot get my lisp routine to run when I batch plot in AutoCAD 2014.  It's loaded into the startup suite and runs when I open the individual drawings but not during a batch plot.  How can I get this to run during a batch plot?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Plotting Lots Of DSD Files

Apr 26, 2012

Is there any way for me to choose a bunch of .dsd files, and have those be batch plotted?At the moment I have to publish one .dsd file at a time, and each .dsd file can take about 10 minutes to go through all the layouts I have.

Does Autocad have that capability built in? Or is this a problem that can be solved with scripts?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plotting All Layout Tabs

Jul 22, 2004

Any lisp file that can plot all of the layout tabs? I am looking for one that will plot to a plt file and also pdf?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Plotting Parameters With Vlax

Nov 18, 2013

the names of the function to establish the plotting parameters using the (vlax-get-property <name> <parameter> ) method.  For example the plotting device name is obtainable by (vlax-get-property <objectname> 'Configname).  

What "words"/parameters do I use to find the plot orientation and paper size?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Convert DGN To DWG?

Nov 23, 2011

My work needs to convert thousands of DGN files to DWG. We are using AutoCAD 2012. Is it possible to batch convert dgn files with a LISP and a mapping file?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export To DGN For Use In Batch?

Nov 11, 2011

I am trying to make a lisp to export to dgn for use in a batch. I have tried the following but get hung up at an "invalid path" error. I think I am not passing to -dgnexport a path in the correct format.

(defun c:deport()
(setq fname (getvar "dwgname"))
(setq fpath (getvar "dwgprefix"))
(setq dgnname (vl-string-right-trim "." fname))
(setq dgnnamenew (strcat fname ".dgn"))
(princ dgnpath)
(command "-dgnexport" "V8" dgnnamenew "master" "standard" "C:ProgramDataAutodeskACA 2011enuTemplateAutoCAD
TemplatesV8-Imperial-Seed3D.dgn"))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Prevent From Open Adobe Reader While Plotting DWG To PDF?

Nov 20, 2013

I have one function which generate the PDF file using COM API.

That function works fine and generated the PDF successfully.

Only problem is after generating the PDF, Adobe Reader is opened to display that DWG file which I have plotted.

so is it possible to plotting to PDF file without opening Adobe Reader?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Replace Blocks

Feb 22, 2012

We've recently converted all our microstation drawings to autocad now that the company has decided to go with one cad program company wide.

One of the issues we are having after getting the drawings back from the this co. converting them is the cells to blocks convertion inside the drawing. when we open a drawing and see a "Fuse" block for instance and if it a has multiple inserts, it named them:

Fuse
Fuse_1
Fuse_2 etc....

is there a lisp routine or some command that would replace the "Fuse_*" blocks with "Fuse"..I've been searching the forums and know about the express tool Replace Block but need to be able to automate somehow.

I thought about trying to rename each of the "Fuse_*" but of course it won't let you rename to a block name that already exists..

View 1 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 :: Batch Block Attributes Inputs

May 9, 2013

I have 40 pages in one set of drawings and would like to rev-up the drawings. i will put same texts in same locations in the title blocks.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Rename Using Attribute From Title Block

Oct 22, 2009

I am working on a large project where a 3rd Party firm has turned over 100s of drawings that we need to get into our system. The problem is that they did not name their physical files properly. We have a particular numbering system for our drawings, the engineering firm did fill in our attributed title block properly and used our numbering system correctly within the drawing. However, their physical file name follows their format. We need to have the physical file name match the information in the title block to get into our system.

Is there a way to "Batch Rename" these files by reaching into the title block and then renaming the physical file to match the attribute?

I have to be honest, I may use AutoCAD 50 to 60 hours per week, but I am no programmer! I am just the go-to person here for AutoCAD whom is stuck trying to come up with a efficient solution for the project team whose engineering firm could not follow our procedures! I was hoping some sort of batch routine could take care of this problem for us instead of us having to individually rename each physical file one by one.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Running A Batch File - Automated Process?

Aug 15, 2012

I have a batch program which I want to launch from a LISP program.

First this is an attempt at an automated process whereby user input is extremely restricted. Other than the first click of the mouse on the menu item to save a copy of the file to a very restricted folder, no other user input is allowed.

AutoCAD, like most commercial apps writes a temporary file and then renames it when you choose save or saveas. And due to the restrictions in this folder that will not work. Crazy, I know but it's the parameters I must work within.

The batch file I'm launching calls another batch program in it's execution and I'm wondering if that could be where control is lost. But the thing is I can type this at the command line in AutoCAD:

(startapp "//a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat")
 
The whole process works great. The command window flashes briefly AutoCAD closes the active drawing window just like I want it to. And when I check that the dwg file has been copied to the restricted folder it's there and done. But when I place that same command within my LISP program or one like this:

(command "._STARTAPP" "CMD //a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat")or(command "._STARTAPP" "CMD ""//a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat"")
 
or just about anything else I try it fails to run. Perhaps I've been looking at this problem too long. I think I may move on to a VB.NET process to do this but I am really baffled why it will run from the command line but not within the program.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Update Layer State In All Viewports Across Multiple Files

Nov 8, 2013

I'm creating a drawing set that has over 100 sheets with varying amounts of viewports on each sheet (from one to four). Each sheet is its own file, so there is only one layout per file. For each section of the drawing set, the viewports will have the same layer state.

Is there were a way to update the layerstate of each viewport through a batch LISP routine? This would save me DAYS in opening each file, importing the layer state, and restoring it for each viewport. It seems straight forward, but I have no idea where to start with batch routines.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 2013 ENTUPD Not Working

Mar 22, 2013

I upgrading all our lisp routines to 2013. I have a routing that modifies a block attribute. Then ENTMOD returns with the proper information. ENTUPD reurns the same enity name. The block never changes. The same routine woks in 2010.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine No Longer Working In 2014?

Sep 4, 2013

One of our users has recently upgraded from AutoCAD 2005 to AutoCAD 2014. He has a LISP routine that will no longer work and I'm not sure why.

View 9 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 :: Passing A Point To Zoom Not Working?

Jul 25, 2012

The good news is that, if I were righting a routine that locks up AutoCAD, I'm finished.  The bad news is that I'm not.

The code below is the portion of a routine where I have the user select 2 points and then pass those points to the Zoom command and the M2P osnap.  The problem is that, when the Mid Between 2 Points osnap tries to use the first point, it returnns an "Invalid point" message, enters a loop and locks ACAD.

(defun C:ZC ()
(setq PointOne (getpoint "First point of M2P "))
(setq PointTwo (getpoint "Second point of M2P "))

[Code].....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getenv Setenv No Longer Working

Apr 30, 2012

Should SETENV/GETENV be writing/reading to and from the System Registry?

After installing ACAD 2013 as a trail this now seems to be the behaviour, only found it when GETENV calls started to fail. This has also affected previous versions installed on the same workstations.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Justification Alert Message Not Working

Aug 28, 2011

lsp.I could not able to  find error.

(defun c:t5()
(setq entname (entget(car(entsel))))
(setq thjh (cdr (assoc 72 entname)))
(setq tvjv (cdr (assoc 73 entname)))

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Copy And Rotate Macro Not Working In 2013

Apr 29, 2012

I have a macro that i have been using in autocad 2012 for a simple copy & rotate command as follows

^C^C_select;auto;\_copy;p;;0,0;0,0;_move;p;;\_rotate;p;;\redraw

For some reason it now does not work in 2013 the macro exits after the copy part of the macro is finished & fails to let you rotate the copied object.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Checking For Existence Of Drive Using Code Not Working?

May 2, 2013

I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)

(if (vl-file-directory-p "C: en") T)(alert "exists"))

 I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
 
(if (vl-file-directory-p "C: en") nil)(alert "exists"))

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Error / Bad Argument Type - Code Still Working

Jul 23, 2013

My code returns the error, but it still works.

    (vl-load-com)
    (setvar "cmdecho" 0)
    (vlax-for ucs (vla-get-UserCoordinateSystems (vla-get-Activedocument (vlax-get-acad-object)))
    (setq UCSList (cons (vla-get-Name ucs) UCSList)))
    (setq FileName (vl-Filename-Base (getvar "Dwgname")))
    (setq NewUCSList (vl-remove-if '(lambda (x) (vl-string-search FileName x)) UCSList))
    (setq Listlength (length NewUCSList))

[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: User Select In Button Marco Not Working In 2014?

Jul 29, 2013

I have various Button macros with the user input select in them, but in 2014 they dont seem to be working anymore.

they worked in 2013.

It just says invalid selection.

example

^C^CSelect;change;p;lt;phantom;;

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script File To Open Multiple DWG File Not Working In 2012

Dec 22, 2011

I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

Jul 12, 2012

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, how to create one? 

See Continuous dimension attachment for example.

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

Nov 14, 2013

I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg").  how would i go about doing that using LISP?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening Drawings With Default Visual Style Set To 2D Wireframe

Oct 7, 2013

Is there a way to programatically set a visual style before a drawing actually opens?

We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings.  Some models will crash on some workstations when trying to open in a rendered mode.

I found a lisp with a function that looked to set viewport visual styles.  But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

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.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combinations In DCL?

Sep 7, 2012

Is it possible to execute a certain command based on multiple selections withinin a dcl?  for example:  two radio colums, one with selections A and B, and a second with selections 1 and 2.  is it possible to program commands based on user selections from each column?  ex: if A and 1- do a command.  A 2- do a different command, etc...

I tried :

 (action_tile "key1" "(setq A t")
 (action_tile "key2" "(setq B t")

 (action_tile "key3" "(setq 1 t)(done_dialog)")
 (action_tile "key4" "(setq 2 t)(done_dialog)")

(if
(and (a) (1)
)
(command ...

but was unsuccessful.  no matter which combination was selected, the command under all combinations would run.

View 2 Replies View Related







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