sylesej
Mechanical
- Jun 27, 2016
- 4
I am trying to export my data from the .odb file for further processing. My approach looks something like this:
[tt]displacement = lastFrame.fieldOutputs['U'] #So far so good
fieldValues = displacement.values[/tt]
But when I now tries to access the values as shown in the Scripting users manual
[tt]print fieldValues.data[0][/tt]
I get the error
[tt]AttributeError: 'FieldValueArray' object has no attribute 'data'[/tt]
At this point I looked around a little and found that according to numpy fieldValues is an array with the shape [tt](424L,)[/tt]. However when I tries to access these values the answer is always
[tt]print fieldValues[113]
openOdb(r'C:/.../outputdatabase.odb').steps['Step-1'].frames[1].fieldOutputs['U'].values[113][/tt]
Which is not for much help.
I am able to plot and probe the values using the gui, so I know they are there. So, can you help me accessing my deflection values?
I also tried recording a macro with the gui where I probed for the values I wanted, but the probe part did not get recorded in the macro.
My model is a three dimensonal model, while the approach I have used is from the users manual and is based off a 2d model, so that might be one cause for the errors.
Alternative solutions are also welcome, I don't need the deflection values at all points, but it would be an advantage.
[tt]displacement = lastFrame.fieldOutputs['U'] #So far so good
fieldValues = displacement.values[/tt]
But when I now tries to access the values as shown in the Scripting users manual
[tt]print fieldValues.data[0][/tt]
I get the error
[tt]AttributeError: 'FieldValueArray' object has no attribute 'data'[/tt]
At this point I looked around a little and found that according to numpy fieldValues is an array with the shape [tt](424L,)[/tt]. However when I tries to access these values the answer is always
[tt]print fieldValues[113]
openOdb(r'C:/.../outputdatabase.odb').steps['Step-1'].frames[1].fieldOutputs['U'].values[113][/tt]
Which is not for much help.
I am able to plot and probe the values using the gui, so I know they are there. So, can you help me accessing my deflection values?
I also tried recording a macro with the gui where I probed for the values I wanted, but the probe part did not get recorded in the macro.
My model is a three dimensonal model, while the approach I have used is from the users manual and is based off a 2d model, so that might be one cause for the errors.
Alternative solutions are also welcome, I don't need the deflection values at all points, but it would be an advantage.