Setting automatic 3d scaling and file save dimensions

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
arthur_etchells
Posts: 30
Joined: Fri Jul 15, 2005 9:18 am

Setting automatic 3d scaling and file save dimensions

Post 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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
arthur_etchells
Posts: 30
Joined: Fri Jul 15, 2005 9:18 am

Post 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.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
arthur_etchells
Posts: 30
Joined: Fri Jul 15, 2005 9:18 am

Post 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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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)]
Visualize Your Data
support@dplot.com
Post Reply