How can I show/hide Mesh on a contour result?
Ayush Kumar
Member, Moderator, Employee Posts: 470
✭✭✭✭
Best Answers
-
Setting
edgeDisplay
to3
will show the Mesh, to hide it set it to any other value:graphics = ExtAPI.DataModel.InternalObject["ds"].Graphics graphics.ResultPrefs.edgeDisplay = 3 graphics.Refresh()
0 -
Function ExtAPI.DataModel.InternalObject["ds"].Graphics.ResultPrefs.edgeDisplay has several options which are worth to be commented. Please see below code:
No wireframe: value 0
Undeformed WireFrame: value 1
Undeformed Model: value 2
Show elements: value 3 (explained in the first answer)
graphics = ExtAPI.DataModel.InternalObject["ds"].Graphics # No wireframe #graphics.ResultPrefs.edgeDisplay = 0 #graphics.Refresh() # Undeformed wireframe # graphics.ResultPrefs.edgeDisplay = 1 # graphics.Refresh() # Undefromed model # graphics.ResultPrefs.edgeDisplay = 2 # graphics.Refresh() # Show elements # graphics.ResultPrefs.edgeDisplay = 3 # graphics.Refresh()
4
Answers
-
This is not working anymore in version 2023 R2.
Can you please share the new code with sma functionality? Thanks
0 -
Prefs = ExtAPI.Graphics.ViewOptions.ResultPreference
Prefs.ShowMaximum=False
Prefs.ShowMinimum=False
Prefs.ExtraModelDisplay=MechanicalEnums.Graphics.ExtraModelDisplay.NoWireframe0