How to specify the child attributes #620
-
Hi, Thanks Code snipets: for frame in eventframes:
print(f"------------------\nFrame name: {frame.Name}\n------------------")
for attribute in frame.Attributes:
elem = db.descendant(r'\\PRDPAF01R\Alouette\Secteurs\Electrolyse\MSE\MSE-01')
attr = elem.attributes['Jaugeage'] #Here ? how to get Distance
values = attr.recorded_values(frame.StartTime, frame.EndTime, "interpolate").drop_duplicates()
print(values)
print() |
Beta Was this translation helpful? Give feedback.
Answered by
Hugovdberg
Nov 10, 2021
Replies: 1 comment 1 reply
-
The attribute object has an attribute called for frame in eventframes:
print(f"------------------\nFrame name: {frame.Name}\n------------------")
for attribute in frame.Attributes:
elem = db.descendant(r'\\PRDPAF01R\Alouette\Secteurs\Electrolyse\MSE\MSE-01')
attr = elem.attributes['Jaugeage']
values = attr.recorded_values(frame.StartTime, frame.EndTime, "interpolate").drop_duplicates()
distance = attr.children['Distance'] # <- like this
distance_values = distance.recorded_values(frame.StartTime, frame.EndTime, "interpolate").drop_duplicates()
print(values)
print() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bujos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The attribute object has an attribute called
children
which you can use to access child attributes: