Page 1 of 1

Setting automatic 3d scaling and file save dimensions

Posted: Sat Jul 30, 2005 1:46 pm
by arthur_etchells
I can't figure out how to turn off the "automatic scaling for 3d graphs" option programatically. Also, the save as... dimensions stay at whatever they were last set to. Is there a way to set the dimensions programatically. Thanks
Arthur

Posted: Sat Jul 30, 2005 2:16 pm
by DPlotAdmin
I can't figure out how to turn off the "automatic scaling for 3d graphs" option programatically.
Search the Help file for "GeneralOptions". Unfortunately there's no way to set one option and leave all others alone.
Also, the save as... dimensions stay at whatever they were last set to. Is there a way to set the dimensions programatically.


I'm assuming you're talking about image formats (.BMP, .GIF, etc.). See SetPluginImageDims.

Posted: Thu Aug 04, 2005 10:23 am
by arthur_etchells
Ok, thanks for your help. It seems these commands are indeed the ones i needed. I just wanted to know why the general options can be set using hex, what was the reason for this? My ignorance of hexadecimal is probably to blame here (and below, read on...)

Also, you said that the options cannot be changed individually. However, in the example for generaloptions, only one option was saved using integer references. Yet you used the same syntax (masks, flags) to change two options using hex. How does this work?

For now, I'll just set all 9 options using individual integer commands.

Thanks for all the help.

Posted: Thu Aug 04, 2005 4:54 pm
by DPlotAdmin
Also, you said that the options cannot be changed individually.
My mistake. I glanced at the source code and overlooked mask, rather than looking at the description of the Help file. The Help file is correct. Specifically:

For example, to turn off the "Always auto-adjust scale factors on 3D plots" setting, use [GeneralOptions(8,0)]

There's nothing magic about hexadecimal vs. normal numbers. It's just easier for folks who tend to think in hex to work with, particularly when combining multiple settings.

Posted: Thu Aug 04, 2005 5:22 pm
by arthur_etchells
I know the basics of hexadecimal (after having read a quick primer). I'm not sure how the hexadecimal can communicate both the option refererred to and the desired setting (on or off). Mind giving a quick explanation?
Thanks again,
Arthur

Posted: Fri Aug 05, 2005 8:28 pm
by DPlotAdmin
Whether using hex or normal numbers, the first parameter (mask) specifies which options are turned on or turned off by flags. So to turn on the 1st and 3rd options (Prompt to save changed plots and Always start maximized) and leave the state of all other options alone, you'd use

[GeneralOptions(5,5)]

The mask parameter says that flags will only effect the 1st and 3rd options (1+4). The flags parameter says turn both of 'em on. To turn off the 1st option, turn the 3rd option on, and leave all others alone, you'd use

[GeneralOptions(5,4)]