writeToFile

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

writeToFile

Post by fmulder »

A panel now (3.15 P7) has a beautiful function 'writeToFile' that can be used to write the panel to a file on disk.
But how do you access a property on the panel or call a method of the panel.

we plan to do some addSymbol()'s and then store this panel so that we can generate panels.

getValue( myModuleName(), myPanelName(), "writeToFile", "test.pnl", "" ) wont work

Any help ?

Thanks

Share the fun
Frenk Mulder

Andorhal
Posts:127
Joined: Wed Nov 12, 2014 8:04 am

Re: writeToFile

Post by Andorhal »

Hello Frenk.

We will rework the documentation for this functionality and add some ready-to-use code examples as well.

BR Robert

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: writeToFile

Post by mkoller »

Better use setValue instead of getValue, since this is a write-only function. And use either the usual syntax of addressing the panel, which is
".:" or use a shape variable pointing to the panel (e.g. self etc.)

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: writeToFile

Post by fmulder »

thanks.

I was able to adress the panel via:

Code: Select all

shape panel = getShape( myModuleName() + ".testpanel:" );
panel.writeToFile( "mynewpanel.pnl", "" );
thanks for the help

share the fun
Frenk Mulder

4 posts • Page 1 of 1