Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP for batch plotting isn't working now

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
1283 Views, 8 Replies

LISP for batch plotting isn't working now

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.

I'm stumped as to why I can print manually but the LISP/script file gives me a "not found" error.

Any ideas where to look for a solution?

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

Hope this makes sense. Thanks.

8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

Please post LSP program in order to look at it.

Message 3 of 9
Anonymous
in reply to: Anonymous

Here you go.

Like I said before, I've used this routine for years without fail.

Now when the script runs, AutoCAD says it can't find the device.

When I run the PLOT command and open the dialog box, I can pick the same printer from the pull-down and I can print.

When I run the -PLOT command (note hyphen) to answer the prompts at the command line, I get the "can't find device" message.

Doesn't make sense to me right now.

Message 4 of 9
Anonymous
in reply to: Anonymous

Thanks. Looks like you are doing everything correct. I have a similar program.

 

I noticed the following:

 

For A size plots, you have (write-line "/ttdc01/HP LaserJet 5000 Series PS" fa), while for B size plots you have (write-line "HP LaserJet 5000 Series PS" fa) without the /ttdc01/. In my program, I have the slashes in the opposite direction. Not sure if this is your problem.

 

How does the string appear inside the script file you create? Does it look correct?

 

As a side note, if your borders are blocks, your lisp program could search for all occurences of this block, caluclate the opposite corners, which will eliminate the need for you to select each corner and fully automate your program.

Message 5 of 9
Anonymous
in reply to: Anonymous

My mistake.

I playing around with paths in the code and was only editing one line.

The code should only read "HP LaserJet 5000 Series PS".

I forgot to edit it back to the original before posting it.

I don't feel like the code is the problem, but I can be wrong.

Since when I plot manually I still get the "can't find device" error, it makes me think it's an AutoCAD/PC problem.

I don't like to blame the software so quickly like a lot of users do.

I'm wondering about deleting the printer and run the add-a-plotter wizard again. 

Message 6 of 9
Anonymous
in reply to: Anonymous

Try manipulating the stirng inside the script file where it sets the printer. Reverse the slashes, add quotes, maybe 2013 does not allow spaces for printer names, maybe there is an underscore that you do not see in the AutoCAD pull down printer list etc.

 

Once you get it to work, then you can change your program.

 

Good Luck. It always sucks when you discover what works in a previous version will not work in the latest version.

Message 7 of 9
Anonymous
in reply to: Anonymous

I got it to work better by copying an old .pc3 file for this printer into the support path.

Now my problem is that when I snap to the endpoints on the corners of a border,

those border lines are not included in the printing.

One thing I'll bet contributes to these issues is that this is an old workhorse printer that is outdated.

I have to use a universal driver because it is not supported anymore.

I need to get the higher-ups to look at buying a newer model.

Message 8 of 9
Anonymous
in reply to: Anonymous

Good Luck. Getting the "Higher Ups" to do anything, especially when money is involved, has always been a challenge. Lawrence Gabriel Electrical Engineering Coordinator 120 Asia Place Carlstadt, New Jersey 07072 Tel: 201.635.3438 Fax: 201.933.2144 lgabriel@whsystems.com DID: 201.635.3438 Fax: 201.933.2144 Email: lgabriel@whsystems.com
Message 9 of 9
Anonymous
in reply to: Anonymous

I would really like to get a lisp like this to work for my office, we plot our part drawings similarly and currently have to initialize the plot command 50-100 times to plot out all of our parts, our titleblocks have nodes on the corners for a pick window and we print to "FIT" on "LETTER" size pages. I tried using the supplied lisp above but when i tried substituting my printer name for the printer name above it error'd out at "INCHES" and quit the command because autocad coulnt recoginze a command named "INCHES". We dont need multuple sizes or a option to scale to fit or 1-1 only 'Letter" and "fit". Also, in the pick points part of your lisp, the object snap resets as well, i need it to snap to NODEs in order to properly size my window. Thank you for the help.

Scott

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost