DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

what is the difference between the "pre defined script" settings in Diadem 11 and 12?

 

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.

0 Kudos
Message 1 of 7
(4,626 Views)

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.

0 Kudos
Message 2 of 7
(4,613 Views)

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

0 Kudos
Message 3 of 7
(4,587 Views)

 

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

0 Kudos
Message 4 of 7
(4,569 Views)

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

0 Kudos
Message 5 of 7
(4,554 Views)

 

Hi Brad,

 

Thank you for the inputs. Since the file is running no issues.

 

Regards.

0 Kudos
Message 6 of 7
(4,530 Views)
Hi Brad,
Just reread your last reply again. The scripts that I use is saved in local drive and not in standard location for running script. So I guess setting up default scriptreadpath in those PCs is not a possibility.

The script is working fine but technically it should work from 'Run script from file' link also.

Regards,
fazshah.
0 Kudos
Message 7 of 7
(4,133 Views)