We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
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.