View Single Post
  #2  
Old 02-11-2006, 17:46
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Scale

OK here is a quick GMS to address all three you listed. I will also post the main code.

To address number one. Basically what it does is append the scale to the document caption. Should work most of the time, can not say everytime, depends on the event.

The ChangeScale just gives you an input box to input the new scale. (Warning, no error handling, just a simple example.)

And finally AddScaleToDocument will add the scale to each page in the current document, bottom right corner.

Hope it helps,

Shelby

Code:
Sub ScaleCaption()

Dim NewCaption As String

NewCaption = "CorelDRAW X3 - Scale: " & ActiveDocument.WorldScale
If AppWindow.Caption <> NewCaption Then AppWindow.Caption = NewCaption

End Sub
Sub ChangeScale()

Dim txtScale As String

txtScale = InputBox("Please Enter Scale: ", "Scale")

ActiveDocument.WorldScale = txtScale
ScaleCaption

End Sub

Sub AddScaleToDocument()

Dim p As Page

For Each p In ActiveDocument.Pages
    p.ActiveLayer.CreateArtisticText 0.25, 0.25, "Scale: " & ActiveDocument.WorldScale, cdrEnglishUS, , "Arial", 12, cdrTrue, cdrTrue, , cdrLeftAlignment
Next p

End Sub
Attached Files
File Type: gms Scale.gms (25.5 KB, 259 views)

Last edited by shelbym; 19-04-2010 at 23:16. Reason: updated GMS
Reply With Quote