in

connecting users of the CorelDRAW family of products

Transform Each Macro

Last post 07-30-2007 5:09 by dizzy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-30-2007 16:02

    • Manuel
    • Top 100 Contributor
      Male
    • Joined on 05-15-2007
    • Merritt Island, Florida

    Transform Each Macro

     This is a macro I've been working on for a few days, what it does is it applies the selected transformation to each one of the selected objects individually. It rotates, scales and flips in both axes. I'm not a programmer and my experience with VBA is very limited, please report comments and or bugs to this thread and I'll review it in my spare time. Maybe one of the more experienced programmers wants to give it a boost. I think this is a simple but useful workaround to the fact that Corel doesn't have a native command that does this.

    Manuel Rivas
    Merritt Island, Fl
    www.doctorbirdmund.com
    www.doctorcotorro.com
  • 06-30-2007 16:20 In reply to

    • Manuel
    • Top 100 Contributor
      Male
    • Joined on 05-15-2007
    • Merritt Island, Florida

    Re: Transform Each Macro

     This it how it works, it's pretty simple, just select several objects that you wish to transform individually and run the macro. A dialog box will open and it has three sliders, the first one is for rotation and the other two are for stretching, there are reset buttons that will set the rotation back to zero and the stretching back to 100%, there are also two buttons that flip the objects horizontally and vertically, clicking the two of them is the same than rotating 180 degrees.

    *IMPORTANT*

    Even though this is a modeless dialog box (it stays open and it will let you work like a docker does) the resizing function math is based on the size of the original selection and it captures this size when the form initializes, so stretching a different array without closing and reopening will probably give unexpected results, the other functions will work just fine.

    Again, I'm not a programmer and I developed this tool for personal use but I post it here hoping that somebody will make suggestions and/or help develop it into a more robust tool until Corel decides that it's time to provide its users with a native tool that does the same.

    This idea came to me after I spent several hours drawing scales on a fish template to be cut by a router and my boss decided that the scales were too small and asked me if I could just select them all and enlarge them based on their individual centers without having to go one by one. He said: "it would be really stupid if this program doesn't let you do that". When he was not looking I saved the drawing as a PDF and opened it in Illustrator and did it there and then opened it back in Corel. The things I have to do to save Corel's face!!! 

    Manuel Rivas
    Merritt Island, Fl
    www.doctorbirdmund.com
    www.doctorcotorro.com
  • 07-02-2007 8:48 In reply to

    • fluid
    • Top 10 Contributor
      Male
    • Joined on 05-15-2007
    • Jacksonville, Florida USA

    Re: Transform Each Macro

    Thanks for sharing Manuel. Will check it out tonight. Looks like something I can use for sure. Saw this on the ng first but wanted to drop you a thanks here :-)

    Filed under: ,
  • 07-05-2007 11:50 In reply to

    Re: Transform Each Macro

    Very useful macro. Entering values, however for me didn't work but the sliders do, handy rotation. I am running X3 under Parallels for MAC 3.0. So it is possible that the macro isn't fully functional due to that. So long as I know I have to use the sliders in order to use it, I am good. I can test it next week at work as this week I am on vacation. At work I am running X3 under Windows 2000 NT.

    Everyday's a new day, DRAW on what you've learned.
  • 07-30-2007 5:09 In reply to

    • dizzy
    • Not Ranked
    • Joined on 07-02-2007

    Re: Transform Each Macro

    Speak English it's hard for me, but I will try add up.

    This macro quite good. But it return error if selection is empty. So, you must write condition: "If ActiveSelection.Shapes.Count = 0 Then MsgBox "Selection is empty": Exit Sub" at the beginning of subs. Also I am advising you write condition to test of opened documents: "If Documents.Count = 0 Then MsgBox "No opened documents": Exit Sub"

     Also it would be good, if you optimize your space on form. Many controls may be smaller, and many of them it is unnecessary. Look on my macro Shaping. Space of form is smaller, but greatly surpass of functionality. The code is opened them. Good luck! :)

Page 1 of 1 (5 items)
© 2008 Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions.