Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic plot macro

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
cncah
1892 Views, 8 Replies

Automatic plot macro

I am needing a macro for automatically plotting multiple models that are in the same dwg file. I am including the dwg file, because it will be hard to explain exactly what the models are. Basically it is a dwg file of some nested sheets to run on a cnc router. I wrote a macro that will allow me to manually window each "nest" and send that to the printer, then repeat until I'm finished. I could set what dimensions I needed for each window, but each time I nest out a job, the number of nests varies. What I am wondering, is there a way to have the autocad "look" at the overall number of nests  in the model and window the nest, center that in the paper that prints out, then move onto the next one until it has plotted all of the nests? I am new to writing macros, and have absolutely no understanding of lisp or vba. Also, here is the macro I wrote for manually windowing the plot. If there is a way to set the window dimensions, then offset those dimensions in the Y axis a certain number of times that would still be easier than what I've been doing. Any help is appreciated. Even if the advice is telling me that I'm S.O.L. Thanks in advance.

 

*^C^C-plot;yes;;;;;;;w;\\fit;;yes;;;;;;y;

8 REPLIES 8
Message 2 of 9
dmfrazier
in reply to: cncah

"Any help is appreciated. Even if the advice is telling me that I'm S.O.L."

 

Well, I would never tell you that (as practically anything you can do manually can be automated), but I'm afraid the work that would be required is way out of scale, especially considering there is already a built-in way to do this.

It sure looks like this would be a lot easier if you set up a Layout tab for each "sheet" in the model and use PUBLISH to "batch" plot them!  Is this not an option for some reason?

Message 3 of 9
cncah
in reply to: dmfrazier

The company I work for uses Solidworks for all of our design work and drawing creation. So I'm not familiar with how to set-up my own layout format. I ran another job through the nesting software and saw how it created a Layout1 tab at the bottom of the screen nest to the model tab. The job has 4 nested sheets in the model overall and it placed all 4 sheets on the one Layout1 tab. Is there a way I can set the layout to only place one nested sheet on each layout tab? I'll enclose this new dwg file that I have.

Message 4 of 9
dmfrazier
in reply to: cncah

"Is there a way I can set the layout to only place one nested sheet on each layout tab?"

 

You bet there is.

Your situation is a little unusual (at least for me), but I think all you really need to know is what is the print device (driver, file output type, etc.) and what is the "sheet size" to apply to the layout.  This is done in the Page Setup Manager (right-click with your mouse on the Layout tab you want to set up).

Message 5 of 9
cncah
in reply to: dmfrazier

So instead of the sheet size being 8.5x11, I lie to it and tell it is only a certain size to get it to break the model up and place each nest on individual layouts?

Message 6 of 9
dmfrazier
in reply to: cncah

You will be setting up a Layout tab for each "nest" in the model.  Four nests in the DWG = four Layouts.  If each nest is to be plotted the same way, then each Layout can be set up exactly the same way as far as plot settings, but each Layout will be "looking at" (displaying, via a viewport) a different part of the model representing an individual "nest". You can set up one Layout, then copy and modify it for the others.

Does that make sense?

 

Message 7 of 9
pendean
in reply to: cncah

Create a VIEW for each location you want to plot in your file.
-PLOT using the VIEW>Name option about 2/3 of the way down of the long questions list (you seem to be p-lotting FIT, so scale means nothing to you which is fine).
Stay consistent with your VIEW names through all your files and your headaches should be fewer than your current method.
Message 8 of 9
cncah
in reply to: pendean

I could, but that isn't a click once and done solution. I ended up writing some long winded macros that will do a window at coordinates that I specified, and plot. I ended up with about  12 different macros for different sheet sizes and different quantities of nests. They work awesome so far, and as long as my spacing doesn't get changed in my nesting software, the nested sheets will always come in at the same coordinates every time. Thanks for the help.

Message 9 of 9
dmfrazier
in reply to: cncah

Although you seem to have arrived at a solution that works for you (in the short term), I hope you will take the time to learn about setting up Layouts as I began to describe in my earlier posts.  If you do, I think you will discover that it provides a better long term solution.

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

Post to forums  

Autodesk Design & Make Report

”Boost