DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

create tables of variables in Diadem Report.

is there a way to do the same thing with the python engine?

0 Kudos
Message 11 of 14
(895 Views)

 

Hi Carlos,

 

Should be able to, but I have not actually tried it. 

 

Paul

0 Kudos
Message 12 of 14
(890 Views)

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

Message 13 of 14
(881 Views)

Thank you Brad, this is really useful and it works.

0 Kudos
Message 14 of 14
(866 Views)