AutoCAD Land Desktop

AutoCAD Land Desktop

*Lazic, Rad
Message 1 of 2 (71 Views)

Project Preferences Settings

71 Views, 1 Replies
03-16-2002 08:15 PM

Has anyone tried to toggle on/off any of the project preferences settings in
They are controlled through normal Settings functions and some just have a
On/Off state.

They are declared as enumerated "eAeccPref... " types and usually hold a
list of constants with preset values for every switch.

I have used the following list from eAeccPrefParcelInt:


Using those, I was only able to toggle Off. Repeated use would leave the
toggle Off.
NB: There are no constants named "kNumberLabelsOff"

How to read a current state of the setting, toggle it On or Off as needed
and reset to original state?

Any advise is welcome.


*Lazic, Rad
Message 2 of 2 (71 Views)

Project Preferences Settings - OK, OK...

03-16-2002 09:28 PM in reply to: *Lazic, Rad
Ha, ha,

Of course, the standard 1 and 0 worked like a charm!
But what confused me when I tried them at first was that when you query any
of the "kNumberLabelsOn" etc. at runtime, they return values of 5, 6, 11...

Obviously, this was misleading (in my case, anyway...).
So, the right way to do it is:

...snip code

Set parcelPref = AeccApplication.ActiveProject.Preferences.parcel
Dim ti(12) As Long
ti(0) = parcelPref.GetInteger(kAreaUnitLabelsOn)
ti(1) = parcelPref.GetInteger(kAreaUnitPrecision)
ti(2) = parcelPref.GetInteger(kAutoLabelPlacement)


parcelPref.SetInteger kAreaUnitLabelsOn, 0
parcelPref.SetInteger kAreaUnitPrecision, 1
parcelPref.SetInteger kAutoLabelPlacement, 1


parcelPref.SetInteger kAreaUnitLabelsOn, ti(0)
parcelPref.SetInteger kAreaUnitPrecision, ti(1)
parcelPref.SetInteger kAutoLabelPlacement, ti(2)


Thanks for everyone's support (or patience...)

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.