This project is read-only.

Foxcharts Saving chart settings/properties for later use

Topics: General
Aug 30, 2010 at 5:23 PM
Edited Aug 30, 2010 at 5:29 PM

Good day everyone,

I have included the Visual chart designer tool to allow end users to modify the settings of their charts. Sometimes, the users would like to generate another chart without having to set again the properties they have used before. I know that getchartproperties() method of foxcharts returns the set of properties of the chart according to the parameters. But, if I save them in a memo field of a table or just a txt file, How can I reuse it to set again the properties of the chart from that file/field?

I was trying the following code assuming that I previously saved the config in a memo field using getchartproperties(3,.F.) to save only changed properties and Without WITH...ENDWITH and the class in inside a form:

SELECT myTable
LOCAL ARRAY myArray(1)
nRows=ALINES(myArray,myTable.fcsettings,1)
FOR x=1 TO nRows
	ExecVar="thisform.foxcharts1"+myArray(x)
	&ExecVar
ENDFOR 

 

The problem is that even if I execute the getchartproperties() with the tlWrapper parameter in False (.F.), the method returns the WITH...ENDWITH block for child properties of the class. So the code above will raise errors when it encounters these sentences.

Please gime some advice to acomplish this task. Thanks in advance.

Aug 30, 2010 at 8:07 PM

Use ExecScript:


With thisform.foxcharts1
ExecScript(fcSettings)
EndWith


Jim Nelson
Aug 31, 2010 at 4:20 PM

Thanks a Lot Jim, I tested it succesfully.