Skip to main content
Participating Frequently
August 9, 2008
Question

How to get these units?

  • August 9, 2008
  • 6 replies
  • 2731 views
Please follow the steps:
1. Edit->Preferences->Units & Display performance... to bring the dialog.
2. In "Units" group, we can change units for "General", "Stroke", "Type" and "Asian Type".

We can use AIUserSuite::GetUnitsString to get the general units, but how to get the other three units? Does anybody know it?

thanks
This topic has been closed for replies.

6 replies

_duandc_Author
Participating Frequently
August 15, 2008
Thanks! Jeshua.
3DTOPO
Inspiring
August 14, 2008
You don't need to access the prefs file directly, the values are just stored there. They can be obtained using AIUserSuite::GetUnitsString.
_duandc_Author
Participating Frequently
August 12, 2008
where is AIPrefs file? thanks!
A. Patterson
Inspiring
August 12, 2008
Very cool! Thanks!
Participant
August 12, 2008
Hi,
You can get these units with AIPreference Suite.

long units;
sAIPreference->GetIntegerPreference(NULL, "strokeUnits", &units);
sAIPreference->GetIntegerPreference(NULL, "text/units", &units);
sAIPreference->GetIntegerPreference(NULL, "text/asianunits", &units);

These suffix strings were found in AIPrefs file.
A. Patterson
Inspiring
August 11, 2008
Interesting, I don't see anything in the API for doing that. Unless someone can find it squirreled away somewhere, it looks like there might be a hole in the API where this is concerned.