Why is Plotting in VBA so slow

Why is Plotting in VBA so slow

Anonymous
Not applicable
684 Views
8 Replies
Message 1 of 9

Why is Plotting in VBA so slow

Anonymous
Not applicable
Why is Plotting in VBA so slow. Are there any workarounds for this.

Here is the print routine that I am using. Later I am going to loop this through many drawings. Using ACAD 2007

Here is the code.

Sub Printdrawing()
ThisDrawing.ActiveLayout.ConfigName = "\\Tasdc01\HP Laserjet 8000 Series PCL"
ThisDrawing.ActiveLayout.PlotWithPlotStyles = True
ThisDrawing.ActiveLayout.StyleSheet = "TAS-Std.ctb"
ThisDrawing.ActiveLayout.GetWindowToPlot Min, Max
ThisDrawing.ActiveLayout.SetWindowToPlot Min, Max
ThisDrawing.ActiveLayout.PlotType = acWindow
ThisDrawing.ActiveLayout.SetCustomScale 1, BScale
ThisDrawing.ActiveLayout.CanonicalMediaName = "11x17"
'ThisDrawing.Plot.DisplayPlotPreview acFullPreview
ThisDrawing.Plot.PlotToDevice

End Sub

Thanks
0 Likes
685 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
Turn off background plotting.

Rant #1: Why are you still plotting by window? What is wrong with using the
Layout option? If you used the Layout option, you could use Publish and get
rid of your code. Then, if you can use Publish, you make it easy to use SSM
to publish your sets.

--
R. Robert Bell


wrote in message news:5417362@discussion.autodesk.com...
Why is Plotting in VBA so slow. Are there any workarounds for this.
0 Likes
Message 3 of 9

Anonymous
Not applicable
R. Robert Bell said the following On 12/7/2006 9:14 AM:

>
> Rant #1: Why are you still plotting by window? What is wrong with using the
> Layout option? If you used the Layout option, you could use Publish and get
> rid of your code. Then, if you can use Publish, you make it easy to use SSM
> to publish your sets.

Amen to that....



--
R.K. McSwain
http://rkmcswain.blogspot.com
0 Likes
Message 4 of 9

Anonymous
Not applicable
I would love to, unfortunately I inherited 6 years of cad data with no standards what so ever. The only consitent thing about all of the drawings is the title block. I have setup standards and so forth for all future (New) projects, but as far as our existing standard product lines I have to deal with what I got.

Therefore in this routine I am finding the bounding box of the border and it's scale factor. I am then using this to set my print setting to print it out.

I love the publish command and works on all of our new drawings(The ones that got done since I took over.)

Zuccus
0 Likes
Message 5 of 9

Anonymous
Not applicable
Sorry,

Forgot to mention that turning off the background plotting was the answer to my question thanks.

Zuccus
0 Likes
Message 6 of 9

Anonymous
Not applicable
R. Robert Bell wrote:
> Turn off background plotting.
>
> Rant #1: Why are you still plotting by window? What is wrong with using the
> Layout option? If you used the Layout option, you could use Publish and get
> rid of your code. Then, if you can use Publish, you make it easy to use SSM
> to publish your sets.
>

Correct me if there's a way of doing this, but it's because the scale to
fit option & centre plot options are greyed out so can't print down to
A3 or even accurately at A1.

Ta
Dave F.
0 Likes
Message 7 of 9

Anonymous
Not applicable
???

Do you mean that you have a layout that is set up to plot to a larger sheet,
and you run into trouble when you want to plot that layout reduced?

If that is where you are hung up, it means that you haven't created a name
page setup that does the reduced plot, just by selecting it.

I'm attaching a drawing where the layout plots in Arch E1 size (sorry, I'm
in the US). But if we want to plot to an 11x17, we simply run the plot
command and select the 11x17 page setup. Don't need to change the layout
itself, don't need to window, or center, or fit.

Took a small bit of work up front, to determine the needed settings to get a
good 11x17 plot, but once I did, and added it to the template, I'm done.

--
R. Robert Bell


"Dave F." wrote in message
news:5419498@discussion.autodesk.com...
R. Robert Bell wrote:
> Turn off background plotting.
>
> Rant #1: Why are you still plotting by window? What is wrong with using
> the
> Layout option? If you used the Layout option, you could use Publish and
> get
> rid of your code. Then, if you can use Publish, you make it easy to use
> SSM
> to publish your sets.
>

Correct me if there's a way of doing this, but it's because the scale to
fit option & centre plot options are greyed out so can't print down to
A3 or even accurately at A1.

Ta
Dave F.
0 Likes
Message 8 of 9

Anonymous
Not applicable
R. Robert Bell wrote:
> ???
>
> Do you mean that you have a layout that is set up to plot to a larger sheet,

I have a lout with an ISO A1 size title block. I sometimes want to print
it out on paper of size ISO A3, which is smaller.

> and you run into trouble when you want to plot that layout reduced?
Only if I were to use the Layout option of the Plot Area in the plot dialog.
>
> If that is where you are hung up, it means that you haven't created a name
> page setup that does the reduced plot, just by selecting it.
Yes I have, but I've set them to plot to Extents instead of Layout
because it allows me to plot to "fit to paper" which, as I said, is
greyed out when using Layout.
>
> I'm attaching a drawing where the layout plots in Arch E1 size (sorry, I'm
> in the US).
That's OK, I forgive you 🙂

But if we want to plot to an 11x17, we simply run the plot
> command and select the 11x17 page setup. Don'
> t need to change the layout
> itself, don't need to window, or center, or fit.
>
> Took a small bit of work up front,
Believe me, to reduce the size of the plot, it's much easier using
Extents/Plot to Fit. None of the tedious fiddling about that you
obviously had to do to work out a custom scale of 1:3.899 & a Y offset
of 0.1723!

No matter what printer you send it to, Plot to Fit will ensure it fits
on the paper!

I work in a company that has a dozen different printers all with
different margin sizes. To work out the custom scale for each of them,
as you did, would be a waste of time.

to determine the needed settings to get a
> good 11x17 plot, but once I did, and added it to the template, I'm done.
>

Cheers
Dave F.
0 Likes
Message 9 of 9

Anonymous
Not applicable
It wasn't as bad as you make it out. Take the worst-case margins. An Excel
spreadsheet gave me all the needed parameters in less than 10 minutes.

--
R. Robert Bell


"Dave F." wrote in message
news:5420651@discussion.autodesk.com...
R. Robert Bell wrote:
...Believe me, to reduce the size of the plot, it's much easier using
Extents/Plot to Fit. None of the tedious fiddling about that you
obviously had to do to work out a custom scale of 1:3.899 & a Y offset
of 0.1723!

No matter what printer you send it to, Plot to Fit will ensure it fits
on the paper!

I work in a company that has a dozen different printers all with
different margin sizes. To work out the custom scale for each of them,
as you did, would be a waste of time.
0 Likes