The following enhancements are available in ANSYS ACT 18.2. All referenced topics are in the ANSYS ACT Developer's Guide.
Note: For beta features, documentation is available on the ANSYS Customer Portal. After selecting to display the ACT Resources page, expand the section, where you will find links for ACT beta documents.
ANSYS ACT has superseded the SDK and External Connection Add-In as the best-in-class tool set for customizing ANSYS products. We encourage all customers and partners engaged in Workbench customization to transition to ACT. ANSYS 18.2 includes the final public distribution of the ANSYS Workbench Software Development Kit (SDK) and the final release of the External Connection Add-In. Existing SDK-based content providers seeking specific end-of-life support can contact their local ANSYS account manager or established support representatives.
ACT delivers a simple yet powerful approach to Workbench customization with an emphasis on ease of use and consistency. ACT workflows specifically accommodate the SDK user base by improving on the external application data integration opportunities offered by the SDK.
ACT workflows continue to benefit from the full-featured host platform of ANSYS Workbench. Traditional coverage includes Project Schematic exposure, ANSYS product data transfer, design exploration through parameterization, and remote execution management. Users will also discover new and time-saving features made possible only through the simplicity and product portfolio coverage of ACT.
Additionally, past SDK prerequisites of separate ANSYS installation packages, Integrated Development Environments, and code compilation routines no longer apply to ACT application creation. In-product developer tools provide automated workflow construction, essential API discovery, application verification, and deployment preparation.
Learn more by accessing the ANSYS ACT Developer's Guide from the ANSYS Help or logging on to the ACT Resources page from the ANSYS Customer Portal.
The ExtAPI.Graphics.ExportScreenToImage command provides for
exporting the current graphical view in Mechanical to a PNG file. When you use this command,
the exported view retains the same orientation, zoom factor, and other graphics rendering
properties as the view in ANSYS Mechanical, which is essential when you want to compare views to see
changes in results. For more information, see Graphical Views.
ACT wizard extensions for AIM are called custom templates. You no
longer have to place custom help files for a custom template in a
help folder within the ACT extension. You can store custom help
files in any folder within the extension as long as the <step>
blocks in the XML definition file reference the relative paths for the HTML files to display
in help panels.
Additionally, for both AIM and non-AIM wizard extensions, you can now choose from two
options for defining custom help for properties. You can either create HTML files or define
help text directly in <property> blocks in the extension's XML
file.
For more information, see Custom Help for Wizards.
ACT workflows provide generic typeless connectivity to enabled custom tasks and targeted pre-installed tasks. In addition to supporting the pre-installed task groups and tasks listed in Appendix E, general data transfer now supports ACT-integrated external solver systems. For more information, see Defining Task-Level General Data Transfer.
An ACT extension for ANSYS Fluent can now encapsulate one or more UDF libraries. Using the
new <udf> tag in the <simdata> block,
you declare where the UDF folder containing these libraries is located. Because the UDF
libraries are packaged with the extension, when the extension is installed, ACT can load
these libraries. For more information, see Capabilities for ANSYS Fluent.
The graphics window in SpaceClaim is now stable when running an ACT wizard extension for SpaceClaim. To achieve this stability and also to enhance performance, the graphics window is not updated until the callbacks for a step have been executed.
The introduction of the ANSYS ACT Developer's Guide now includes a summary of all referenced extension examples for your convenience. For more information, see Summary: Extension Examples.
The ACT Debugger is a standalone utility for debugging ACT extensions. Introduced in 18.2 as a beta feature, you can use the ACT Debugger to observe the run-time behaviour of your app step by step, quickly locating logic errors in your code. For more information, refer to the ACT Debugger (Beta) 18.2 document on the ANSYS Customer Portal.
The ACT Workflow Designer makes creating custom workflows easy. While you can still manually create ACT custom workflows and extensions, you can now choose to use the Workflow Designer instead. This 18.2 beta feature automates workflow setup, relieving the burden of creating an ACT extension from scratch. Using the Workflow Designer, creation of a task group and tasks is a quick and interactive process. For more information, refer to the ACT Workflow Designer (Beta) 18.2 document on the ANSYS Customer Portal.
The ACT App Builder is a standalone utility for creating ACT extensions in a visual environment. Introduced as a beta feature in 18.0 and further enhanced in both 18.1 and 18.2, the ACT App Builder can be launched from either Workbench or AIM to create and edit XML code for an ACT extension within a graphical user interface. For information on the new resource manager, refer to the ACT App Builder (Beta) 18.2 document on the ANSYS Customer Portal.
You can use a beta version of a new method to retrieve Mechanical results for postprocessing. This method uses an external executable in addition to the Mechanical process. By using the postprocessing API via this method, you transparently control the instantiation of the results reader and postprocess results without interfering with Mechanical, especially in the case of analysis over several time steps. This method improves postprocessing performance by avoiding unnecessary actions that could be automatically executed in a standard use of Mechanical. This method is available only with the Windows platform.
To enable or disable the use of this method, you set the variable
ExtAPI.UsesStandaloneActResultReaderImplementation to
True or False. This variable is set to
False by default.
Example code:
# Activate postprocessing via external executable
ExtAPI.UsesStandaloneActResultReaderImplementation = True
# Read the Stress from the specified result file
rst = r"C:\\test\\file.rst"
reader = ExtAPI.Tools.GetResultsDataFromFile(rst)
nbSteps = reader.ResultSetCount
rs = reader.GetResult("S")
for i in range(nbSteps):
reader.CurrentResultSet = i+1
s = rs.GetElementValues(elemIds,False)
reader.Dispose()
# Deactivate postprocessing via external executable
ExtAPI.UsesStandaloneActResultReaderImplementation = FalseAs the result reader is in a separate process, to ensure good performance, it is necessary to use the two following methods to get the nodal results and the elemental results.
To retrieve nodal results efficiently, you must use one call to get the results for a set
of nodes. The method GetNodeValues takes as arguments an array of
node indices and returns an array with the values of each selected component of the required
result at each node sequentially.
Declaration syntax:
public double[] GetNodeValues(int[] nodeIds)
Where nodeIds is the array of integers containing the list of the
node indices for which result values are required.
Example code:
reader=ExtAPI.DataModel.AnalysisList[0].GetResultsData()
mesh=reader.CreateMeshData()
mesh=ExtAPI.DataModel.MeshDataByName("Global")
nodeIds = mesh.NodeIds
ru=reader.GetResult("U")
u = ru.GetNodeValues(nodeIds)> nodeIds = [ 1, 2, …] > u = [ U1X, U1Y, U1Z, U2X, U2Y, U2Z, …]
To retrieve element results efficiently, you must use one call to get the results for a
set of elements. The method GetElementValues takes as arguments an
array of element indices and returns an array with the values of each selected component of
the required result for each element sequentially.
Declaration syntax:
public double[] GetElementValues(int[] elementIds, boolean computeMidSideNodes)
Where:
elementIds is the array of integers containing the list
of element indices for which result values are required.
computeMidSideNodes indicates if the method is to
return only values at corner nodes or values at both corner nodes and midside
nodes. When set to False, only values at corner nodes are
returned. When set to True, values at both corner nodes
and midside nodes are returned.
Example code:
reader=ExtAPI.DataModel.AnalysisList[0].GetResultsData()
mesh=reader.CreateMeshData()
mesh=ExtAPI.DataModel.MeshDataByName("Global")
elemIds = mesh.ElementIds
re=reader.GetResult("S")
s = re.GetElementValues(elemIds,False)>elemIds = [1, 2, …] >s = [ S11X, S11Y, S12X, S12Y, S13X, S13Y, S21X, S21Y, …]
In this example, each element has three nodes. The stress values are located at the nodes
of the elements. Thus, SijX is the value of component
X for the stress result at node j of
element i.
In the case of a 2D geometry, the result array returned by the method
GetNodeValues or GetElementValues stays
dimensioned as for a 3D geometry. However, the values for the third dimension are dummy
values.
For shell elements, the method GetElementValues returns the values
for the three positions in this order:
Bottom
Top
Middle
Example code:
elemIds = mesh.ElementIds
re=reader.GetResult("S")
re.SelectComponents([“X”])
s = re.GetElementValues(elemIds,False)
>elemIds = [1, 2, …]
>s = [ S11X_bottom, S12X_bottom, S13X_bottom,
S11X_top, S12X_top, S13X_top,
S11X_middle, S12X_middle, S13X_middle,
S21X_bottom, S22X_bottom, S23X_bottom, …]Degenerated elements are not supported.