We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Preprocessing

Preprocessing

Topics related to geometry, meshing, and CAD.

Generate automatic metric report from ANSYS Meshing

    • admin
      Ansys Employee

      How to generate automatic metric report from ANSYS Meshing?

    • admin
      Ansys Employee

      1) Copy/paste the code below into a file with the suffix "*.js" 2) Run the Jscript file in ANSYS Meshing via "Tools -> Run Macro" //+++++++++ JScript code ++++++++// var DS = WB.AppletList.Applet( "DSApplet" ).App; var Nodes=DS.Tree.GetObjectByName("Mesh"); // Choose the metric to evaluate Nodes.MeshMetric=7; // 1=Element Quality, ..., 7=Skewness DS.Script.doMeshMetrics(); // Access properties var nelements = Nodes.Elements; // number of elements var nnodes = Nodes.Nodes; // number of nodes var min = Nodes.MeshMetricMin; // minimum value depending on the choice of the mesh metrics var max = Nodes.MeshMetricMax; // maximum value depending on the choice of the mesh metrics var avg = Nodes.MeshMetricAverage; // average value depending on the choice of the mesh metrics /// write to file var fso = new ActiveXObject("Scripting.FileSystemObject"); var a = fso.CreateTextFile("c:testfile.txt", true); a.WriteLine("Mesh Metrics"); var str1 = "Number of Elements = " + String(nelements); a.WriteLine(str1); var str2 = "Number of Nodes = " + String(nnodes); a.WriteLine(str2); var str3 = "Minimum Metric Value = " + String(min); a.WriteLine(str3); var str4 = "Maximum Metric Value = " + String(max); a.WriteLine(str4); a.Close(); //+++++++++ END ++++++++//

Viewing 1 reply thread
  • The topic ‘Generate automatic metric report from ANSYS Meshing’ is closed to new replies.