LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call and make changes to script

Hello,

 

I want to call a script and make changes to some of the numbers in that script and run it.

Can I just call the script without running it using System Exec vi?? I can separate the numbers from the script output after running it with system exec. But I want to get the default numbers in the script without running it. 

And after I get the numbers, how can I replace the numbers with whatever the numeric control input? 

 

Thanks a lot

0 Kudos
Message 1 of 7
(3,129 Views)

What kind of script are you talking about?

 

Matlab script?

Java script?

a batch file?

0 Kudos
Message 2 of 7
(3,126 Views)

It is a batch file. The vi calls another software and execute the script.

 

Thanks

0 Kudos
Message 3 of 7
(3,096 Views)

If it is a batch file, then you must use system Exec to run it.  Unless there is some other method I have never heard of.

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

Hello ZCY 4444,

 

It seems like what you're looking for is a way to edit the script, not "call" it.  Batch files are just text files, so you should be able to read it as such, modify the strings, and resave as needed.

 

I'd recommend adding one or more arguments to the script that override these "numbers" though, rather than reading and replacing the file.

 

Regards,

Tom L.
0 Kudos
Message 5 of 7
(3,076 Views)

Hi Tom,

 

Thanks for the suggestion. I will work on that.

 

Regards,

zcy

0 Kudos
Message 6 of 7
(3,074 Views)

Thank you. I will keep working on it,

0 Kudos
Message 7 of 7
(3,073 Views)