Toggle selection type to "Elements" from "Component"
Hello
I am trying to code a custom vonMises stress result.
I am unable to change the selection type from component to elements (image below)
Below the code i used:
hwi GetSessionHandle sess
sess GetProjectHandle proj
proj GetPageHandle page1 [proj GetActivePage ]
page1 GetWindowHandle win1 [page1 GetActiveWindow]
win1 GetClientHandle po1
po1 GetModelHandle mo1 [po1 GetActiveModel ]
mo1 GetResultCtrlHandle res
res GetContourCtrlHandle contour_ctrl
contour_ctrl SetEnableState true
po1 SetDisplayOptions 'contour' true
po1 SetDisplayOptions 'legend' true
contour_ctrl SetDataType 'Stress'
contour_ctrl SetDataComponent node 'vonMises'
contour_ctrl SetShellLayer 'max'
contour_ctrl SetCornerDataEnabled true
contour_ctrl SetAverageMode 'Advanced'
contour_ctrl SetAvgAcrossPartsEnable true
I have spent hours of searching for changing the type of selection in console with APIs. Can anyone help?
Thanks in advance
Hi Roche,
You will have to use selectionsets to show only the elements needed on the screen, then apply contour and get results from the contour. Search AddSelectionSet, SetSelectionSet,
model_handle AddSelectionSet type
Examples using selectionset are already addressed in this forum.