Jump to content

Recommended Posts

Posted

Hello.

 

I'm trying automate the plotting process (which creates .pls files) however I need open full preview window to confirm that everything fits into the window before it proceeds.

 

Is there a way open full preview window from AutoLISP or at least open plot window?

 

The same command "^C^C_plot" that used in plot button acts differently within AutoLISP (command "_plot")

Posted

Im not firmilar with .pls file types.

 

What are you using to plot to a .pls file?

Posted

I believe the plot preview using LISP has been discussed previously.

 

Please use the search function to see if you can find something.

Posted
Im not firmilar with .pls file types.

 

What are you using to plot to a .pls file?

Ops, typo, I meant .plt

 

 

 

I believe the plot preview using LISP has been discussed previously.

 

Please use the search function to see if you can find something.

Nope, my search didn't return any useful information...

however after more research I found how to force plot window to show up:

(initdia)
(command "._plot")

Preview shows with:

(preview)

The last thing I need is how to set window selection coordinates for preview?

Currently I do in these steps:

1) ask user to window select area of the drawing for plotting (pickpoint + pickcorner)

2) plot to a temp file using detailed config, which allows set coordinates

3) show preview

4) plot to a user selected file

 

It works very well for my needs, but if I could eliminate step 2 it would be perfect.

 

Any suggestions?

 

Thank you.

Posted

If you really want to automate why not set up you templates so plotting layout works instead of having to pick a window each time? Mine layouts work with either layout or centered plot view. I have Page setups for either sending to plotter or PDF for those layouts. I've added a button to Toggle "Display Plot Styles" using a lisp by Tim Creary found at: http://forums.augi.com/showthread.php?t=75802&highlight=ShowPlotStyles#3 so I've never felt the need to see a preview, I already know exactly what's going to come out when I OK in click plot.

Posted

Well, the problem is the hardware/software I'm using, it's so old that it only sees the boundaries I set in the plot file. That means if a part is 12" x 60" and instead of selecting boundaries for that part as 12" x 60" I set to the max available size (i.e. 300 x 70) then the plotter software would show the drawing as 300x70 (although it would plot the part at correct size), but at least visually when I go through files, I won't be able to tell how much material I need for this or that plot file.

 

Also, the lover left corner of the boundaries I select is the 0x0 coordinates for the plotter.

 

Hell, at the moment I'm stuck with AutoCAD R14 because it's the last version that has driver for our plotter...

Posted

Hi there!

 

Just a few words concerning (initdia), (command "._plot") using PDF format! (using autodesk dwg to PDF.pc3, i think it is the same with others)

 

I cannot say for sure if it applies to your version, but that bug was in 2013, 2014, and is still in 2015.

IF the pdf file already exists, CAD does NOT ask if you want to overwrite the file, then gives the "Plot and published Job completed No errors or warnings found" BUT if you click on the details, you see that the plotting was actually Canceled, and the PDF was not overwritten.

 

Job: - Canceled

 

Date and time started: 2015-04-14 15:39:56

Date and time completed: 2015-04-14 15:39:59

Total sheets: 1

Sheets plotted: 0

Number of errors: 0

Number of warnings: 0

 

I've opened a thread on autodesk about that, never had any replies.

This can lead to very, very catastrophic results :x

Posted

Thanks for the information. Luckily it doesn't apply to my case - using acad2k and no pdf involved :) . When creating .plt files it does ask for overwrite confirmation.

A simple work around that bug could be check if file exists, rename it if so before proceed with plot, then delete it if a new file was created or rename it back if plot failed.

 

 

 

Anyhow, I'm still looking for a solution to set window coordinates for (preview)

  • 3 weeks later...
Posted

thanks for the suggestion.. would take some more ifs, to avoid trying to delete the pdf if someone else has it opened for instance. I was waiting for a "fix" from autodesk, reinventing the wheel to avoid what is clearly a bug seemed like a time loss. At that time i took a different approach, maybe ill revise my code one day.

 

As for your solution to set window coordinates for preview (which can be the coordinates of the window in a window type plot area) you can take a look at the GetWindowToPlot Method

using (vla-SetWindowToPlot (vla-get-ActiveLayout doc) pointTemp1 pointTemp2) will set the window boundaries... one way of skinning the cat.

 

You still need to modify the scale to make all the window appear in the preview if you are not set to "fit to paper", or change it to "fit to paper".. can be achieved in activex easilly.. (vla-put-PlotType (vla-get-ActiveLayout doc) acWindow)

 

Good luck and cheers! :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...