James Belshan
2003-07-17 23:05:02 UTC
I needed hundreds of paper sizes available, so I made a simple SendKeys
utility that ran in 1" increments and drove the PC3 editor. My ACAD program
now has lots of paper sizes to choose the closest one from. It was easy to
do, but I'm sure it runs slower with all those paper sizes in the PC3. And
if the potential variety of paper sizes you'll need is tooooo huge, it won't
work for you.
FWIW, here it is...
Public Sub Add_Paper_Sizes()
' To use this sub:
' 1) have .PC3 file that is based on the AutoCAD TIF driver open to Custom
Paper tab.
' 2) set W and H to the desired width and height ranges
' 3) run it.... program will generate lots of paper sizes
Dim w As Integer
Dim h As Long
w = 5800
If MsgBox("Plotter Configuration Editor needs to be open to Custom Paper
tab before running sub. Continue?", vbOKCancel) = vbCancel Then Exit Sub
' w = Val(InputBox("Width", "Width", Format$(w)))
' h = Val(InputBox("Height", "Height", Format$(h)))
For h = 49800 To 6000 Step -200
'If MsgBox("Creating " & Format$(w) & " x " & Format$(h) & " pixel
page. Continue?", vbOKCancel) = vbCancel Then Exit Sub
AppActivate "Plotter Configuration Editor"
SendKeys "%a", True
SendKeys "%n", True
SendKeys Format$(w), True
SendKeys "%h", True
SendKeys Format$(h), True
SendKeys "%n", True
SendKeys Format$(w) & " x " & Format$(h) & " Pixels", True
SendKeys "%n", True
SendKeys "%f", True
Next 'h
End Sub
James
utility that ran in 1" increments and drove the PC3 editor. My ACAD program
now has lots of paper sizes to choose the closest one from. It was easy to
do, but I'm sure it runs slower with all those paper sizes in the PC3. And
if the potential variety of paper sizes you'll need is tooooo huge, it won't
work for you.
FWIW, here it is...
Public Sub Add_Paper_Sizes()
' To use this sub:
' 1) have .PC3 file that is based on the AutoCAD TIF driver open to Custom
Paper tab.
' 2) set W and H to the desired width and height ranges
' 3) run it.... program will generate lots of paper sizes
Dim w As Integer
Dim h As Long
w = 5800
If MsgBox("Plotter Configuration Editor needs to be open to Custom Paper
tab before running sub. Continue?", vbOKCancel) = vbCancel Then Exit Sub
' w = Val(InputBox("Width", "Width", Format$(w)))
' h = Val(InputBox("Height", "Height", Format$(h)))
For h = 49800 To 6000 Step -200
'If MsgBox("Creating " & Format$(w) & " x " & Format$(h) & " pixel
page. Continue?", vbOKCancel) = vbCancel Then Exit Sub
AppActivate "Plotter Configuration Editor"
SendKeys "%a", True
SendKeys "%n", True
SendKeys Format$(w), True
SendKeys "%h", True
SendKeys Format$(h), True
SendKeys "%n", True
SendKeys Format$(w) & " x " & Format$(h) & " Pixels", True
SendKeys "%n", True
SendKeys "%f", True
Next 'h
End Sub
James