Professional Documents
Culture Documents
Toolkit
© 2012 SAS IP, Inc. All rights reserved. Unauthorized use, distribution or duplication is prohibited.
ANSYS, ANSYS Workbench, Ansoft, AUTODYN, EKM, Engineering Knowledge Manager, CFX, FLUENT, HFSS and any
and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks or
trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries. ICEM CFD is a trademark used
by ANSYS, Inc. under license. CFX is a trademark of Sony Corporation in Japan. All other brand, product, service
and feature names or trademarks are the property of their respective owners.
Disclaimer Notice
THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.
For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).
Third-Party Software
See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software
and third-party software. If you are unable to access the Legal Notice, please contact ANSYS, Inc.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. iii
ANSYS Workbench Application Customization Toolkit
Name ....................................................................................................................................... 16
Options .................................................................................................................................... 16
ParentCaption .......................................................................................................................... 16
ParentPropertyGroup ............................................................................................................... 16
QuantityName .......................................................................................................................... 16
ReadOnly ................................................................................................................................. 16
UniqueName ............................................................................................................................ 17
UnitString ................................................................................................................................. 17
Value ........................................................................................................................................ 17
ValueString ............................................................................................................................... 17
Visible ...................................................................................................................................... 17
GetAttributeValue(string) .......................................................................................................... 17
GetAttributeValueAsString(string) ............................................................................................. 18
ISimPropertyGroup ......................................................................................................................... 18
Display ..................................................................................................................................... 18
ISimPropertyTable .......................................................................................................................... 18
ActiveRow ................................................................................................................................ 19
RowCount ................................................................................................................................ 19
UpdateStateFreq ...................................................................................................................... 19
ValidState ................................................................................................................................. 19
AddRow() ................................................................................................................................. 19
DeleteRow(int) ......................................................................................................................... 20
SaveActiveRow() ....................................................................................................................... 20
ISimResult ...................................................................................................................................... 20
CalculateTimeHistory ................................................................................................................ 20
Location ................................................................................................................................... 21
Suppressed .............................................................................................................................. 21
Type ......................................................................................................................................... 21
Unit .......................................................................................................................................... 21
ISimSolver ...................................................................................................................................... 21
AnalysisType ............................................................................................................................ 22
PhysicsType .............................................................................................................................. 22
LocationTypeEnum ......................................................................................................................... 22
ResultTypeEnum ............................................................................................................................. 22
UpdateStateFreqEnum ................................................................................................................... 23
ValidStateEnum .............................................................................................................................. 23
Ansys.AAP.PublicAPIs.Mesh Namespace ............................................................................................ 25
ElementTypeEnum ......................................................................................................................... 25
IElement ......................................................................................................................................... 26
Area ......................................................................................................................................... 26
Centroid ................................................................................................................................... 26
CornerNodeIds ......................................................................................................................... 26
Id ............................................................................................................................................. 27
NodeIds ................................................................................................................................... 27
Type ......................................................................................................................................... 27
Volume .................................................................................................................................... 27
IMeshData ...................................................................................................................................... 27
ElementCount .......................................................................................................................... 28
ElementIds ............................................................................................................................... 28
NodeCount ............................................................................................................................... 28
NodeIds ................................................................................................................................... 28
Unit .......................................................................................................................................... 29
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
iv of ANSYS, Inc. and its subsidiaries and affiliates.
ANSYS Workbench Application Customization Toolkit
ElementById(int) ....................................................................................................................... 29
ElementIdsFromNodeIds(IEnumerable<int>) ............................................................................. 29
MeshRegionById(int) ................................................................................................................ 29
NodeById(int) ........................................................................................................................... 30
NodeIdsFromElementIds(IEnumerable<int>) ............................................................................. 30
IMeshRegion .................................................................................................................................. 30
ElementCount .......................................................................................................................... 31
ElementIds ............................................................................................................................... 31
NodeCount ............................................................................................................................... 31
NodeIds ................................................................................................................................... 31
INode ............................................................................................................................................. 31
ConnectedElementIds .............................................................................................................. 32
Id ............................................................................................................................................. 32
X .............................................................................................................................................. 32
Y .............................................................................................................................................. 32
Z .............................................................................................................................................. 32
Ansys.AAP.PublicAPIs Namespace ...................................................................................................... 33
GeoBodyTypeEnum ........................................................................................................................ 33
GeoCellTypeEnum .......................................................................................................................... 33
GeoCurveTypeEnum ....................................................................................................................... 34
GeoSurfaceTypeEnum .................................................................................................................... 34
IDataModel .................................................................................................................................... 35
AnalysisList ............................................................................................................................... 35
AnalysisNames ......................................................................................................................... 35
GeoData ................................................................................................................................... 36
MeshDataNames ...................................................................................................................... 36
AnalysisById(int) ....................................................................................................................... 36
AnalysisByName(string) ............................................................................................................ 36
CurrentConsistentUnitFromQuantityName(string) ..................................................................... 36
CurrentUnitFromQuantityName(string) ..................................................................................... 37
MeshDataByName(string) ......................................................................................................... 37
ILog ................................................................................................................................................ 37
LogFilename ............................................................................................................................ 38
ViewLog() ................................................................................................................................. 38
WriteError(string) ...................................................................................................................... 38
WriteMessage(string) ................................................................................................................ 38
Ansys.AAP.PublicAPIs.Geometry Namespace .................................................................................... 39
IGeoAssembly ................................................................................................................................ 39
Dimension ................................................................................................................................ 39
Name ....................................................................................................................................... 40
Parts ......................................................................................................................................... 40
Unit .......................................................................................................................................... 40
IGeoBody ....................................................................................................................................... 40
Area ......................................................................................................................................... 41
BodyType ................................................................................................................................. 41
CrossSection ............................................................................................................................ 41
CrossSectionOffset ................................................................................................................... 41
CrossSectionOffsetType ............................................................................................................ 41
Edges ....................................................................................................................................... 42
Faces ........................................................................................................................................ 42
Length ..................................................................................................................................... 42
Material .................................................................................................................................... 42
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. v
ANSYS Workbench Application Customization Toolkit
Name ....................................................................................................................................... 42
Shells ....................................................................................................................................... 42
Suppressed .............................................................................................................................. 43
Thickness ................................................................................................................................. 43
Vertices .................................................................................................................................... 43
Volume .................................................................................................................................... 43
IGeoData ........................................................................................................................................ 43
Assemblies ............................................................................................................................... 44
GeoEntityById(int) .................................................................................................................... 44
IGeoEdge ....................................................................................................................................... 44
CrossSectionOrientation ........................................................................................................... 45
CurveType ................................................................................................................................ 45
EndVertex ................................................................................................................................. 45
Extents ..................................................................................................................................... 45
Faces ........................................................................................................................................ 46
IsParamReversed ...................................................................................................................... 46
Length ..................................................................................................................................... 46
StartVertex ............................................................................................................................... 46
Vertices .................................................................................................................................... 46
ParamAtPoint(double[]) ............................................................................................................ 46
PointAtParam(double) .............................................................................................................. 47
PointsAtParams(double[]) ......................................................................................................... 47
TangentAtParam(double) .......................................................................................................... 47
TangentsAtParams(double[]) ..................................................................................................... 47
IGeoEntity ...................................................................................................................................... 48
Id ............................................................................................................................................. 48
Type ......................................................................................................................................... 48
IGeoFace ........................................................................................................................................ 48
Area ......................................................................................................................................... 49
Body ........................................................................................................................................ 49
Edges ....................................................................................................................................... 49
Loops ....................................................................................................................................... 50
Shell ......................................................................................................................................... 50
SurfaceType ............................................................................................................................. 50
Vertices .................................................................................................................................... 50
NormalAtParam(double, double) ............................................................................................... 50
NormalsAtParams(double[]) ...................................................................................................... 51
ParamAtPoint(double[]) ............................................................................................................ 51
PointAtParam(double, double) .................................................................................................. 51
PointsAtParams(double[]) ......................................................................................................... 51
IGeoLoop ....................................................................................................................................... 52
Edges ....................................................................................................................................... 52
Face ......................................................................................................................................... 52
IGeoPart ......................................................................................................................................... 52
Bodies ...................................................................................................................................... 53
Name ....................................................................................................................................... 53
IGeoShell ........................................................................................................................................ 53
Faces ........................................................................................................................................ 53
IGeoTessellation ............................................................................................................................. 53
FacetCount ............................................................................................................................... 54
Indices ..................................................................................................................................... 54
Normals ................................................................................................................................... 54
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
vi of ANSYS, Inc. and its subsidiaries and affiliates.
ANSYS Workbench Application Customization Toolkit
Points ....................................................................................................................................... 54
IGeoVertex ..................................................................................................................................... 54
Bodies ...................................................................................................................................... 55
Edges ....................................................................................................................................... 55
Faces ........................................................................................................................................ 55
X .............................................................................................................................................. 55
Y .............................................................................................................................................. 56
Z .............................................................................................................................................. 56
Ansys.AAP.PublicAPIs.Results Namespace ......................................................................................... 57
IResult ............................................................................................................................................ 57
Components ............................................................................................................................ 57
Name ....................................................................................................................................... 58
QuantityNames ........................................................................................................................ 58
Units ........................................................................................................................................ 58
ElementValue(int, string) ........................................................................................................... 58
ElementValues(IEnumerable<int>, string) .................................................................................. 58
NodeValue(int, string) ............................................................................................................... 59
NodeValues(IEnumerable<int>, string) ...................................................................................... 59
IResultReader ................................................................................................................................. 59
CurrentResultSet ...................................................................................................................... 60
CurrentTimeFreq ...................................................................................................................... 60
HasImaginaryResults ................................................................................................................ 60
ListTimeFreq ............................................................................................................................. 60
ResultSetCount ......................................................................................................................... 61
ResultsName ............................................................................................................................ 61
Result(string) ............................................................................................................................ 61
Ansys.AAP.PublicAPIs.Analysis Namespace ....................................................................................... 63
CoordinateSystem .......................................................................................................................... 63
CoordinateSystem(CoordinateSystemTypeEnum) ...................................................................... 64
CoordinateSystemType ............................................................................................................. 64
Id ............................................................................................................................................. 64
Matrix ...................................................................................................................................... 64
Name ....................................................................................................................................... 64
Origin ....................................................................................................................................... 65
XAxis ........................................................................................................................................ 65
YAxis ........................................................................................................................................ 65
ZAxis ........................................................................................................................................ 65
CoordinateSystemTypeEnum .......................................................................................................... 65
IAnalysis ......................................................................................................................................... 66
AnalysisType ............................................................................................................................ 67
Components ............................................................................................................................ 67
CoordinateSystems ................................................................................................................... 67
GeoData ................................................................................................................................... 67
Id ............................................................................................................................................. 67
LoadObjects ............................................................................................................................. 68
MeshData ................................................................................................................................. 68
Name ....................................................................................................................................... 68
PhysicsType .............................................................................................................................. 68
PropertyNames ........................................................................................................................ 68
ResultObjects ........................................................................................................................... 68
ResultsData .............................................................................................................................. 69
Solver ....................................................................................................................................... 69
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. vii
ANSYS Workbench Application Customization Toolkit
SolverName .............................................................................................................................. 69
StepsEndTime .......................................................................................................................... 69
WorkingDir ............................................................................................................................... 69
ComponentById(int) ................................................................................................................. 69
CoordinateSystemById(int) ....................................................................................................... 70
CreateLoadObject(string) .......................................................................................................... 70
CreateResultObject(string) ........................................................................................................ 70
CurrentConsistentUnitFromQuantityName(string) ..................................................................... 70
GenerateMesh() ........................................................................................................................ 71
PropertyValue(string) ................................................................................................................ 71
PropertyValue(string, object) ..................................................................................................... 71
Solve(bool) ............................................................................................................................... 71
WriteInputFile(string) ................................................................................................................ 72
IDataObject .................................................................................................................................... 72
Id ............................................................................................................................................. 72
Name ....................................................................................................................................... 73
PropertyNames ........................................................................................................................ 73
Type ......................................................................................................................................... 73
PropertyValue(string) ................................................................................................................ 73
PropertyValue(string, object) ..................................................................................................... 73
IDataObjectCollection .................................................................................................................... 74
Ids ............................................................................................................................................ 74
List ........................................................................................................................................... 74
Names ...................................................................................................................................... 74
GetById(int) .............................................................................................................................. 75
GetByName(string) ................................................................................................................... 75
GetEnumerator() ....................................................................................................................... 75
NamesByType(string) ................................................................................................................ 75
IDataObjectContainer ..................................................................................................................... 76
DataObjects ............................................................................................................................. 76
Ansys.AAP.PublicAPIs.Extension Namespace .................................................................................... 77
IApplication .................................................................................................................................... 77
ScriptNames ............................................................................................................................. 77
LogError(string) ........................................................................................................................ 77
LogWarning(string) ................................................................................................................... 78
ScriptByName(string) ................................................................................................................ 78
IExtension ...................................................................................................................................... 78
Name ....................................................................................................................................... 79
ScriptEngine ............................................................................................................................. 79
ScriptScope .............................................................................................................................. 79
Version ..................................................................................................................................... 79
IExtensionAPI ................................................................................................................................. 79
Application ............................................................................................................................... 80
Context .................................................................................................................................... 80
DataModel ............................................................................................................................... 80
ExtensionMgr ........................................................................................................................... 80
Graphics ................................................................................................................................... 81
Log .......................................................................................................................................... 81
SelectionMgr ............................................................................................................................ 81
LockPrePostLicense() ................................................................................................................ 81
ResultsData(string) ................................................................................................................... 81
UnlockPrePostLicense() ............................................................................................................. 82
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
viii of ANSYS, Inc. and its subsidiaries and affiliates.
ANSYS Workbench Application Customization Toolkit
IExtensionMgr ................................................................................................................................ 82
CurrentExtension ...................................................................................................................... 82
Extensions ................................................................................................................................ 82
Ansys.AAP.PublicAPIs.Graphics Namespace ...................................................................................... 83
IDraw3DContext ............................................................................................................................. 83
Color ........................................................................................................................................ 84
DepthTest ................................................................................................................................ 84
LineWeight ............................................................................................................................... 84
Translucency ............................................................................................................................ 84
Visible ...................................................................................................................................... 84
Close() ...................................................................................................................................... 85
DrawCircle(IEnumerable<double>, double, IEnumerable<double>) ........................................... 85
DrawDisc(IEnumerable<double>, double, IEnumerable<double>) ............................................. 85
DrawPoints(IEnumerable<double>) .......................................................................................... 85
DrawPolygon(IEnumerable<double>, IEnumerable<double>) ................................................... 86
DrawPolyline(IEnumerable<double>) ....................................................................................... 86
DrawShell(IEnumerable<double>, IEnumerable<double>, IEnumerable<int>) ........................... 86
DrawShell(IEnumerable<double>, IEnumerable<double>, IEnumerable<int>, IEnumer-
able<int>) ................................................................................................................................ 87
IGraphics ........................................................................................................................................ 87
Color ........................................................................................................................................ 88
LineWeight ............................................................................................................................... 88
MainHandle .............................................................................................................................. 88
MainWindow ............................................................................................................................ 89
Translucency ............................................................................................................................ 89
CreateAndOpenDraw3DContext() ............................................................................................. 89
DrawText2D(int, int, string) ........................................................................................................ 89
LineTo2D(int, int) ...................................................................................................................... 89
MoveTo2D(int, int) .................................................................................................................... 90
PixelToWorld(IEnumerable<int>) .............................................................................................. 90
PixelToWorld(int, int) ................................................................................................................. 90
WorldToPixel(IEnumerable<double>) ........................................................................................ 91
WorldToPixel(double, double, double) ....................................................................................... 91
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. ix
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
x of ANSYS, Inc. and its subsidiaries and affiliates.
Part I: Namespaces
Ansys.AAP.PublicAPIs.Selection Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Selection
Table 1: Members
ISelectionInfo
SelectionInfo class
Declaration Syntax
public interface ISelectionInfo
Table 2: Members
Id
Gets or sets the ID of this ISelectionInfo object.
Declaration Syntax
public int Id { set;get; }
Ids
Gets or sets selected IDs.
Declaration Syntax
public IList<int> Ids { set;get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Ansys.AAP.PublicAPIs.Selection Namespace
Name
Gets or sets the name of this ISelectionInfo object.
Declaration Syntax
public string Name { set;get; }
SelectionType
Gets or sets the selection type.
Declaration Syntax
public SelectionTypeEnum SelectionType { set;get; }
ISelectionMgr
ISelectionMgr Interface
Declaration Syntax
public interface ISelectionMgr
Table 3: Members
CurrentSelection
Returns the current SelectionInfo object.
Declaration Syntax
public SelectionInfo CurrentSelection { get; }
AddSelection(SelectionInfo)
Adds to the current selection from a SelectionInfo object.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
SelectionTypeEnum
Declaration Syntax
public void AddSelection(SelectionInfo info)
Parameters
info(SelectionInfo)
The selection data as a SelectionInfo object.
ClearSelection()
Clears the current selection.
Declaration Syntax
public void ClearSelection()
NewSelection(SelectionInfo)
Creates a new selection from a SelectionInfo object.
Declaration Syntax
public void NewSelection(SelectionInfo info)
Parameters
info(SelectionInfo)
The selection data as a SelectionInfo object.
SelectionTypeEnum
SelectionTypeEnum enumerator
Declaration Syntax
public enum SelectionTypeEnum
Table 4: Members
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.SimData Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.SimData
Table 5: Members
IPropertyCollection
IPropertiesCollection Interface
Declaration Syntax
public interface IPropertyCollection
Table 6: Members
Property AllDescendants Returns all properties of this collection and all sub col-
lections.
Property Count Returns the number of properties in the collection.
Property GetByNameDictionary Returns a dictionary where the keys are the property
names and value are the properties.
Method Contains(ISimProperty) Checks if the collection contains the property.
Method GetByName(string) Returns a ISimProperty object by its name.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Ansys.AAP.PublicAPIs.SimData Namespace
AllDescendants
Returns all properties of this collection and all sub collections.
Declaration Syntax
public List<ISimProperty> AllDescendants { get; }
Count
Returns the number of properties in the collection.
Declaration Syntax
public int Count { get; }
GetByNameDictionary
Returns a dictionary where the keys are the property names and value are the properties.
Declaration Syntax
public Dictionary<string, ISimProperty> GetByNameDictionary { get; }
Contains(ISimProperty)
Checks if the collection contains the property.
Declaration Syntax
public bool Contains(ISimProperty property)
Parameters
property(ISimProperty)
The property.
GetByName(string)
Returns a ISimProperty object by its name.
Declaration Syntax
public ISimProperty GetByName(string name)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimEntity
Parameters
name(string)
The name.
IPropertyContainer
IPropertyContainer Interface
Declaration Syntax
public interface IPropertyContainer
Table 7: Members
Properties
Returns the IPropertyCollection object.
Declaration Syntax
public IPropertyCollection Properties { get; }
ISimEntity
IEntityObject Interface
Declaration Syntax
public interface ISimEntity
Table 8: Members
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Ansys.AAP.PublicAPIs.SimData Namespace
Analysis
Returns the associated IAnalysis object.
Declaration Syntax
public IAnalysis Analysis { get; }
Caption
Returns the caption of this entity.
Declaration Syntax
public string Caption { get; }
Extension
Returns the associated IExtension object.
Declaration Syntax
public IExtension Extension { get; }
Icon
Return the icon name of this entity.
Declaration Syntax
public string Icon { get; }
Id
Returns the ID of this entity object.
Declaration Syntax
public int Id { get; }
Name
Returns the internal name of this entity.
Declaration Syntax
public string Name { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimEntity
State
Returns the internal state of this entity.
Declaration Syntax
public string State { get; }
GetAttributeValue(string)
Gets an attribute value by its name.
Declaration Syntax
public object GetAttributeValue(string attrName)
Parameters
attrName(string)
The name of the attribute.
GetAttributeValueAsString(string)
Gets an attribute value by its name.
Declaration Syntax
public string GetAttributeValueAsString(string attrName)
Parameters
attrName(string)
The name of the attribute.
SetAttributeValue(string, object)
Sets an attribute value by its name.
Declaration Syntax
public void SetAttributeValue(string attrName, object attrValue)
Parameters
attrName(string)
The name of the attribute.
attrValue(object)
The attribute value.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Ansys.AAP.PublicAPIs.SimData Namespace
ISimLoad
ILoadObject Interface
Declaration Syntax
public interface ISimLoad
Table 9: Members
Property Color Returns the color associated with this entity. This color is used
by default to display the scoping region.
Property IsLoad Returns true if this load / boundary condition is acting as a "load"
for the associated analysis.
Property IsSupport Returns true if this load / boundary condition is acting as a
"support" for the associated analysis.
Property Suppressed Gets or Sets the suppression state of this load in the associated
analysis.
Color
Returns the color associated with this entity. This color is used by default to display the scoping region.
Declaration Syntax
public int Color { get; }
IsLoad
Returns true if this load / boundary condition is acting as a "load" for the associated analysis.
Declaration Syntax
public bool IsLoad { get; }
IsSupport
Returns true if this load / boundary condition is acting as a "support" for the associated analysis.
Declaration Syntax
public bool IsSupport { get; }
Suppressed
Gets or Sets the suppression state of this load in the associated analysis.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimProperty
Declaration Syntax
public bool Suppressed { set;get; }
ISimProperty
The ISimProperty Interface
Declaration Syntax
public interface ISimProperty
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Ansys.AAP.PublicAPIs.SimData Namespace
Caption
Returns the current caption of the property.
Declaration Syntax
public string Caption { set;get; }
Control
Returns the control type of the property.
Declaration Syntax
public string Control { get; }
Controller
Returns the python object which was instantiated with the class tag in the XML.
Declaration Syntax
public object Controller { get; }
DefaultValue
Gets or sets the default value.
Declaration Syntax
public object DefaultValue { set;get; }
Displayed
Returns true if the property is displayed.
Declaration Syntax
public bool Displayed { get; }
HasUnit
Returns true if the property has units.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimProperty
Declaration Syntax
public bool HasUnit { get; }
Id
Gets the ID of the property.
Declaration Syntax
public int Id { get; }
InternalValue
Gets or sets the internal value of the property. The InternalValue accessors do not invoke the getvalue
callback.
Declaration Syntax
public object InternalValue { set;get; }
IsGroup
Returns true if the property is an instance of SimPropertyGroup.
Declaration Syntax
public bool IsGroup { get; }
IsTable
Returns true if the property is an instance of SimPropertyTable.
Declaration Syntax
public bool IsTable { get; }
IsValid
Returns true if the property is valid.
Declaration Syntax
public bool IsValid { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
Ansys.AAP.PublicAPIs.SimData Namespace
Name
Returns the name of the property.
Declaration Syntax
public string Name { get; }
Options
Gets or sets the options list for the select control.
Declaration Syntax
public List<string> Options { set;get; }
ParentCaption
Returns the parent caption of the property.
Declaration Syntax
public string ParentCaption { get; }
ParentPropertyGroup
Returns the parent PropertyGroup.
Declaration Syntax
public ISimPropertyGroup ParentPropertyGroup { get; }
QuantityName
Returns the quantity name for this property.
Declaration Syntax
public string QuantityName { get; }
ReadOnly
Gets or sets the editable state of the property.
Declaration Syntax
public bool ReadOnly { set;get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimProperty
UniqueName
Get or sets a unique name for this property.
Declaration Syntax
public string UniqueName { set;get; }
UnitString
Gets the unit string for this property.
Declaration Syntax
public string UnitString { get; }
Value
Gets or sets the value for this property.
Declaration Syntax
public object Value { set;get; }
ValueString
Gets or sets the value string for this property.
Declaration Syntax
public string ValueString { set;get; }
Visible
Gets or sets the visibility state of the property.
Declaration Syntax
public bool Visible { set;get; }
GetAttributeValue(string)
Gets an attribute value by its name.
Declaration Syntax
public object GetAttributeValue(string attrName)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
Ansys.AAP.PublicAPIs.SimData Namespace
Parameters
attrName(string)
The name of the attribute.
GetAttributeValueAsString(string)
Gets an attribute value by its name.
Declaration Syntax
public string GetAttributeValueAsString(string attrName)
Parameters
attrName(string)
The name of the attribute.
ISimPropertyGroup
ISimPropertyGroup Interface
Declaration Syntax
public interface ISimPropertyGroup
Display
Returns the display type of the property.
Declaration Syntax
public string Display { get; }
ISimPropertyTable
ISimPropertyTable Interface
Declaration Syntax
public interface ISimPropertyTable
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimPropertyTable
ActiveRow
Gets or sets the active row.
Declaration Syntax
public int ActiveRow { set;get; }
RowCount
Returns the row count.
Declaration Syntax
public int RowCount { get; }
UpdateStateFreq
Gets or sets the frequency of update state.
Declaration Syntax
public UpdateStateFreqEnum UpdateStateFreq { set;get; }
ValidState
Gets or sets the valid state.
Declaration Syntax
public ValidStateEnum ValidState { set;get; }
AddRow()
Add a new row.
Declaration Syntax
public void AddRow()
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
Ansys.AAP.PublicAPIs.SimData Namespace
DeleteRow(int)
Deletes a row by its index.
Declaration Syntax
public void DeleteRow(int index)
Parameters
index(int)
Index of the row (0 for first row).
SaveActiveRow()
Saves the data associated with the active row.
Declaration Syntax
public void SaveActiveRow()
ISimResult
IResultObject Interface
Declaration Syntax
public interface ISimResult
CalculateTimeHistory
Flag to determine if the time history is to be computed (false by default).
Declaration Syntax
public bool CalculateTimeHistory { set;get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
ISimSolver
Location
Returns the location.
Declaration Syntax
public LocationType Location { get; }
Suppressed
Gets or sets the suppression state of this result in the associated analysis.
Declaration Syntax
public bool Suppressed { set;get; }
Type
Returns the type.
Declaration Syntax
public ResultType Type { get; }
Unit
Returns the unit.
Declaration Syntax
public string Unit { get; }
ISimSolver
ISimSolver Interface
Declaration Syntax
public interface ISimSolver
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
Ansys.AAP.PublicAPIs.SimData Namespace
AnalysisType
Returns the analysis type string.
Declaration Syntax
public string AnalysisType { get; }
PhysicsType
Returns the physics type string.
Declaration Syntax
public string PhysicsType { get; }
LocationTypeEnum
Enumeration to specify result location types
Declaration Syntax
public enum LocationTypeEnum
ResultTypeEnum
Enumeration to specify result value types
Declaration Syntax
public enum ResultTypeEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
ValidStateEnum
UpdateStateFreqEnum
Enumeration to specify update state frequency types
Declaration Syntax
public enum UpdateStateFreqEnum
ValidStateEnum
Enumeration to specify valid states
Declaration Syntax
public enum ValidStateEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Mesh Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Mesh
ElementTypeEnum
Enumeration to specify Element Type Values
Declaration Syntax
public enum ElementTypeEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
Ansys.AAP.PublicAPIs.Mesh Namespace
IElement
IElement Interface
Declaration Syntax
public interface IElement
Area
Returns the area of this element.
Declaration Syntax
public double Area { get; }
Centroid
Returns the centroid of this element.
Declaration Syntax
public double[] Centroid { get; }
CornerNodeIds
Returns a list of the corner node IDs for this element.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
IMeshData
Declaration Syntax
public IList<int> CornerNodeIds { get; }
Id
Returns the ID for this element.
Declaration Syntax
public int Id { get; }
NodeIds
Returns a list of the node IDs for this element.
Declaration Syntax
public IList<int> NodeIds { get; }
Type
Returns the ElementTypeEnum for this element.
Declaration Syntax
public ElementTypeEnum Type { get; }
Volume
Returns the volume of this element.
Declaration Syntax
public double Volume { get; }
IMeshData
IMeshData Interface
Declaration Syntax
public interface IMeshData
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
Ansys.AAP.PublicAPIs.Mesh Namespace
ElementCount
Returns the number of elements that this MeshData object contains.
Declaration Syntax
public int ElementCount { get; }
ElementIds
Returns a list of the elements IDs that this MeshData object contains.
Declaration Syntax
public IList<int> ElementIds { get; }
NodeCount
Returns the number of nodes that this MeshData object contains.
Declaration Syntax
public int NodeCount { get; }
NodeIds
Returns a list of the node IDs that this MeshData object contains.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
IMeshData
Declaration Syntax
public IList<int> NodeIds { get; }
Unit
Returns the units for this MeshData object.
Declaration Syntax
public string Unit { get; }
ElementById(int)
Returns the IElement object for the specified element ID.
Declaration Syntax
public IElement ElementById(int elementId)
Parameters
elementId(int)
An element ID.
ElementIdsFromNodeIds(IEnumerable<int>)
Returns a list of element IDs associated with a list of node IDs.
Declaration Syntax
public IList<int> ElementIdsFromNodeIds(IEnumerable<int> nodes)
Parameters
nodes(IEnumerable<int>)
A list of node IDs.
MeshRegionById(int)
Returns the IMeshRegion object for the specified reference ID.
Declaration Syntax
public IMeshRegion MeshRegionById(int refId)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
Ansys.AAP.PublicAPIs.Mesh Namespace
Parameters
refId(int)
Reference ID.
NodeById(int)
Returns the INode object for the specified node ID.
Declaration Syntax
public INode NodeById(int nodeId)
Parameters
nodeId(int)
A node ID.
NodeIdsFromElementIds(IEnumerable<int>)
Returns a list of node IDs associated with a list of element IDs.
Declaration Syntax
public IList<int> NodeIdsFromElementIds(IEnumerable<int> elements)
Parameters
elements(IEnumerable<int>)
A list of element IDs.
IMeshRegion
IMeshRegion Interface
Declaration Syntax
public interface IMeshRegion
Property ElementCount Returns the number of elements that this MeshRegion object
contains.
Property ElementIds Returns a list of the element IDs that this MeshRegion object
contains.
Property NodeCount Returns the number of nodes that this MeshRegion object con-
tains.
Property NodeIds Returns a list of the node IDs that this MeshRegion object con-
tains.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
INode
ElementCount
Returns the number of elements that this MeshRegion object contains.
Declaration Syntax
public int ElementCount { get; }
ElementIds
Returns a list of the element IDs that this MeshRegion object contains.
Declaration Syntax
public IList<int> ElementIds { get; }
NodeCount
Returns the number of nodes that this MeshRegion object contains.
Declaration Syntax
public int NodeCount { get; }
NodeIds
Returns a list of the node IDs that this MeshRegion object contains.
Declaration Syntax
public IList<int> NodeIds { get; }
INode
INode Interface
Declaration Syntax
public interface INode
Property ConnectedElementIds Returns a list of the element IDs that share this node.
Property Id Returns the ID of this node.
Property X Returns the global X coordinate of this node.
Property Y Returns the global Y coordinate of this node.
Property Z Returns the global Z coordinate of this node.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
Ansys.AAP.PublicAPIs.Mesh Namespace
ConnectedElementIds
Returns a list of the element IDs that share this node.
Declaration Syntax
public IList<int> ConnectedElementIds { get; }
Id
Returns the ID of this node.
Declaration Syntax
public int Id { get; }
X
Returns the global X coordinate of this node.
Declaration Syntax
public double X { get; }
Y
Returns the global Y coordinate of this node.
Declaration Syntax
public double Y { get; }
Z
Returns the global Z coordinate of this node.
Declaration Syntax
public double Z { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs
GeoBodyTypeEnum
Enumeration to specify Body Type Values
Declaration Syntax
public enum GeoBodyTypeEnum
GeoCellTypeEnum
Enumeration to specify Cell Type Values
Declaration Syntax
public enum GeoCellTypeEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
Ansys.AAP.PublicAPIs Namespace
GeoCurveTypeEnum
Enumeration to specify Curve Type Values
Declaration Syntax
public enum GeoCurveTypeEnum
GeoSurfaceTypeEnum
Enumeration to specify Surface Type Values
Declaration Syntax
public enum GeoSurfaceTypeEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
IDataModel
IDataModel
IDataModel Interface
Declaration Syntax
public interface IDataModel
AnalysisList
Returns a list of available IAnalysis objects.
Declaration Syntax
public IList<IAnalysis> AnalysisList { get; }
AnalysisNames
Returns the list of available analysis names.
Declaration Syntax
public IList<string> AnalysisNames { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
Ansys.AAP.PublicAPIs Namespace
GeoData
Returns an IGeoData object containing all geometry assemblies.
Declaration Syntax
public IGeoData GeoData { get; }
MeshDataNames
Returns the list of names for all available meshes on the model.
Declaration Syntax
public IList<string> MeshDataNames { get; }
AnalysisById(int)
Returns an IAnalysis object by its Id.
Declaration Syntax
public IAnalysis AnalysisById(int id)
Parameters
id(int)
The Id of the analysis.
AnalysisByName(string)
Returns an IAnalysis object by its name.
Declaration Syntax
public IAnalysis AnalysisByName(string name)
Parameters
name(string)
The name of the analysis.
CurrentConsistentUnitFromQuantityName(string)
Returns the current consistent unit from a quantity name.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.
ILog
Declaration Syntax
public string CurrentConsistentUnitFromQuantityName(string qname)
Parameters
qname(string)
The quantity name to query.
CurrentUnitFromQuantityName(string)
Returns the current unit from a quantity name.
Declaration Syntax
public string CurrentUnitFromQuantityName(string qname)
Parameters
qname(string)
The quantity name to query.
MeshDataByName(string)
Returns a meshdata object by its name.
Declaration Syntax
public IMeshData MeshDataByName(string name)
Parameters
name(string)
The name of the mesh.
ILog
ILog Interface
Declaration Syntax
public interface ILog
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 37
Ansys.AAP.PublicAPIs Namespace
LogFilename
Returns the name of the log file.
Declaration Syntax
public string LogFilename { get; }
ViewLog()
Displays the log file.
Declaration Syntax
public void ViewLog()
WriteError(string)
Adds an error string entry into the log.
Declaration Syntax
public void WriteError(string message)
Parameters
message(string)
The error to be added.
WriteMessage(string)
Adds a message string entry into the log.
Declaration Syntax
public void WriteMessage(string message)
Parameters
message(string)
The message to be added.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
38 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Geometry Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Geometry
IGeoAssembly
Geometry Assembly Interface
Declaration Syntax
public interface IGeoAssembly
Dimension
Returns 2 for 2D geometry and 3 for 3D geometry.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 39
Ansys.AAP.PublicAPIs.Geometry Namespace
Declaration Syntax
public int Dimension { get; }
Name
Returns the name of this assembly.
Declaration Syntax
public string Name { get; }
Parts
Returns a list of the IGeoPart objects for this assembly.
Declaration Syntax
public IList<IGeoPart> Parts { get; }
Unit
Returns the unit string for this assembly.
Declaration Syntax
public string Unit { get; }
IGeoBody
Geometry Body Interface
Declaration Syntax
public interface IGeoBody
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
40 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoBody
Area
Returns the area of the body.
Declaration Syntax
public double Area { get; }
BodyType
Returns the body type (wire, sheet or solid).
Declaration Syntax
public GeoBodyTypeEnum BodyType { get; }
CrossSection
Returns the beam cross section associated with this body.
Declaration Syntax
public object CrossSection { set;get; }
CrossSectionOffset
Gets or sets the beam cross section offset for this body.
Declaration Syntax
public IEnumerable<double> CrossSectionOffset { set;get; }
CrossSectionOffsetType
Gets or sets the beam cross section offset type for this body.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 41
Ansys.AAP.PublicAPIs.Geometry Namespace
Declaration Syntax
public string CrossSectionOffsetType { set;get; }
Edges
Returns a list of the IGeoEdge objects for this body.
Declaration Syntax
public IList<IGeoEdge> Edges { get; }
Faces
Returns a list of the IGeoFace objects for this body.
Declaration Syntax
public IList<IGeoFace> Faces { get; }
Length
Returns the length of the body.
Declaration Syntax
public double Length { get; }
Material
Returns the Material object associated with this body.
Declaration Syntax
public object Material { get; }
Name
Returns the name of this body.
Declaration Syntax
public string Name { get; }
Shells
Returns a list of the IGeoShell objects for this body.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
42 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoData
Declaration Syntax
public IList<IGeoShell> Shells { get; }
Suppressed
Returns true if the body is suppressed.
Declaration Syntax
public bool Suppressed { get; }
Thickness
Returns the thickness of the body.
Declaration Syntax
public double Thickness { set;get; }
Vertices
Returns a list of the IGeoVertex objects for this body.
Declaration Syntax
public IList<IGeoVertex> Vertices { get; }
Volume
Returns the volume of the body.
Declaration Syntax
public double Volume { get; }
IGeoData
IGeoData Interface
Declaration Syntax
public interface IGeoData
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 43
Ansys.AAP.PublicAPIs.Geometry Namespace
Assemblies
Returns the list of available IGeoAssembly objects.
Declaration Syntax
public IList<IGeoAssembly> Assemblies { get; }
GeoEntityById(int)
Returns a IGeoEntity object by its reference ID.
Declaration Syntax
public IGeoEntity GeoEntityById(int refId)
Parameters
refId(int)
The reference ID of the desired IGeoEntity object.
IGeoEdge
Geometry Edge Interface
Declaration Syntax
public interface IGeoEdge
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
44 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoEdge
CrossSectionOrientation
Returns a CoordinateSystem object that defines the edge cross section orientation.
Declaration Syntax
public CoordinateSystem CrossSectionOrientation { set;get; }
CurveType
Returns the eGeoCurveType of this edge.
Declaration Syntax
public GeoCurveTypeEnum CurveType { get; }
EndVertex
Returns the ending IGeoVertex object for this edge.
Declaration Syntax
public IGeoVertex EndVertex { get; }
Extents
Returns the param extents of this edge as a double array [min, max].
Declaration Syntax
public double[] Extents { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 45
Ansys.AAP.PublicAPIs.Geometry Namespace
Faces
Returns a list of the IGeoFace objects for this edge.
Declaration Syntax
public IList<IGeoFace> Faces { get; }
IsParamReversed
Returns ParamReversed state for this edge (true or false).
Declaration Syntax
public bool IsParamReversed { get; }
Length
Returns the length of this edge.
Declaration Syntax
public double Length { get; }
StartVertex
Returns the starting IGeoVertex object for this edge.
Declaration Syntax
public IGeoVertex StartVertex { get; }
Vertices
Returns a list of the IGeoVertex objects for this edge.
Declaration Syntax
public IList<IGeoVertex> Vertices { get; }
ParamAtPoint(double[])
Returns the param for the given point on this edge (point[3] = {x, y, z}).
Declaration Syntax
public double ParamAtPoint(double[] point)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
46 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoEdge
Parameters
point(double[])
point[3] = {x, y, z}.
PointAtParam(double)
Returns the point for the given param on this edge.
Declaration Syntax
public double[] PointAtParam(double param)
Parameters
param(double)
The edge param value.
PointsAtParams(double[])
Returns an array of point coordinates for the given set of params on this edge.
Declaration Syntax
public double[] PointsAtParams(double[] param)
Parameters
param(double[])
An array of params for which points are to be returned (ordered p1,p2,...,pn).
TangentAtParam(double)
Returns the tangent vector for the given param on this edge.
Declaration Syntax
public double[] TangentAtParam(double param)
Parameters
param(double)
The edge param value.
TangentsAtParams(double[])
Returns an array of tangent vectors for the given set of params on this edge.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 47
Ansys.AAP.PublicAPIs.Geometry Namespace
Declaration Syntax
public double[] TangentsAtParams(double[] param)
Parameters
param(double[])
An array of params for which tangents are to be returned (ordered p1,p2,...,pn).
IGeoEntity
Geometry Entity Interface
Declaration Syntax
public interface IGeoEntity
Id
Returns the reference ID of this entity.
Declaration Syntax
public int Id { get; }
Type
Returns the GeoCellTypeEnum of this entity.
Declaration Syntax
public GeoCellTypeEnum Type { get; }
IGeoFace
Geometry Face Interface
Declaration Syntax
public interface IGeoFace
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
48 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoFace
Area
Returns the area of this face.
Declaration Syntax
public double Area { get; }
Body
Returns the IGeoBody object for this face.
Declaration Syntax
public IGeoBody Body { get; }
Edges
Returns a list of the edge IGeoEdge for this face.
Declaration Syntax
public IList<IGeoEdge> Edges { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 49
Ansys.AAP.PublicAPIs.Geometry Namespace
Loops
Returns a list of the IGeoLoop objects for this face.
Declaration Syntax
public IList<IGeoLoop> Loops { get; }
Shell
Returns the IGeoShell object for this face.
Declaration Syntax
public IGeoShell Shell { get; }
SurfaceType
Returns the GeoSurfaceTypeEnum of this face.
Declaration Syntax
public GeoSurfaceTypeEnum SurfaceType { get; }
Vertices
Returns a list of the IGeoVertex objects for this face.
Declaration Syntax
public IList<IGeoVertex> Vertices { get; }
NormalAtParam(double, double)
Returns the normal vector for the given param values on this face.
Declaration Syntax
public double[] NormalAtParam(double u, double v)
Parameters
u(double)
The -u- param component value.
v(double)
The -v- param component value.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
50 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoFace
NormalsAtParams(double[])
Returns an array of normal vectors for the given set of params on this face.
Declaration Syntax
public double[] NormalsAtParams(double[] param)
Parameters
param(double[])
An array of params for which normals are to be returned (ordered p1u,p1v,p2u,p2v,...,pnu,pnv).
ParamAtPoint(double[])
Returns the param values for the given point on this face.
Declaration Syntax
public double[] ParamAtPoint(double[] point)
Parameters
point(double[])
The coordinates (x,y,z) of the point.
PointAtParam(double, double)
Returns the point for the given param values on this face.
Declaration Syntax
public double[] PointAtParam(double u, double v)
Parameters
u(double)
The -u- param component value.
v(double)
The -v- param component value.
PointsAtParams(double[])
Returns an array of point coordinates for the given set of params on this face.
Declaration Syntax
public double[] PointsAtParams(double[] param)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 51
Ansys.AAP.PublicAPIs.Geometry Namespace
Parameters
param(double[])
An array of params for which points are to be returned (ordered p1u,p1v,p2u,p2v,...,pnu,pnv).
IGeoLoop
Geometry Loop Interface
Declaration Syntax
public interface IGeoLoop
Property Edges Returns a list of the IGeoEdge objects for this loop.
Property Face Returns the IGeoFace object for this loop.
Edges
Returns a list of the IGeoEdge objects for this loop.
Declaration Syntax
public IList<IGeoEdge> Edges { get; }
Face
Returns the IGeoFace object for this loop.
Declaration Syntax
public IGeoFace Face { get; }
IGeoPart
Geometry Part Interface
Declaration Syntax
public interface IGeoPart
Property Bodies Returns a list of the IGeoBody objects for this part.
Property Name Returns the name of this part.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
52 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoTessellation
Bodies
Returns a list of the IGeoBody objects for this part.
Declaration Syntax
public IList<IGeoBody> Bodies { get; }
Name
Returns the name of this part.
Declaration Syntax
public string Name { get; }
IGeoShell
Geometry Shell Interface
Declaration Syntax
public interface IGeoShell
Property Faces Returns a list of the IGeoFace objects for this shell.
Faces
Returns a list of the IGeoFace objects for this shell.
Declaration Syntax
public IList<IGeoFace> Faces { get; }
IGeoTessellation
Geometry Tessellation Interface
Declaration Syntax
public interface IGeoTessellation
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 53
Ansys.AAP.PublicAPIs.Geometry Namespace
FacetCount
Returns the number of facets.
Declaration Syntax
public int FacetCount { get; }
Indices
Returns an array of indices. (Ordered n1,i1_1,i1_2,...,i1_n1, n2,i2_1,i2_2,...i2_n2, ...).
Declaration Syntax
public int[] Indices { get; }
Normals
Returns an array of normal vectors. (Ordered x1,y1,z1,x2,y2,z2,...,xn,yn,zn).
Declaration Syntax
public double[] Normals { get; }
Points
Returns an array of point coordinates. (Ordered x1,y1,z1,x2,y2,z2,...,xn,yn,zn).
Declaration Syntax
public double[] Points { get; }
IGeoVertex
Geometry Vertex Interface
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
54 of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoVertex
Declaration Syntax
public interface IGeoVertex
Property Bodies Returns a list of the IGeoBody objects for this vertex.
Property Edges Returns a list of the IGeoEdge objects for this vertex.
Property Faces Returns a list of the IGeoFace objects for this vertex.
Property X Returns the X point coordinate of this vertex.
Property Y Returns the Y point coordinate of this vertex.
Property Z Returns the Z point coordinate of this vertex.
Bodies
Returns a list of the IGeoBody objects for this vertex.
Declaration Syntax
public IList<IGeoBody> Bodies { get; }
Edges
Returns a list of the IGeoEdge objects for this vertex.
Declaration Syntax
public IList<IGeoEdge> Edges { get; }
Faces
Returns a list of the IGeoFace objects for this vertex.
Declaration Syntax
public IList<IGeoFace> Faces { get; }
X
Returns the X point coordinate of this vertex.
Declaration Syntax
public double X { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 55
Ansys.AAP.PublicAPIs.Geometry Namespace
Y
Returns the Y point coordinate of this vertex.
Declaration Syntax
public double Y { get; }
Z
Returns the Z point coordinate of this vertex.
Declaration Syntax
public double Z { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
56 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Results Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Results
IResult
IResult Interface
Declaration Syntax
public interface IResult
Components
Returns a list of component names for this result.
Declaration Syntax
public IList<string> Components { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 57
Ansys.AAP.PublicAPIs.Results Namespace
Name
Returns the name of this result.
Declaration Syntax
public string Name { get; }
QuantityNames
Returns a list of quantity names in component name order.
Declaration Syntax
public IList<string> QuantityNames { get; }
Units
Returns a list of units for each component.
Declaration Syntax
public IList<string> Units { get; }
ElementValue(int, string)
Returns the requested element result value set.
Declaration Syntax
public double[] ElementValue(int entityId, string comps)
Parameters
entityId(int)
The element ID to query for the result.
comps(string)
The components of the result to be returned.
ElementValues(IEnumerable<int>, string)
Returns the requested element result value sets.
Declaration Syntax
public double[] ElementValues(IEnumerable<int> entityId, string comps)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
58 of ANSYS, Inc. and its subsidiaries and affiliates.
IResultReader
Parameters
entityId(IEnumerable<int>)
An array of element IDs to query for the result.
comps(string)
The components of the result to be returned.
NodeValue(int, string)
Returns the requested nodal result value set.
Declaration Syntax
public double[] NodeValue(int entityId, string comps)
Parameters
entityId(int)
The node ID to query for the result.
comps(string)
The components of the result to be returned.
NodeValues(IEnumerable<int>, string)
Returns the requested nodal result value sets.
Declaration Syntax
public double[] NodeValues(IEnumerable<int> entityId, string comps)
Parameters
entityId(IEnumerable<int>)
An array of node IDs to query for the result.
comps(string)
The components of the result to be returned.
IResultReader
IResultReader Interface
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 59
Ansys.AAP.PublicAPIs.Results Namespace
Declaration Syntax
public interface IResultReader
CurrentResultSet
Returns the current result set index.
Declaration Syntax
public int CurrentResultSet { set;get; }
CurrentTimeFreq
Returns the current time / frequency value.
Declaration Syntax
public double CurrentTimeFreq { get; }
HasImaginaryResults
Returns the imaginary results state.
Declaration Syntax
public bool HasImaginaryResults { get; }
ListTimeFreq
Returns a list of all the time steps or frequencies.
Declaration Syntax
public IList<double> ListTimeFreq { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
60 of ANSYS, Inc. and its subsidiaries and affiliates.
IResultReader
ResultSetCount
Returns the number of result sets.
Declaration Syntax
public int ResultSetCount { get; }
ResultsName
Returns a list of the result names.
Declaration Syntax
public IList<string> ResultsName { get; }
Result(string)
Returns the IResult object for the specified name.
Declaration Syntax
public IResult Result(string name)
Parameters
name(string)
A result name.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 61
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
62 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Analysis Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Analysis
CoordinateSystem
CoordinateSystem class
Declaration Syntax
public class CoordinateSystem
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 63
Ansys.AAP.PublicAPIs.Analysis Namespace
CoordinateSystem(CoordinateSystemTypeEnum)
Constructor.
Declaration Syntax
public CoordinateSystem(CoordinateSystemTypeEnum type)
Parameters
type(CoordinateSystemTypeEnum)
The CoordinateSystemTypeEnum type to construct.
CoordinateSystemType
Gets or sets the coordinate system type.
Declaration Syntax
public CoordinateSystemTypeEnum CoordinateSystemType { set;get; }
Id
Gets or sets the ID of the coordinate system.
Declaration Syntax
public int Id { set;get; }
Matrix
Gets or sets the matrix definition of the coordinate system.
Declaration Syntax
public IEnumerable<double> Matrix { set;get; }
Name
Gets or sets the name of the coordinate system.
Declaration Syntax
public string Name { set;get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
64 of ANSYS, Inc. and its subsidiaries and affiliates.
CoordinateSystemTypeEnum
Origin
Gets or sets the origin of the coordinate system.
Declaration Syntax
public IEnumerable<double> Origin { set;get; }
XAxis
Gets or sets the X axis of the coordinate system.
Declaration Syntax
public IEnumerable<double> XAxis { set;get; }
YAxis
Gets or sets the Y axis of the coordinate system.
Declaration Syntax
public IEnumerable<double> YAxis { set;get; }
ZAxis
Gets or sets the Z axis of the coordinate system.
Declaration Syntax
public IEnumerable<double> ZAxis { set;get; }
CoordinateSystemTypeEnum
CoordinateSystemTypeEnum enumerator
Declaration Syntax
public enum CoordinateSystemTypeEnum
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 65
Ansys.AAP.PublicAPIs.Analysis Namespace
IAnalysis
IAnalysis Interface
Declaration Syntax
public interface IAnalysis
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
66 of ANSYS, Inc. and its subsidiaries and affiliates.
IAnalysis
AnalysisType
Returns the analysis type string.
Declaration Syntax
public string AnalysisType { get; }
Components
Returns all (named selections) components.
Declaration Syntax
public IEnumerable<SelectionInfo> Components { get; }
CoordinateSystems
Returns all coordinate systems.
Declaration Syntax
public IEnumerable<CoordinateSystem> CoordinateSystems { get; }
GeoData
Returns the IGeoData object associated with this analysis.
Declaration Syntax
public IGeoData GeoData { get; }
Id
Returns the ID for this analysis.
Declaration Syntax
public int Id { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 67
Ansys.AAP.PublicAPIs.Analysis Namespace
LoadObjects
Returns all ACT load objects associated with this analysis.
Declaration Syntax
public IEnumerable<ISimLoad> LoadObjects { get; }
MeshData
Returns the IMeshData object associated with this analysis.
Declaration Syntax
public IMeshData MeshData { get; }
Name
Returns the name of this analysis.
Declaration Syntax
public string Name { get; }
PhysicsType
Returns the physics type string.
Declaration Syntax
public string PhysicsType { get; }
PropertyNames
Returns a list of the property names for this analysis.
Declaration Syntax
public IList<string> PropertyNames { get; }
ResultObjects
Returns all ACT result objects associated with this analysis.
Declaration Syntax
public IEnumerable<ISimResult> ResultObjects { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
68 of ANSYS, Inc. and its subsidiaries and affiliates.
IAnalysis
ResultsData
Return the IResultReader object associated with this analysis.
Declaration Syntax
public IResultReader ResultsData { get; }
Solver
Returns all ACT solver obects associated with this analysis.
Declaration Syntax
public ISimSolver Solver { get; }
SolverName
Returns the solver name for this analysis.
Declaration Syntax
public string SolverName { get; }
StepsEndTime
Returns a list of steps end times.
Declaration Syntax
public IList<double> StepsEndTime { get; }
WorkingDir
Returns the working directory.
Declaration Syntax
public string WorkingDir { get; }
ComponentById(int)
Returns a (named selection) component by its ID.
Declaration Syntax
public SelectionInfo ComponentById(int id)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 69
Ansys.AAP.PublicAPIs.Analysis Namespace
Parameters
id(int)
The ID of the desired component.
CoordinateSystemById(int)
Returns a CoordinateSystem object by its ID.
Declaration Syntax
public CoordinateSystem CoordinateSystemById(int id)
Parameters
id(int)
The ID of the desired coordinate system.
CreateLoadObject(string)
Creates a new load object.
Declaration Syntax
public ISimLoad CreateLoadObject(string loadName)
Parameters
loadName(string)
The name to be assigned to the new load.
CreateResultObject(string)
Creates a new ISimResult object.
Declaration Syntax
public ISimResult CreateResultObject(string resultName)
Parameters
resultName(string)
The name to be assigned to the new result.
CurrentConsistentUnitFromQuantityName(string)
Returns the current consistent unit from a quantity name.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
70 of ANSYS, Inc. and its subsidiaries and affiliates.
IAnalysis
Declaration Syntax
public string CurrentConsistentUnitFromQuantityName(string qname)
Parameters
qname(string)
The quantity name to query.
GenerateMesh()
Generates the mesh associated with this analysis.
Declaration Syntax
public void GenerateMesh()
PropertyValue(string)
Returns the property value with the specified name.
Declaration Syntax
public object PropertyValue(string name)
Parameters
name(string)
The name of the property to return.
PropertyValue(string, object)
Assigns the given value to the simulation property that matches the specified name.
Declaration Syntax
public void PropertyValue(string name, object value)
Parameters
name(string)
The simulation property name.
value(object)
The value to assign.
Solve(bool)
Compute the solution for this analysis.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 71
Ansys.AAP.PublicAPIs.Analysis Namespace
Declaration Syntax
public void Solve(bool wait)
Parameters
wait(bool)
Specifies to wait for the computation end.
WriteInputFile(string)
Writes the input file associated to this analysis.
Declaration Syntax
public void WriteInputFile(string filename)
Parameters
filename(string)
The name of the file to write.
IDataObject
IDataObject Interface
Declaration Syntax
public interface IDataObject
Id
Returns the ID for this data object.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
72 of ANSYS, Inc. and its subsidiaries and affiliates.
IDataObject
Declaration Syntax
public int Id { get; }
Name
Returns the name for this data object.
Declaration Syntax
public string Name { get; }
PropertyNames
Returns a list of the properties for this data object.
Declaration Syntax
public IList<string> PropertyNames { get; }
Type
Returns the type for this data object.
Declaration Syntax
public string Type { get; }
PropertyValue(string)
Returns the property value with the specified name.
Declaration Syntax
public object PropertyValue(string name)
Parameters
name(string)
The name of the property to return.
PropertyValue(string, object)
Assigns the given value to the simulation property that matches the specified name.
Declaration Syntax
public void PropertyValue(string name, object value)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 73
Ansys.AAP.PublicAPIs.Analysis Namespace
Parameters
name(string)
The simulation property name.
value(object)
The value to assign.
IDataObjectCollection
IDataObjectCollection Interface
Declaration Syntax
public interface IDataObjectCollection
Ids
Returns a list of available IDs.
Declaration Syntax
public IList<int> Ids { get; }
List
Returns a list of available DataObjects.
Declaration Syntax
public IList<IDataObject> List { get; }
Names
Returns a list of available names.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
74 of ANSYS, Inc. and its subsidiaries and affiliates.
IDataObjectCollection
Declaration Syntax
public IList<string> Names { get; }
GetById(int)
Get a DataObject by its ID.
Declaration Syntax
public IDataObject GetById(int id)
Parameters
id(int)
The ID of the desired DataObject.
GetByName(string)
Get a DataObject by its name.
Declaration Syntax
public IDataObject GetByName(string name)
Parameters
name(string)
The name of the desired DataObject.
GetEnumerator()
Returns an enumerator for the current collection.
Declaration Syntax
public IEnumerator<IDataObject> GetEnumerator()
NamesByType(string)
Returns a list of available DataObject names filtered by type.
Declaration Syntax
public IList<string> NamesByType(string dataType)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 75
Ansys.AAP.PublicAPIs.Analysis Namespace
Parameters
dataType(string)
The datatype filter.
IDataObjectContainer
IDataObjectContainer Interface
Declaration Syntax
public interface IDataObjectContainer
DataObjects
Returns the DataObject collection.
Declaration Syntax
public IDataObjectCollection DataObjects { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
76 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Extension Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Extension
IApplication
IApplication Interface
Declaration Syntax
public interface IApplication
ScriptNames
Returns a list of available script names.
Declaration Syntax
public IList<string> ScriptNames { get; }
LogError(string)
Logs an error message.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 77
Ansys.AAP.PublicAPIs.Extension Namespace
Declaration Syntax
public void LogError(string msg)
Parameters
msg(string)
The error message.
LogWarning(string)
Logs a warning message.
Declaration Syntax
public void LogWarning(string msg)
Parameters
msg(string)
The warning message.
ScriptByName(string)
Gets a script object by its name.
Declaration Syntax
public object ScriptByName(string name)
Parameters
name(string)
The script name.
IExtension
IExtension Interface
Declaration Syntax
public interface IExtension
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
78 of ANSYS, Inc. and its subsidiaries and affiliates.
IExtensionAPI
Name
Returns the name of this extension.
Declaration Syntax
public string Name { get; }
ScriptEngine
Returns the IronPython script engine.
Declaration Syntax
public ScriptEngine ScriptEngine { get; }
ScriptScope
Returns the IronPython scope.
Declaration Syntax
public ScriptScope ScriptScope { get; }
Version
Returns the version of this extension.
Declaration Syntax
public int Version { get; }
IExtensionAPI
IExtensionAPI Interface
Declaration Syntax
public interface IExtensionAPI
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 79
Ansys.AAP.PublicAPIs.Extension Namespace
Application
Returns the IApplication object.
Declaration Syntax
public IApplication Application { get; }
Context
Returns the current context name (Mechanical, Project, ...).
Declaration Syntax
public string Context { get; }
DataModel
Returns the IDataModel object.
Declaration Syntax
public IDataModel DataModel { get; }
ExtensionMgr
Returns the IExtensionMgr object.
Declaration Syntax
public IExtensionMgr ExtensionMgr { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
80 of ANSYS, Inc. and its subsidiaries and affiliates.
IExtensionAPI
Graphics
Returns an IGraphics object.
Declaration Syntax
public IGraphics Graphics { get; }
Log
Returns the ILog object. Useful for reporting messages and errors.
Declaration Syntax
public ILog Log { get; }
SelectionMgr
Returns the ISelectionMgr object. Useful for manipulating the graphic selection.
Declaration Syntax
public ISelectionMgr SelectionMgr { get; }
LockPrePostLicense()
Locks the license used by the PRE/POST application.
Declaration Syntax
public void LockPrePostLicense()
ResultsData(string)
Returns an IResultReader object for the specified file.
Declaration Syntax
public IResultReader ResultsData(string filename)
Parameters
filename(string)
The name of the results file.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 81
Ansys.AAP.PublicAPIs.Extension Namespace
UnlockPrePostLicense()
Unlocks the license used by the PRE/POST application. This is required if you want to manually launch
the ANSYS solver. You must relock the license after its use. If you don't relock the license, the PRE/POST
application will be in read-only mode.
Declaration Syntax
public void UnlockPrePostLicense()
IExtensionMgr
IExtensionMgr Interface
Declaration Syntax
public interface IExtensionMgr
CurrentExtension
Returns the current IExtension object.
Declaration Syntax
public IExtension CurrentExtension { get; }
Extensions
Returns a dictionary of available extensions.key = extension name. value = IExtension object.
Declaration Syntax
public IDictionary<string, IExtension> Extensions { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
82 of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Graphics Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Graphics
IDraw3DContext
Interface to draw 3D features
Declaration Syntax
public interface IDraw3DContext
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 83
Ansys.AAP.PublicAPIs.Graphics Namespace
Color
Sets or gets the color (0xff0000 for red, 0x00ff00 for green, and 0x0000ff for blue).
Declaration Syntax
public int Color { set;get; }
DepthTest
Sets or gets the DepthTest flag.
Declaration Syntax
public bool DepthTest { set;get; }
LineWeight
Sets or gets the line weight.
Declaration Syntax
public int LineWeight { set;get; }
Translucency
Sets or gets the translucency.
Declaration Syntax
public double Translucency { set;get; }
Visible
Sets or gets the visibility flag of this drawing context.
Declaration Syntax
public bool Visible { set;get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
84 of ANSYS, Inc. and its subsidiaries and affiliates.
IDraw3DContext
Close()
Closes this drawing context.
Declaration Syntax
public void Close()
Declaration Syntax
public void DrawCircle(IEnumerable<double> center, double radius, IEnumerable<double> normal)
Parameters
center(IEnumerable<double>)
Coordinates of the center.
radius(double)
Radius of the circle.
normal(IEnumerable<double>)
Vector to identify the axis of the circle.
Declaration Syntax
public void DrawDisc(IEnumerable<double> center, double radius, IEnumerable<double> normal)
Parameters
center(IEnumerable<double>)
Coordinates of the center.
radius(double)
Radius of the circle.
normal(IEnumerable<double>)
Vector to identify the axis of the circle.
DrawPoints(IEnumerable<double>)
Draws a set of points with the current color and size equal to the current line weight.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 85
Ansys.AAP.PublicAPIs.Graphics Namespace
Declaration Syntax
public void DrawPoints(IEnumerable<double> points)
Parameters
points(IEnumerable<double>)
Array of points coordinates (dimensioned to numPoints*3).
DrawPolygon(IEnumerable<double>, IEnumerable<double>)
Draws a polygon with the current color and line weight.
Declaration Syntax
public void DrawPolygon(IEnumerable<double> points, IEnumerable<double> normals)
Parameters
points(IEnumerable<double>)
Array of points coordinates (dimensioned to numPoints*3).
normals(IEnumerable<double>)
Array of vectors that identify the normal for each point (dimensioned to numPoints*3).
DrawPolyline(IEnumerable<double>)
Draws a polyline with the current color and line weight.
Declaration Syntax
public void DrawPolyline(IEnumerable<double> points)
Parameters
points(IEnumerable<double>)
Array of points coordinates (dimensioned to numPoints*3).
Declaration Syntax
public void DrawShell(IEnumerable<double> vertices, IEnumerable<double> normals, IEnumerable<int>
faces)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
86 of ANSYS, Inc. and its subsidiaries and affiliates.
IGraphics
Parameters
vertices(IEnumerable<double>)
Array of points coordinates.
normals(IEnumerable<double>)
Array of vectors (one vector per vertex).
faces(IEnumerable<int>)
Array of Indices to describe each face. One face is defined by an integer (three or four) that identify the
number of vertices for this face and the index of each vertex.
Declaration Syntax
public void DrawShell(IEnumerable<double> vertices, IEnumerable<double> normals, IEnumerable<int>
faces, IEnumerable<int> colors)
Parameters
vertices(IEnumerable<double>)
Array of points coordinates.
normals(IEnumerable<double>)
Array of vectors (one vector per vertex).
faces(IEnumerable<int>)
Array of Indices to describe each face. One face is defined by an integer (three or four) that identify the
number of vertices for this face and the index of each vertex.
colors(IEnumerable<int>)
Array of colors (one color per vertex).
IGraphics
Interface to Graphics features
Declaration Syntax
public interface IGraphics
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 87
Ansys.AAP.PublicAPIs.Graphics Namespace
Color
Gets or sets the color (0xff0000 for red, 0x00ff00 for green, and 0x0000ff for blue).
Declaration Syntax
public int Color { set;get; }
LineWeight
Gets or sets the line weight.
Declaration Syntax
public int LineWeight { set;get; }
MainHandle
Gets the window handle from the applications main window.
Declaration Syntax
public IntPtr MainHandle { get; }
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
88 of ANSYS, Inc. and its subsidiaries and affiliates.
IGraphics
MainWindow
Gets the main window object from the application.
Declaration Syntax
public object MainWindow { get; }
Translucency
Gets or sets the translucency.
Declaration Syntax
public double Translucency { set;get; }
CreateAndOpenDraw3DContext()
Creates and opens a 3D Drawing Context.
Declaration Syntax
public IDraw3DContext CreateAndOpenDraw3DContext()
Declaration Syntax
public void DrawText2D(int x, int y, string text)
Parameters
x(int)
The x coordinate.
y(int)
The y coordinate.
text(string)
The text to display.
LineTo2D(int, int)
Draws a line from the current position to the x,y coordinate (given in pixel units).
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 89
Ansys.AAP.PublicAPIs.Graphics Namespace
Declaration Syntax
public void LineTo2D(int x, int y)
Parameters
x(int)
The x coordinate.
y(int)
The y coordinate.
MoveTo2D(int, int)
Moves the pencil to the x,y coordinate (given in pixel units).
Declaration Syntax
public void MoveTo2D(int x, int y)
Parameters
x(int)
The x coordinate.
y(int)
The y coordinate.
PixelToWorld(IEnumerable<int>)
Gets the 3D coordinates from a window coordinate (in pixel units).
Declaration Syntax
public double[] PixelToWorld(IEnumerable<int> xy)
Parameters
xy(IEnumerable<int>)
The x and y coordinates as a list of integers.
PixelToWorld(int, int)
Gets the 3D coordinates from a window coordinate (in pixel units).
Declaration Syntax
public double[] PixelToWorld(int x, int y)
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
90 of ANSYS, Inc. and its subsidiaries and affiliates.
IGraphics
Parameters
x(int)
The x coordinate.
y(int)
The y coordinate.
WorldToPixel(IEnumerable<double>)
Gets the window coordinate (in pixel units) from a 3D point.
Declaration Syntax
public int[] WorldToPixel(IEnumerable<double> pt)
Parameters
pt(IEnumerable<double>)
The x,y and z coordinates as a list of doubles.
Declaration Syntax
public int[] WorldToPixel(double x, double y, double z)
Parameters
x(double)
The x coordinate.
y(double)
The y coordinate.
z(double)
The z coordinate.
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 91
Release 14.5 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
92 of ANSYS, Inc. and its subsidiaries and affiliates.