in

connecting users of the CorelDRAW family of products

Shortcuts assigning

Last post 02-27-2008 6:56 by Os. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-25-2008 23:29

    Shortcuts assigning

    I would like to assign shortcuts for Measurements 1) Centimeters 2) Inches 3) Feet and etc., Even I recorded the macro for the measurement by indivdually assigned to Centimeters, inches...etc but not working Please help me
  • 02-26-2008 1:09 In reply to

    • Os
    • Top 50 Contributor
    • Joined on 05-17-2007

    Re: Shortcuts assigning

    it's easy, here's the code, you can copy the example macros (SUB Unit.... END SUB) definitions using information from class browser in VBAEditor (F2 key) for "cdrUnit" class - it has all the definitions of units used in DRAW, just copy & paste.

    Put the code either in new GMS (more reliable) or in GlobalMacros project's CorelMacros module

    Sub UnitCM(): SetUnits cdrCentimeter: End Sub
    Sub UnitMM(): SetUnits cdrMillimeter: End Sub
    Sub UnitINCH(): SetUnits cdrInch: End Sub
    
    Sub SetUnits(ByVal U As cdrUnit)
       If ActiveDocument Is Nothing Then Exit Sub
       With ActiveDocument.Rulers
          .HUnits = U
          .VUnits = U
       End With
    End Sub
  • 02-26-2008 5:15 In reply to

    Re: Shortcuts assigning

    Sir thank q so much But i could not able to where exactly paste I browsed to CDRUNIT afterwards i did not know how to paste ? I would like to ad FEET also in that project Please tell me how to paste & how to activate with regards ram
  • 02-26-2008 6:42 In reply to

    • Os
    • Top 50 Contributor
    • Joined on 05-17-2007

    Re: Shortcuts assigning

    Create a new GMS macro container 

    1. Exit DRAW, run notepad and save the empty file to
      "%appData%\Corel\Graphics13\User Draw\GMS\UnitSwitcher.gms"
      COPY THIS EXACT LINE WITH QUOTES INCLUDED
    2. Run DRAW->menu Tools->VisualBasic->Editor (Alt-F11)
    3. in Projects pane dblclick GlobalMacros (UnitSwitcher), click Properties pane and change the name from GlobalMacros to UnitSwitcher

    Paste the code

    1. dblclick ThisMacroStorage inside UnitSwitcher (Projects pane), paste the code from my previous message

    Create your own macros

    1. press F2 to see Object Class browser, scroll to cdrUnit, lookup the exact unit name, it'll be cdrFoot
    2. copy & paste as new line any of my SUB Unit...END SUB - and rename SUB and the unit afterwards like this:
      Sub UnitFeet(): SetUnits cdrFoot: End Sub

    Assign buttons/hotkeys

    1. [ 80 seconds of online 0.5MB video tutorial ]
    2. [ step-by-step button installation ]
    3. [ Macro button installer ]
    Filed under: ,
  • 02-27-2008 6:11 In reply to

    Re: Shortcuts assigning

    sirrrrrrrrrrrrr thank q so much and i would like to assign to rotate any element to the desired angle. plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help me also in this regard With best regards ram
  • 02-27-2008 6:45 In reply to

    Re: Shortcuts assigning

    sit it worled first but later i followed the same for FILE PATH INSERTER but the previous one is removed & the present one is existed. how could i keep the both . i renamed the unitpatcher(globalmacro.gms) to FILEPATH and unit switcher(globalmacro.gms) is removed. please help me sir
  • 02-27-2008 6:56 In reply to

    • Os
    • Top 50 Contributor
    • Joined on 05-17-2007

    Re: Shortcuts assigning

    I've lost interest, keep your head up though, it's easy, use macro recorder and read Help, everything is possible :-)
Page 1 of 1 (7 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.