Separate value from unit
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
In the following piece of code:
solution = ExtAPI.DataModel.Project.Model.Analyses[0].Solution # reference solution results = solution.GetChildren(DataModelObjectCategory.Result,True) # get list of results in solution time=list() for result in results: time.append(result.Time) print(time)
I get both value of time and unit of time in the list.
How can I get on the value, and not the unit?
Tagged:
0
Best Answer
-
You can use:
result.Time.Value result.Time.Unit
to only retrieve the value or the unit.
0