Retrieve parameters and values
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Is it possible to retrieve information on the parameters defined in the Parameter Set of a WB project schematic?
Tagged:
1
Answers
-
This script will work from the WB project schematic.
parameter_list = Parameters.GetAllParameters() # retrieve all parameters input_parameter_list = [item for item in parameter_list if item.Usage =='Input'] # work only with input parameters for index,value in enumerate(input_parameter_list): try: print(input_parameter_list[index].Name) print(input_parameter_list[index].DisplayText) print(input_parameter_list[index].Expression) print(input_parameter_list[index].Value.Value) print(input_parameter_list[index].Value.Unit) except: print(input_parameter_list[index].Name) print(input_parameter_list[index].DisplayText) print(input_parameter_list[index].Expression) print(input_parameter_list[index].Value) print('NA')
0