Save refpanel modified in runtime with writetofile

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
andrea.bertorelli
Posts:33
Joined: Wed May 31, 2017 3:58 pm

Save refpanel modified in runtime with writetofile

Post by andrea.bertorelli »

Hi everyone,
When I edit an object drawn on the page, and saving it with WriteToFile there are no problems.
If I try to do the same imitating "Select object inside PanelRef" by CTRL the modified object does not remain saved

Example:
Working code (color the circle in green, save the page, and when it's reopened it's green)

main ()
{
setValue("circle1","backCol","green");
setValue(myModuleName() + "." + rootPanel() + ":", "writeToFile",RootPanel(),"PNL");
}


Example:
Working code (color the circle in green, save the page, and when it's reopened back to default color)
main ()
{
setValue("object1.circle","backCol","green");
setValue(myModuleName() + "." + rootPanel() + ":", "writeToFile",RootPanel(),"PNL");
}

Is it possible to modify objects in a refpanel on the page where the refpanel is present (during runtime) and save everything?

Thanks!

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Save refpanel modified in runtime with writetofile

Post by leoknipp »

If you change the settings for an inserted reference in GEDI the information is saved to the panel file.
When I have read your example correctly you want to do the same with the function writeToFile during runtime.

Is this correct?

Best Regards
Leopold Knipp
Senior Support Specialist

andrea.bertorelli
Posts:33
Joined: Wed May 31, 2017 3:58 pm

Re: Save refpanel modified in runtime with writetofile

Post by andrea.bertorelli »

Yes it is correct!

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Save refpanel modified in runtime with writetofile

Post by leoknipp »

I got the information from our UI developer that the functionality to save changed reference information is not implemented at the moment for the function writeToFile().

When and if it will be implemented in future releases is not defined right now.

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1