🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Toggle selection type to "Elements" from "Component"

User: "Guy01"
Altair Community Member
Updated by Guy01

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)

 

 

image.png.652916e4dea410ba6f195bed571c28f6.png

 

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

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "llyle_20499"
    New Altair Community Member
    Updated by llyle_20499

    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.