Jump to content

Recommended Posts

Posted

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
ThisDrawing.Plot.PlotToDevice

End Sub

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...