×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Ignoring Plotter Settings

Ignoring Plotter Settings

Ignoring Plotter Settings

(OP)
Hello all
I have written the following code:

CODE

Sub MainTest()
    Dim objConfig As AcadPlotConfiguration
    Dim blnResult As Boolean
 
    Set objConfig = ThisDrawing.Application.ActiveDocument.PlotConfigurations.Add("New")
 
    ThisDrawing.ModelSpace.Layout.RefreshPlotDeviceInfo
 
    With objConfig
        .ConfigName = "[URL="file://\\BLBEDC02\DO"]\\BLBEDC02\DO[/URL] LaserJet 5100"
        .CanonicalMediaName = "A4"
        .StandardScale = acScaleToFit
        .PlotType = acExtents
        .StyleSheet = "Monochrome.ctb"
        .PlotRotation = ac0degrees
        .CenterPlot = True
    End With
 
    ThisDrawing.Application.ActiveDocument.Regen acAllViewports
 
    blnResult = ThisDrawing.Application.ActiveDocument.Plot.PlotToDevice(objConfig.ConfigName)
 
    objConfig.Delete
 
    Set objConfig = Nothing
 
End Sub
 
Now, the problem is that although this does produce a print, it ignores the fact that I want it extents, monochrome, centered etc and just prints as it is ont he screen.
 
If I debug the program just before printing, the plot configuration does reflect the changes I requested, but the actual printer (or somewhere in between) seems to ignore them.
 
Does anyone have any ideas?
 
Thanks

All help is greatly appreciated
Kind regards
Ota

RE: Ignoring Plotter Settings

Hi Ota,

A couple of things you may try, you may try placing some updates:

CODE

objCode.Update

You may even try adding a DoEvents to allow AutoCAD to catch up with everything your doing.  It seemed to me I was better off adding the config and checking for it's existence and then if it wasn't there adding it, but I then had to make sure AutoCAD had time to update all of its tables, (plot tables, style tables etc), before I sent it on it's merry way.

I seems to me I also had to use the plot object as well in order to get the settings to stick, you may give that a shot as well...

HTH
Todd

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close