Display a Contour Plot
Finally, we can complete the rule by adding a command to create a contour plot after the solution is complete.
- Copy the following text:
strCmdForDisplayContour = "<Contour ID=""1""/>" ' New Material i = AddinObj.Run(strCmdForNewMaterial) ' New Idealization i = AddinObj.Run(strCmdForNewIdealization) ' Mesh Model i = AddinObj.Run(strCmdForMeshModel) ' Generate Mesh i = AddinObj.Run(strCmdForMesh) ' Create Load i = AddinObj.Run(strCmdForLoad) ' Create Constraint i = AddinObj.Run(strCmdForConstraint) ' Run Analysis i = AddinObj.Run(strCmdForSolve) iLogicVb.UpdateWhenDone = True End Sub
- Paste the text below the existing commands in the Edit Rule dialog.
Run the Rule
Now we are ready to save the rule and run it.
- Click Save and then click Close to exit the Edit Rule dialog.
- Switch to the Autodesk Nastran Model tree browser, and under Model tree, delete Solid 1 Idealization and the Generic material.
- Switch back to the iLogic browser, right-click in the white space of the browser and choose Run All Rules.
- If you receive a warning about multiple idealizations, click OK.
- When the solution is complete, click
OK to view the contour plot.