Jump to content

Plot issues with VBA

Recommended Posts


Hey everyone.


I am working on a vba plot tool that I am having a few issues with.


I was having trouble setting the paper size and after a ton of searching I found the "blad" section of coding which seems to be working with the exception of the sheet style. Maybe it should be plotstyle?


My other main issue is that when I run this module, it takes 30 seconds or so before it prints. What is causing the delay? I have no loops or arrays, so I'm not sure why its taking so long.



Public Sub Plot_11x17()
Dim PntrName As String
Dim CTBhalf As String
Dim blad As AcadLayout

PntrName = UserForm1.PntrName.Value
CTBhalf = UserForm1.CTBhalf.Value

'Set Values
Set blad = ThisDrawing.Layouts.Item(layout1)
ThisDrawing.ActiveLayout = blad
blad.ConfigName = PntrName
blad.CanonicalMediaName = "11x17"
blad.PlotType = acExtents
blad.CenterPlot = True
blad.StandardScale = acScaleToFit
blad.ScaleLineweights = False
blad.StyleSheet = CTBhalf '<<<<<<<<<<<<<<<<<<< not working!!!!!!!!!!
blad.PlotWithPlotStyles = False
blad.PlotWithLineweights = fasle

'Set Number of Copies
ThisDrawing.Plot.NumberOfCopies = 1

'Initiate Plot

End Sub

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now