Jump to content
Guy01

Toggle selection type to "Elements" from "Component"

Recommended Posts

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

Share this post


Link to post
Share on other sites

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. 

tinh and Guy01 like this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...