connecting users of the CorelDRAW family of products

Shortcuts assigning

rated by 0 users
This post has 6 Replies | 2 Followers

Page 1 of 1 (7 items) | RSS

pkg_sriram Posted: 02-25-2008 23:29
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

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
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

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 ]
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
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
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) | RSS
© 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.