Set Paper Size to Layout

Set Paper Size to Layout

rmcefr
Enthusiast Enthusiast
806 Views
1 Reply
Message 1 of 2

Set Paper Size to Layout

rmcefr
Enthusiast
Enthusiast

Hi

 

following Code get error of "CanonicalMediaName "

 

My_Layout.ConfigName = "DWG To PDF.pc3"
My_Layout.CanonicalMediaName = "ISO_A1_(594.00_x_841.00_MM)"

I try this also

My_Layout.ConfigName = "DWG To PDF.pc3"
My_Layout.CanonicalMediaName = "ISO A1 (594.00 x 841.00 MM)"

 

May there is an special formula of paper sizes names?

thanks

thanks

0 Likes
Accepted solutions (1)
807 Views
1 Reply
Reply (1)
Message 2 of 2

Ed__Jobe
Mentor
Mentor
Accepted solution

Try this:

In a test dwg, set the current page setup to the paper size you want then run the following code:

 

Sub FindCname ()
   Debug.Print ThisDrawing.ActiveLayout.CanonicalMediaName
End Sub

 

Then in the Immediate window, copy the printed result to your sub.

There is also the GetCanonicalMediaNames method.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes