12-24-2015 08:09 AM
Hi,
i have a script which is working properly in Diadem 11. The way I use is, I click on the 'Run script from file' button in the 'Predefined Setting' list for scripts inside View Tab and go to my script and run it.
This is not working Diadem 12. But if I open the script file in the Script Tab and run it, works properly. The problem which I observed is, when using the first method in Diadem 12 many variables are not getting defined. Can anyone me know why this is happening?
Unfortunately I cannot attach sample script.
Regards.
12-24-2015 11:16 AM
Also, when I put the path to the script in the start script its working properly. So I gues its definitely something to do with the Predefined script settings.
Regards.
12-25-2015 10:20 AM
Hi faz,
I think you're chasing the correct clue. I don't think the change is in the script shortcut button in DIAdem. Based on the fact that the same script runs from the SCRIPT panel, I'm guessing that you don't have all your path assignments complete in your code. Loading a VBScript into the SCRIPT panel sets the default folder for loading SCRIPT components in DIAdem. I recommend using CurrentScriptPath (or AutoActPath in old DIAdem versions) to handle this:
Call SudDlgShow("DlgName", CurrentScriptPath & "DlgFileName.Ext")
This has the further advantage that you can send your code to someone else or move it yourself to a new location, and the script will continue to work.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-26-2015 05:15 AM
Hi Brad,
If the path assigment isn't complete, should the same issue be there in Diadem 11 also? I have checked this in multiple PCs also, in all cases it is the same - works in 11 but not in 12.
I am already using AutoActPath in my script. Another point, my script starts with ScriptCmdReset command. If I comment out this line, the script starts working in 12 also. But I dont understand why is it happening (as the above command deletes all the userdefined variables before the script starts running and not after defining them).
I have started working through start script and is working fine, but wanted to know what is the reason behind this.
Thanks.
Regards,
Fazil Shah
12-26-2015 07:46 PM
Hi Faz,
It is possible to set predefined values for the default paths for layout reading and writing and have those save with the Desktop.DDD file. So it's possible all those DIAdem 11 computers had that set up and the new DIAdem version doesn't. I still don't think anything important to this issue has changed between those 2 DIAdem versions.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-28-2015 11:22 PM
Hi Brad,
Thank you for the inputs. Since the file is running no issues.
Regards.
03-20-2016 01:13 AM