In Ansys medini analyze, error, warning, and info messages concerning projects in the
workspace are called issues. By calling functions on the Issues
global object, you can access issues for all projects or for a specific project. You can
also add and remove issues.
getAllIssues()
{Function} - Returns a list of all current issues found in the workspace.
var allIssues = Issues.getAllIssues(); console.log("There are {0} issues in the workspace, {1} of them are errors", allIssues.size(), allIssues.toArray().filter((i) => i.severity == 4).length);Stability 1 - Experimental
forProject()
{Function} - Returns an
ProjectIssuesobject to handle all current issues found in a specified project in the workspace. The object includes functions to list, add, and remove issues for the specified project.var ProjectIssues = Issues.forProject(finder.project); var issues = ProjectIssues.getIssues(); if (!issues.isEmpty()) { ProjectIssues.removeIssues(issues); ProjectIssues.addIssue(2, finder.project, "There were {1} issues before which the script removed", "No resolution", [ issues.size() ]); } else { ProjectIssues.addIssue(1, finder.project, "The script did not find any issue", "No resolution", [ ]); }Stability 1 - Experimental