Plotting Dynamic MinMax Result in Measure panel
Hi,
I need to plot a dynamic MinMax Result for a component
This is how i am doing
hwi OpenStack
hwi GetSessionHandle sess
sess GetProjectHandle proj
sess New
proj GetPageHandle page [proj GetActivePage]
page SetActiveWindow 1
page GetWindowHandle win 1
win SetClientType 'Animation'
win GetClientHandle cli
win GetViewControlHandle vw
set model_id [cli AddModel 'C:/Users/vreddy26/My_Work_Space/HYPERMESH/2018_WORK/Naveen_DriveShaft/Analysis_3_Dynamic_Stress_Sweep/Max_stress/Stress_imbalance_cogmass_latest_imbal_load_wo_damper_TPV.h3d';]
cli GetModelHandle model $model_id
model SetResult 'C:/Users/vreddy26/My_Work_Space/HYPERMESH/2018_WORK/Naveen_DriveShaft/Analysis_3_Dynamic_Stress_Sweep/Max_stress/Stress_imbalance_cogmass_latest_imbal_load_wo_damper_TPV.h3d'
model GetResultCtrlHandle res
res GetContourCtrlHandle cntr
cntr GetLegendHandle lgnd
win SetClientType 'Animation'
page GetAnimatorHandle animator
set subcase 1
set str_dataType 'Element Stresses (2D)'
set str_dataComp 'Von Mises Stress'
model GetSelectionSetHandle Sets 1
model MaskAll system
model MaskAll part
model UnMask [Sets GetID]
res SetCurrentSubcase $subcase
set n_step [expr [animator GetNumberOfSteps]-1]
animator SetCurrentStep $n_step
#clh$j Draw
cntr SetSelectionSet [Sets GetID]
cntr SetDataType $str_dataType
cntr SetDataComponent $str_dataComp
cntr SetAverageMode Simple
cntr SetEnableState true
cli Draw
animator SetAnimationMode 'transient'
page StartAnimation
#WORKING FINE UP TO HERE###
#Plotting Graph###########ISSUE IS FROM HERE
page SetLayout 1
set window_idx 2
page GetWindowHandle win2 $window_idx
win2 SetClientType 'Plot'
cli GetMeasureList
cli GetMeasureHandle m1 2
m1 SetDisplayMode max true
set measure_item_idx 0
m1 AddDynamicCurveToPlot $measure_item_idx 'y_comp' win2
cli Draw
Its drawing only one point.How can i correct this for proper plot.
Do i need to add anything
Thanks in advance
Answers
-
I have the same issue. Is there an easier way to get that?
0 -
Hope this may help
animator SetCurrentStep 0
::post::Draw
set meas_id [client_handle AddMeasure 'Relative displacement']
client_handle GetMeasureHandle mesr_handle $meas_id
mesr_handle SetType 'Relative displacement'mesr_handle SetDisplayMode x_comp True
mesr_handle SetDisplayMode y_comp False
mesr_handle SetDisplayMode z_comp False
mesr_handle SetResultSystem -3
mesr_handle SetDisplayMode ID False
mesr_handle SetDisplayMode Mag False
mesr_handle SetDisplayMode System False
mesr_handle SetDisplayMode label Falsemesr_handle AddNode $legend_max_node_id
page_handle SetLayout 3
page_handle GetWindowHandle window2 2
window2 SetClientType 'Plot'
mesr_handle AddDynamicCurveToPlot 0 'x_comp' window2mesr_handle AddNode 90009601
mesr_handle AddDynamicCurveToPlot 1 'x_comp' window2
animator Stop0