Welcome To Signs101.com: Largest Forum for Signmaking Professionals

Signs101.com: Largest Forum for Signmaking Professionals is the LARGEST online community & discussion forum for professional sign-makers and graphic designers.

 


  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resize page corel macro

Discussion in 'Corel' started by jessew1987, Sep 9, 2009.

  1. jessew1987

    jessew1987 Member

    29
    0
    0
    Mar 31, 2009
    Hey Guys, I just made this macro for myself and thought maybe someone on here could use it. Basically it takes your selected object and makes the page size a bit larger than your object and centers the object to the page. It makes the page size larger based on percentage, not a static measurement so you always have a good amount of space. Because I use multiple pages, I don't like working off the page. Obviously signs are usually much larger than letter size paper, so if you're constantly resizing the page to fit your large sign, than this might be for you.

    Sub pgsz()

    Dim W As Double
    Dim H As Double

    Dim W2 As Double
    Dim H2 As Double

    Dim OB As Shape

    Set OB = ActiveShape
    If OB Is Nothing Then
    MsgBox "Please Select an object", vbExclamation, "Error"
    End
    End If
    W = ActiveSelection.SizeWidth / 2.5
    H = ActiveSelection.SizeHeight / 2.5

    W2 = ActiveSelection.SizeWidth + ((W + H) / 2)
    H2 = ActiveSelection.SizeHeight + ((W + H) / 2)

    ActivePage.SetSize W2#, H2#

    If ActiveSelection.Shapes.Count = 1 Then
    ActiveSelection.AlignToPage cdrAlignHCenter, cdrTextAlignBoundingBox
    ActiveSelection.AlignToPage cdrAlignVCenter, cdrTextAlignBoundingBox
    Else
    ActiveSelection.Group
    ActiveSelection.AlignToPage cdrAlignHCenter, cdrTextAlignBoundingBox
    ActiveSelection.AlignToPage cdrAlignVCenter, cdrTextAlignBoundingBox
    ActiveSelection.Ungroup
    End If

    End Sub
     
    Tags:
  2. BadAss

    BadAss Active Member

    577
    0
    16
    Nov 29, 2007
    Arizona
    Sounds like it would be great, But I have no idea how to apply that in Corel. I have never done macros ....
     
  3. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    I almost never work on the page. Why do you work on the imaginary page outline?
     
  4. rcook99

    rcook99 Very Active Member

    2,139
    3
    38
    May 25, 2006
    NE
    I work on a page that is sized to the sign board or banner that I will be using. I find it easier to see it laid out that way.
     
  5. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    Well, I'll be....
    I just draw a rectangle the size of the banner if I'm working on a banner. If I'm working on a sign I draw the shape of the sign and work on that. The little page thingy distracts me.
     
  6. joeshaul

    joeshaul Member

    435
    0
    0
    Mar 23, 2008
    I usually ignore the page as well, unless there's a specific need for it.
    I usually snap to objects and everything, so if I'm making a 4x8 sign, I just make a 4x8 rectangle and leave the page at its default, and normally just export to EPS with Selection.

    Knowing how the page system works though can be beneficial. One example where I use pages is on my draft/design sheets, I basically have a locked master page that has my company info, my client's info, signature boxes, and etc. In the middle I just paste and resize my artwork to fit the page, insert the next page, paste drawing, etc, then can print or e-mail. Saves a lot of work and looks very professional, although I usually only use it for the casinos and city offices.
     
  7. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    I have Corel setup as near as possible to a drafting program as I can get it. No page size and "snap to everything possible" including "dynamic guides".
     
  8. rcook99

    rcook99 Very Active Member

    2,139
    3
    38
    May 25, 2006
    NE
    Signmeup
    I may give your way a try and see how it works.
     
  9. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    I'd like a Corel macro that would let me "pin" drop-down menus so they stayed dropped down until I "unpinned" them. Is that possible? I had that in Geoworks and I loved it. (Geoworks was IBM's operating system before Windows took over the world)
     
  10. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    Is there a way to hide the drawing page in Corel 12? That would be sweet.
     
  11. GAC05

    GAC05 Major Contributor

    5,991
    822
    113
    Dec 27, 2005
    Guam USA
    Ctrl-J > Document > Page > uncheck "Show Page Border"

    wayne k
    guam usa
     
  12. Jester1167

    Jester1167 Premium Subscriber

    No more drop downs X3 and X4 they are dockers. They lock on the right side and toggle between several.

    I love dynamic snapping too.
     

    Attached Files:

  13. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    Here is a screen shot of what I would like to have. Sometimes I get doing something that I have to keep clicking on the drop down menu to accomplish a repetative task. If I could pin the drop down(or flyout) it would speed things up......wouldn't need a docker.....

    BTW Corel 12 has those dockers . I just found this such a useful feature when I had it in Geoworks that I miss it. It was in the operating system so, as I recall, it worked on all programs.
     

    Attached Files:

  14. rcook99

    rcook99 Very Active Member

    2,139
    3
    38
    May 25, 2006
    NE
    I have found that most of what you are looking for will either be open in your tool bar if set up correctly and if you can't find it on your toolbar try RIGHT clicking and you will get a flyout from your cursor that will give you many other options instead of always going to your tool bar. Maybe this will help ya.:thumb:
     
  15. signmeup

    signmeup Major Contributor

    7,468
    13
    38
    May 5, 2005
    Canada
    The "order" button is a big one for me. I sometimes need a few tries to get things in the right order when copy/pasting and trimming etc. If I could pin the drop down with "order" in it it would save me time. I know it sounds dumb but I found this "pinning" a very useful feature.
     
  16. jessew1987

    jessew1987 Member

    29
    0
    0
    Mar 31, 2009
    The reason I use pages is because we have a page for quote and a page for quote sent. I've always had issues in Corel trying to work off the page while having multiple pages. This is the way that we work here, but at SignRite, we never used multiple pages. So I guess not many people on here use multiple pages.

    To install this macro:

    1. Open Visual Basic from inside Corel Draw. Tools/Macros/Macros Editor (I think it's Visual Basic Editor in X3) OR just hit **ALT-F11**
    2. On the left, go to:
    -Global Macros
    -Modules
    -CorelMacros (Double click)

    3. Paste code below the last "end sub"

    4. Go to Tools/Customization/ [Macros] (from the drop down list)

    5. Click GlobalMacros.pgsz.

    Now you can set a shortcut or drag and drop icon onto a toolbar to use.

    Hope this helps.

    Jesse
     
    Last edited: Sep 10, 2009
  17. Decal_Designs

    Decal_Designs Member

    310
    0
    16
    May 10, 2003
    Fox Lake
    Hey Jesse,

    I know this thread is really old, but I just found it with a search. I have just tried the Macro yo have made and it works great in X5.
    I did rename it to PageSize in the editor so I can remember what it is a year from now. I do have a question about the settings for

    W = ActiveSelection.SizeWidth / 2.5
    H = ActiveSelection.SizeHeight / 2.5

    W2 = ActiveSelection.SizeWidth + ((W + H) / 2)
    H2 = ActiveSelection.SizeHeight + ((W + H) / 2)

    I noticed that when I change the numbers to something higher than 2.5 the page gets smaller and smaller the larger the number I choose. It also does the same thing if I use a higher number than 2 in the W2 and H2 lines.

    Can you, or somebody explain how these settings differ from each other?

    In other words, is there any need to change the numbers in both the W and H lines and the W2 and H2 lines?

    By the way, I find this macro extremely useful for the way I work.

    Now I just have to figure out how to make the shortcut to it.

    Thanks!!
     
  18. Wafels

    Wafels New Member

    13
    0
    0
    Mar 7, 2013
    Sorry for bringing old post back, but found this one useful.

    Works with corel x6 , changed code so it places selected object to middle of page and resizes it to object size plus 3mm bleed. Useful for printing previews or sending vinyl for printer.

    Code:
    Sub PageSizeToObject()
    
    Dim W2 As Double
    Dim H2 As Double
    
    Dim OB As Shape
    
    Set OB = ActiveShape
    If OB Is Nothing Then
    MsgBox "Please Select an object", vbExclamation, "Error"
    End
    End If
    
    W2 = ActiveSelection.SizeWidth + 0.11811
    H2 = ActiveSelection.SizeHeight + 0.11811
    
    ActivePage.SetSize W2#, H2#
    
    ActiveSelection.AlignAndDistribute cdrAlignDistributeHAlignCenter, cdrAlignDistributeVAlignCenter, 
    cdrAlignShapesToCenterOfPage, cdrDistributeToSelection, False, cdrTextAlignBoundingBox
    
    End Sub
     
    Last edited by a moderator: Mar 18, 2014
  19. Decal_Designs

    Decal_Designs Member

    310
    0
    16
    May 10, 2003
    Fox Lake
    It's funny you brought up this old thread Wafles. I use a slightly different macro code based on Jesse's original code, but I must say that I still use this Page ReSize Macro several times a day, everyday.
     
  20. Wafels

    Wafels New Member

    13
    0
    0
    Mar 7, 2013
    I've been looking for this kind of macro for quite a while already.
    It sure can save a lot of time, now only to manage macro like I had it in illustrator, 2x10 square boxes ready to be clicked :)
     
Loading...

Share This Page

 


Loading...