Page 1 of 1

Hide Rulers, Guides and Grid and measure setup of these

Posted: Mon Nov 22, 2010 7:30 am
by magthenop
Hi!
I have found how to show Rulers, Guides and Grid,
but I have not found out how to set the measurements of these and how to hide them.
I would like to programmaticaly set these to whatever I want.

Can someone please tell me how?
and if there is a good referense from Adobe that shows these kind of stuff I would like to have a link to that one also.

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Mon Nov 22, 2010 10:29 am
by Vasyl-Tracker Dev Team
Hi, magthenop.

You may use undocumented properties:

1. to change measurement units:
ctrl.SetProperty("Measurement.Units", shortUnitName, 0); // possible named values: "pt", "in", "cm", "mm", "p"
2. to setup grid:
ctrl.SetProperty("Measurement.Grid.Visible", visibleFlag, 0); // show/hide
ctrl.SetProperty("Measurement.Grid.LinesColor", rgbColor, 0);
ctrl.SetProperty("Measurement.Grid.LinesStyle", linesStyle, 0); // "Dashed", "Solid"
ctrl.SetProperty("Measurement.Grid.CellWidth", cw, 0); // in pt
ctrl.SetProperty("Measurement.Grid.CellHeight", ch, 0); // in pt
3. to setup guides:
ctrl.SetProperty("Measurement.Guides.Visible", visibleFlag, 0);
ctrl.SetProperty("Measurement.Guides.Color", rgb, 0);
ctrl.SetProperty("Measurement.Guides.Style", style, 0); // "Dashed", "Solid"
4. to setup rulers:
ctrl.SetProperty("Measurement.Rulers.Visible", visibleFlag, 0);
ctrl.SetProperty("Measurement.Rulers.TickDivs", tickDivs, 0); // count of sub-ticks in one interval, for example 10 for cm unit means one mark for each mm (sure, if page zoom is large enough).
ctrl.SetProperty("Measurement.Rulers.ShowFractions", showFrac, 0);

HTH.

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Mon Nov 22, 2010 10:55 am
by magthenop
Thanks a million Vasyl :mrgreen:

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Mon Nov 22, 2010 1:59 pm
by magthenop
One more thing:

What is the "name" of the property for "Subdivision for Grid" ?

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Mon Nov 22, 2010 3:58 pm
by Vasyl-Tracker Dev Team
ctrl.SetProperty("Measurement.Grid.CellDivs", divs, 0);
// 0-auto, depended with units, 10 for cm, 8 for inch, 6-for pt, etc

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Tue Nov 23, 2010 7:19 am
by magthenop
Tanks Vasyl :mrgreen:

Re: Hide Rulers, Guides and Grid and measure setup of these

Posted: Tue Nov 23, 2010 9:39 am
by Tracker Supp-Stefan
Kudos to Vasyl :D

Cheers,
Stefan