07-02-2013 10:05 AM - edited 07-02-2013 10:09 AM
Hello!
I'm trying to load different reports, change text values and graphics and export those reports to images. Sometimes I want to remove all reportsheets and load a new layout, but when calling picdelete a messagebox pops up and asks the user whether he wants to save the changes. I'm trying to get rid of that messagebox because my script gets halted and I don't want the user to overwrite my layout.
This only happens when picdelete is called from a SUD and for the picdelete command this behaviour can be circumvented by using Call Execute("Call picdelete"). Sadly the same procedure does not work for the picload command.
When called from the DIAdem scripting tab the report is loaded fine but I have found no way to use this command from a SUD without the messagebox appearing.
Is there a workaround? Does DIAdem 2012 show the same behaviour?
Edit: I guess I was wrong about that Call Execute("Call picdelete") workaround. I'm seeing the same messagebox. I don't know why I thought that helped.
Best regards,
grmume
PS: I'm using DIAdem 2011
07-03-2013 04:50 AM
Hi grmume
In DIAdem 2012 the behavior is the same. But we have a completely new easy to use object oriented programming interface. There exist a method that reset the modified status of the Report
In former versions you only have the readonly variable PicIsChanged.
But I tried a small script in DIAdem 2011 after changing the layout and it does not ask for saving the layout.
call PicDelete Call picload("Demo.TDR")
Hope this helps
Winfried
07-08-2013 08:35 AM
Hi grmume,
I don't think the behaviour is strange:
DIAdem ask you everytime when closing a window after changing something for saving these changes. This is to avoid loosing data/changes.
I would like to know why you have a layout and doing changes everytime. Is it realy necessary?
It would be a possible way to check for changes, saving the layout, deleting this file and going on after these steps
Kind regards,
Philipp K.
AE | NI Germany
07-10-2013 05:04 PM
Hi grmume,
I recommend saving the current REPORT contents to a dummy TDR file before deleting the REPORT contents. You can leave the path coded to the same file relative to the calling script and reuse it, like this:
Call PicSave(AutoActPath & "Last.TDR")
Brad Turpin
DIAdem Product Support Engineer
National Instruments