05-03-2021 02:25 PM
05-03-2021 04:59 PM
Hi Carlos,
Should be able to, but I have not actually tried it.
Paul
05-06-2021 02:27 PM - edited 05-06-2021 02:30 PM
Hi Carlos,
Yes, this is how you elevate a python array to global status in DIAdem-- by creating an empty global variable and then assigning the python array variable to it:
string_array = []
string_array.append("value0")
string_array.append("value1")
string_array.append("value2")
string_array.append("value3")
string_array.append("value4")
dd.GlobalDim("MyStringArray")
dd.MyStringArray = string_array
You still end up with a global VBScript array, but it can be easily filled by python code. I'm including the python script and the TDR file that references the global "MyStringArray" variable in a table and a text box.
Brad Turpin
Principal Technical Support Engineer
NI
05-07-2021 09:44 AM
Thank you Brad, this is really useful and it works.