How to check if the Analysis System in WB contains a particular component?
Ayush Kumar
Member, Moderator, Employee Posts: 470
✭✭✭✭
How to check if the Analysis System in WB contains a particular component? For example check if Analysis System "example" contains "Results":
Tagged:
0
Answers
-
The System object has all the components in the Attribute
Components
. You can use the following code:# Get the relevant system system = GetAllSystems()[2] # Filter out the results component result_component = filter(lambda x: ("Results" in x.Name), system.Components) # If not present the list is empty if result_component: print("Yes the component is there!") else: print("Sorry the component is missing!")
2 -
I don't fully understand your question. Would you mind elaborating a bit in it? E.g. It's not clear how the image relates to the example you give.
2 -
@James Derrick: Actually it is pretty straightforward. The rows in the analysis system are components. The question is to check if the analysis system contains a certain component for example the "Result" row. Modified some pictures, is it clear now?
2 -
I was thinking less for me and more for potential future readers, if that makes sense?
0