This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Corel Draw 12 > November 2005 > grid hotkey
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Zachar Istvan 2005-11-04, 6:25 pm |
|
Hi, I would like to know wether grid frequencey can be changed by hotkeys,
or not? It is fairly frustrating to go inside GridSetup and manually set it,
if one makes this move a hundred times in a session.
Any solution would be appreciated!
thanks in advance
Steve
| |
| Ronny Axelsson 2005-11-04, 6:25 pm |
|
Steve wrote
> Any solution would be appreciated!
The only thing I have to offer is to assign a shortcut key to
View > Grid and Ruler Setup..., which at least will give you
a fast and easy way to change the grid.
Tools > Customization... > Commands > View > Grid and Ruler Setup...
tab Shortcut Keys.
I suppose it would be possible to create some kind of macro too,
but I'm not the one...
Hope it helps,
--
/Ronny Axelsson
| |
|
|
Thanks Ronny, but a shortcut won't help me much, I'm using this method
already. The major part is still the frequency setup, as it is a minimum
10 mouse click, or 4 keystrokes if I want to change the values from eg.
0.5 to 1.
That is irritatingly too much to do it several times per minutes. And it
would be just a very effective macro, that could make the frequency
change from 0.5 to 1, and back if called repeatedly (switching between
two values would be enough). If anyone could drop a hint how to start
coding a macro like this, that would be appreciated.
Ronny Axelsson wrote:
> Steve wrote
>
>
>
>
> The only thing I have to offer is to assign a shortcut key to
> View > Grid and Ruler Setup..., which at least will give you
> a fast and easy way to change the grid.
> Tools > Customization... > Commands > View > Grid and Ruler Setup...
> tab Shortcut Keys.
>
> I suppose it would be possible to create some kind of macro too,
> but I'm not the one...
>
> Hope it helps,
>
| |
| Jeff Harrison 2005-11-09, 5:43 pm |
|
Sounds like you are looking for something like "Grid Styles", where you
can save your own settings and then pick them from a drop down list.
This would be useful for many folks I'd suspect... Should be possible.
Alex? :-)
JD
zac wrote:
>
> Thanks Ronny, but a shortcut won't help me much, I'm using this method
> already. The major part is still the frequency setup, as it is a minimum
> 10 mouse click, or 4 keystrokes if I want to change the values from eg.
> 0.5 to 1.
> That is irritatingly too much to do it several times per minutes. And it
> would be just a very effective macro, that could make the frequency
> change from 0.5 to 1, and back if called repeatedly (switching between
> two values would be enough). If anyone could drop a hint how to start
> coding a macro like this, that would be appreciated.
| |
| Peter Clifton 2005-11-09, 5:43 pm |
|
zac spoke unto the group and said...
>
> Thanks Ronny, but a shortcut won't help me much, I'm using this method
> already. The major part is still the frequency setup, as it is a minimum
> 10 mouse click, or 4 keystrokes if I want to change the values from eg.
> 0.5 to 1.
> That is irritatingly too much to do it several times per minutes. And it
> would be just a very effective macro, that could make the frequency
> change from 0.5 to 1, and back if called repeatedly (switching between
> two values would be enough). If anyone could drop a hint how to start
> coding a macro like this, that would be appreciated.
>From the VBA help file
Sub Test()
ActiveDocument.Unit = cdrInch
ActiveDocument.Grid.SetFrequency 5, 3
End Sub
So you could write two macros and assign hot keys (eg CTRL+ALT+1 and
CTRL+ALT+2) to them
e.g. one grid dot per mm would be
Sub OneDotPerMM()
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.Grid.SetFrequency 1, 1
End Sub
and 2 grid grid dots per mm would be
Sub TwoDotsPerMM()
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.Grid.SetFrequency 2, 2
End Sub
And to show decimal values can be accepted, one grid dot per cm with the
master document unit set to millimetres would be
Sub OneDotPerCM()
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.Grid.SetFrequency 0.1, 0.1
End Sub
Note: the grid display does not appear to update after running the
macro, I tried activedocument.activewindow.refresh at the end of each
macro but it still did not update, however if you zoom in or out on the
mouse wheel, one step, the displayed grid does up date.
HTH
Peter
| |
| Peter Clifton 2005-11-09, 5:43 pm |
|
Peter Clifton spoke unto the group and said...
> So you could write two macros and assign hot keys (eg CTRL+ALT+1 and
> CTRL+ALT+2) to them
>
........Just in case you are not familiar with VBA.
Creating a blank VBA macro project is detailed in Chapter 4 page 16 of
the CorelDRAW Graphics Suite 12 Programming Guide for VBA which is
reached from
Windows-Start/All Programs/Corel Graphics Suite 12/Documentation
After creating a project you can cut and paste the macros into them.
then assign hot keys inside Draw
Tools//customization/commands
Select Macros in the roll down list
Click each macro in turn and assign preferred shortcut in the 'ShortCut
Keys' Tab in the same dialog.
HTH
Peter
| |
| Zachar Istvan 2005-11-09, 5:43 pm |
|
Thank You Peter for the extensive help! As soon as I get to, I will try
it out!
Steve
Peter Clifton wrote:
> Peter Clifton spoke unto the group and said...
>
>
> .......Just in case you are not familiar with VBA.
>
> Creating a blank VBA macro project is detailed in Chapter 4 page 16 of
> the CorelDRAW Graphics Suite 12 Programming Guide for VBA which is
> reached from
>
> Windows-Start/All Programs/Corel Graphics Suite 12/Documentation
>
> After creating a project you can cut and paste the macros into them.
> then assign hot keys inside Draw
>
> Tools//customization/commands
>
> Select Macros in the roll down list
>
> Click each macro in turn and assign preferred shortcut in the 'ShortCut
> Keys' Tab in the same dialog.
>
> HTH
>
> Peter
>
>
| |
| Zachar Istvan 2005-11-09, 5:43 pm |
|
Okay, I've implemented the macros as You told (OneDotPerMM and
TwoDotsPerMM), restarted Draw, and voila, they are there, and
are bound to S and A for the sake of simplicity. But when I call
any of them, the grid won't change. I've investigated the Grid
setup, where I've found that the frequencies are indeed changed
to the desired values, but as long as I don't hit Enter on the
Grid settings dialog, the grid won't refresh to the proper
alignment. Not even with the zooming thing You suggested, or
with Hide-Show Grid, or with the add of
ActiveDocument.ActiveWindow.Refresh. So the values are set, but
not evaluated.
Any idea what could be wrong with my implementation?
Peter Clifton wrote:
> zac spoke unto the group and said...
>
>
>
> Sub Test()
> ActiveDocument.Unit = cdrInch
> ActiveDocument.Grid.SetFrequency 5, 3
> End Sub
>
> So you could write two macros and assign hot keys (eg CTRL+ALT+1 and
> CTRL+ALT+2) to them
>
> e.g. one grid dot per mm would be
>
> Sub OneDotPerMM()
> ActiveDocument.Unit = cdrMillimeter
> ActiveDocument.Grid.SetFrequency 1, 1
> End Sub
>
> and 2 grid grid dots per mm would be
>
> Sub TwoDotsPerMM()
> ActiveDocument.Unit = cdrMillimeter
> ActiveDocument.Grid.SetFrequency 2, 2
> End Sub
>
> And to show decimal values can be accepted, one grid dot per cm with the
> master document unit set to millimetres would be
>
> Sub OneDotPerCM()
> ActiveDocument.Unit = cdrMillimeter
> ActiveDocument.Grid.SetFrequency 0.1, 0.1
> End Sub
>
> Note: the grid display does not appear to update after running the
> macro, I tried activedocument.activewindow.refresh at the end of each
> macro but it still did not update, however if you zoom in or out on the
> mouse wheel, one step, the displayed grid does up date.
>
> HTH
>
> Peter
>
>
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|