Hi all,
I'm working with ANSYS 2025R2, I'm new in developing, sorry if I ask a silly question.
I'm extending the VMStresses example from Ansys. Till now, I added three properties. I want to run a function after the values (of the first two properties) have been set or changed. But the TestCallback function gets not started. Why? I included a log message in the TestCallback function.
Thanks for your feedback.
<guid shortid="VMStresses"> 3bd77033-f9b4-4970-b427-ef4c77e8cc60 </guid>
<script src="stress_vm.py" />
<interface context="Mechanical">
<images>images</images>
<toolbar name="VM Stress" caption="VM Stress">
<entry name="VM Stress" icon="result">
<callbacks>
<onclick>CreateVMStressResult</onclick>
</callbacks>
</entry>
</toolbar>
</interface>
<simdata context="Mechanical">
<result name="VM Stress" version="1" caption="VM Stress" unit="Stress" icon="result" location="elemnode" type="scalar">
<callbacks>
<evaluate>EvaluateVMStress</evaluate>
</callbacks>
<property name="Geometry" caption="Geometry" control="scoping"></property>
<property name="DisplayOption" caption="Display option" control="text" readonly="true" default="Unaveraged"></property>
<propertygroup name="Group1" caption="Input Data" display="caption">
<property name="R_pN" caption="Value" control="float" unit="Pressure" default="235.0 [MPa]">
<callbacks>
<SetValue>TestCallback</SetValue>
</callbacks>
</property>
<property name="K_dp" caption="Factor" control="float" default="1.0" >
<callbacks>
<SetValue>TestCallback</SetValue>
</callbacks>
</property>
</propertygroup>
<propertygroup name="Group2" caption="Result Data" display="caption">
<property name="R_p" caption="Factor * Value" control="float" unit="Pressure" readonly="true" default="1.0 [MPa]"/>
</propertygroup>
</result>
</simdata>