How to toggle between Vetor and Contour display for Custom Result object ?

Santhosh M
Santhosh M Member, Employee Posts: 18
First Comment First Anniversary Ansys Employee 5 Likes
✭✭✭

Hi Team.

For standard Total Displacement Result, it is possible to toggle between Contour and Vector plots.

in XML code for custom <result> object, Type is set as Vector.

<result name="DispScale" version="1" caption="DispScale" icon="Scale" location="node" type="vector" timehistory="false" unit="Length">IronPython Code, to supply list of 3 elements for every node.
Disp = reader.GetResult("U")
UnitConvFact=units.ConvertToUserUnit(ExtAPI,1.,"m","Length")

for id in collector.Ids:
temp = Disp.GetNodeValues(id)
#ux = float(ScaleFact) * temp[0]
Disp_unitCor=map(lambda x: x / float(UnitConvFact), temp)
Disp_mod=map(lambda x: x * float(ScaleFact), Disp_unitCor)
collector.SetValues(id, Disp_mod)
Now is there any way to toggle the display for this custom result object between Contour and Vector, like it is done for standard Total Deformation Object.I tired below API, but it did not help.

ExtAPI.Application.ScriptByName("jscript").ExecuteCommand("DS.Script.DoGraphicsContourVectorToggle()")