Results 1 to 2 of 2

Thread: Set plot paper size

  1. #1
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    305
    Login to Give a bone
    0

    Question Set plot paper size

    Hi all,

    I'm a little stuck and confused on this one. I am needing to set the paper size for a plot, but I don't udnerstand how to do this in VBA. For example, I have a PC3 file with "Oversized: Custom 1: 42 x 30 in." listed on the plot dialog, but I don't know how to set it in my code .

    I tried this:

    Code:
    ThisDrawing.ActiveLayout.CanonicalMediaName = "Oversized: Custom 1: 42 x 30 in."
    But that just gave me an error . And when I checked this:

    Code:
    ThisDrawing.ActiveLayout.GetCanonicalMediaNames
    It gave me a very long list of names, and none of them matched the one in my plot dialog.

    I would REALLY appreciate if someone could enlighten me as to how to go about this properly.

  2. #2
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    305
    Login to Give a bone
    0

    Lightbulb Re: Set plot paper size

    For anyone interested, I have found the solution I was looking for. Here it is:

    Code:
    Private Function setMedia(size As String)
     	Dim mediaNames As Variant
     	Dim x As Integer
     	mediaNames = ThisDrawing.ActiveLayout.GetCanonicalMediaNames
     	For x = LBound(mediaNames) To UBound(mediaNames)
     		If StrComp(ThisDrawing.ActiveLayout.GetLocaleMediaName(mediaNames(x)), size, vbTextCompare) = 0 Then
     			ThisDrawing.ActiveLayout.CanonicalMediaName = mediaNames(x)
     			ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
     		End If
     	Next
     End Function
    I set my plot device then run this function supplying the name of the paper size to use.

Similar Threads

  1. Plot Stamp to Print Relative to Paper Size
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-07-05, 10:43 PM
  2. Plot Dual Half Size on single roll of paper
    By paul_mep in forum AutoCAD Plotting
    Replies: 2
    Last Post: 2008-02-13, 11:13 PM
  3. How can I plot on a paper size greater than A0?
    By athanasiosmavrides in forum Revit - Plotting/Printing/Exporting
    Replies: 6
    Last Post: 2006-11-07, 09:23 PM
  4. Getting Plot Stamp to Match Paper Size
    By cadmecheng in forum AutoCAD General
    Replies: 1
    Last Post: 2006-04-12, 11:41 PM
  5. Making plot-files/ paper size
    By aapo.salmi in forum Revit Architecture - General
    Replies: 1
    Last Post: 2005-10-04, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •