Professional Documents
Culture Documents
Toolkit
ANSYS, Inc.
Southpointe
275 Technology Drive
Canonsburg, PA 15317
ansysinfo@ansys.com
http://www.ansys.com
(T) 724-746-3304
(F) 724-514-9494
Release 14.5
October 2012
ANSYS Customization Suite
ANSYS, Inc. is
certified to ISO
9001:2008.
Disclaimer Notice
THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFIDENTIAL 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.
ANSYS, Inc. is certified to ISO 9001:2008.
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.
Published in the U.S.A.
Table of Contents
I. Namespaces ............................................................................................................................................. 1
Ansys.AAP.PublicAPIs.Selection Namespace ....................................................................................... 3
ISelectionInfo ................................................................................................................................... 3
Id ............................................................................................................................................... 3
Ids .............................................................................................................................................. 3
Name ......................................................................................................................................... 4
SelectionType ............................................................................................................................. 4
ISelectionMgr ................................................................................................................................... 4
CurrentSelection ........................................................................................................................ 4
AddSelection(SelectionInfo) ....................................................................................................... 4
ClearSelection() .......................................................................................................................... 5
NewSelection(SelectionInfo) ....................................................................................................... 5
SelectionTypeEnum .......................................................................................................................... 5
Ansys.AAP.PublicAPIs.SimData Namespace ......................................................................................... 7
IPropertyCollection .......................................................................................................................... 7
AllDescendants .......................................................................................................................... 8
Count ......................................................................................................................................... 8
GetByNameDictionary ................................................................................................................ 8
Contains(ISimProperty) ............................................................................................................... 8
GetByName(string) ..................................................................................................................... 8
IPropertyContainer ........................................................................................................................... 9
Properties .................................................................................................................................. 9
ISimEntity ......................................................................................................................................... 9
Analysis .................................................................................................................................... 10
Caption .................................................................................................................................... 10
Extension ................................................................................................................................. 10
Icon .......................................................................................................................................... 10
Id ............................................................................................................................................. 10
Name ....................................................................................................................................... 10
State ........................................................................................................................................ 11
GetAttributeValue(string) .......................................................................................................... 11
GetAttributeValueAsString(string) ............................................................................................. 11
SetAttributeValue(string, object) ............................................................................................... 11
ISimLoad ........................................................................................................................................ 12
Color ........................................................................................................................................ 12
IsLoad ...................................................................................................................................... 12
IsSupport ................................................................................................................................. 12
Suppressed .............................................................................................................................. 12
ISimProperty .................................................................................................................................. 13
Caption .................................................................................................................................... 14
Control ..................................................................................................................................... 14
Controller ................................................................................................................................. 14
DefaultValue ............................................................................................................................. 14
Displayed ................................................................................................................................. 14
HasUnit .................................................................................................................................... 14
Id ............................................................................................................................................. 15
InternalValue ............................................................................................................................ 15
IsGroup .................................................................................................................................... 15
IsTable ...................................................................................................................................... 15
IsValid ...................................................................................................................................... 15
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
iii
iv
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
vi
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
vii
viii
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
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
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
ISelectionMgr
ISelectionMgr Interface
SelectionTypeEnum
SelectionTypeEnum enumerator
ISelectionInfo
SelectionInfo class
Declaration Syntax
public interface ISelectionInfo
Table 2: Members
Property
Id
Property
Ids
Property
Name
Property
SelectionType
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.
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
Property
CurrentSelection
Method
AddSelection(SelectionInfo)
Method
ClearSelection()
Method
NewSelection(SelectionInfo)
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
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
Member
GeometryEntities
Member
MeshNodes
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
IPropertyContainer
IPropertyContainer Interface
ISimEntity
IEntityObject Interface
ISimLoad
ILoadObject Interface
ISimProperty
ISimPropertyGroup
ISimPropertyGroup Interface
ISimPropertyTable
ISimPropertyTable Interface
ISimResult
IResultObject Interface
ISimSolver
ISimSolver Interface
LocationTypeEnum
ResultTypeEnum
UpdateStateFreqEnum
ValidStateEnum
IPropertyCollection
IPropertiesCollection Interface
Declaration Syntax
public interface IPropertyCollection
Table 6: Members
Property
AllDescendants
Property
Count
Property
GetByNameDictionary
Method
Contains(ISimProperty)
Method
GetByName(string)
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
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
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
Property
Properties
Properties
Returns the IPropertyCollection object.
Declaration Syntax
public IPropertyCollection Properties { get; }
ISimEntity
IEntityObject Interface
Declaration Syntax
public interface ISimEntity
Table 8: Members
Property
Analysis
Property
Caption
Property
Extension
Property
Icon
Property
Id
Property
Name
Property
State
Method
GetAttributeValue(string)
Method
GetAttributeValueAsString(string)
Method
SetAttributeValue(string, object)
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
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; }
10
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Property
IsSupport
Property
Suppressed
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.
12
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 10: Members
Property
Caption
Property
Control
Property
Controller
Property
DefaultValue
Property
Displayed
Property
HasUnit
Property
Id
Property
InternalValue
Gets or sets the internal value of the property. The InternalValue accessors do not invoke the getvalue callback.
Property
IsGroup
Property
IsTable
Property
IsValid
Property
Name
Property
Options
Property
ParentCaption
Property
ParentPropertyGroup
Property
QuantityName
Property
ReadOnly
Property
UniqueName
Property
UnitString
Property
Value
Property
ValueString
Property
Visible
Method
GetAttributeValue(string)
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
Method
GetAttributeValueAsString(string)
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.
14
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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; }
16
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 11: Members
Property
Display
Display
Returns the display type of the property.
Declaration Syntax
public string Display { get; }
ISimPropertyTable
ISimPropertyTable Interface
Declaration Syntax
public interface ISimPropertyTable
Table 12: Members
Property
18
ActiveRow
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
ISimPropertyTable
Property
RowCount
Property
UpdateStateFreq
Property
ValidState
Method
AddRow()
Method
DeleteRow(int)
Method
SaveActiveRow()
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
Table 13: Members
Property
CalculateTimeHistory
Property
Location
Property
Suppressed
Property
Type
Property
Unit
CalculateTimeHistory
Flag to determine if the time history is to be computed (false by default).
Declaration Syntax
public bool CalculateTimeHistory { set;get; }
20
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 14: Members
Property
AnalysisType
Property
PhysicsType
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
Table 15: Members
Member
AAP_Element
Member
AAP_ElemNode
Member
AAP_Node
ResultTypeEnum
Enumeration to specify result value types
Declaration Syntax
public enum ResultTypeEnum
Table 16: Members
Member
AAP_Scalar
Member
AAP_Tensor
Member
AAP_Vector
22
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
ValidStateEnum
UpdateStateFreqEnum
Enumeration to specify update state frequency types
Declaration Syntax
public enum UpdateStateFreqEnum
Table 17: Members
Member
UpdateEachTime
Member
UpdateOnApply
ValidStateEnum
Enumeration to specify valid states
Declaration Syntax
public enum ValidStateEnum
Table 18: Members
Member
StateInvalid
Member
StateUnknown
Member
StateValid
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
23
24
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Mesh Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Mesh
Table 19: Members
ElementTypeEnum
IElement
IElement Interface
IMeshData
IMeshData Interface
IMeshRegion
IMeshRegion Interface
INode
INode Interface
ElementTypeEnum
Enumeration to specify Element Type Values
Declaration Syntax
public enum ElementTypeEnum
Table 20: Members
Member
kBeam3
Member
kBeam4
Member
kHex20
Member
kHex8
Member
kLine2
Member
kLine3
Member
kPoint0
Point.
Member
kPyramid13
Member
kPyramid5
Member
kQuad4
Member
kQuad8
Member
kTet10
Member
kTet4
Member
kTri3
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
Member
kTri6
Member
kUnknown
Unknown.
Member
kWedge15
Member
kWedge6
IElement
IElement Interface
Declaration Syntax
public interface IElement
Table 21: Members
Property
Area
Property
Centroid
Property
CornerNodeIds
Property
Id
Property
NodeIds
Property
Type
Property
Volume
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.
26
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 22: Members
Property
ElementCount
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
Property
ElementIds
Property
NodeCount
Property
NodeIds
Returns a list of the node IDs that this MeshData object contains.
Property
Unit
Method
ElementById(int)
Method
Method
MeshRegionById(int)
Method
NodeById(int)
Method
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.
28
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 23: Members
Property
ElementCount
Property
ElementIds
Property
NodeCount
Property
NodeIds
Returns a list of the node IDs that this MeshRegion object contains.
30
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 24: Members
Property
ConnectedElementIds
Property
Id
Property
Property
Property
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; }
32
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs
Table 25: Members
GeoBodyTypeEnum
GeoCellTypeEnum
GeoCurveTypeEnum
GeoSurfaceTypeEnum
IDataModel
IDataModel Interface
ILog
ILog Interface
GeoBodyTypeEnum
Enumeration to specify Body Type Values
Declaration Syntax
public enum GeoBodyTypeEnum
Table 26: Members
Member
GeoBodySheet
Sheet.
Member
GeoBodySolid
Solid.
Member
GeoBodyUnknown
Unknown type.
Member
GeoBodyWire
Wire.
GeoCellTypeEnum
Enumeration to specify Cell Type Values
Declaration Syntax
public enum GeoCellTypeEnum
Table 27: Members
Member
GeoBody
Volume.
Member
GeoEdge
Edge.
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
Member
GeoFace
Face.
Member
GeoUnknown
Unknown type.
Member
GeoVertex
Vertex.
GeoCurveTypeEnum
Enumeration to specify Curve Type Values
Declaration Syntax
public enum GeoCurveTypeEnum
Table 28: Members
Member
GeoCurveBSpline
BSpline.
Member
GeoCurveCircle
Circle.
Member
GeoCurveCircularArc
Circular Arc.
Member
GeoCurveEllipseFull
Full Ellipse.
Member
GeoCurveEllipticalArc
Elliptical Arc.
Member
GeoCurveFaceted
Faceted Curve.
Member
GeoCurveLine
Line.
Member
GeoCurveLineSegment
Line Segment.
Member
GeoCurveNoGeometry
No Geometry.
Member
GeoCurveUnknown
Unknown type.
GeoSurfaceTypeEnum
Enumeration to specify Surface Type Values
Declaration Syntax
public enum GeoSurfaceTypeEnum
Table 29: Members
Member
GeoSurfaceBSpline
BSpline.
Member
GeoSurfaceCone
Cone.
Member
GeoSurfaceCylinder
Cylinder.
Member
GeoSurfaceEllipticalCone
Elliptical Cone.
Member
GeoSurfaceEllipticalCylinder
Elliptical Cylinder.
Member
GeoSurfaceFaceted
Faceted.
Member
GeoSurfaceNoGeometry
No Geometry.
Member
GeoSurfacePlane
Plane.
Member
GeoSurfaceSphere
Sphere.
34
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IDataModel
Member
GeoSurfaceTorus
Torus.
Member
GeoSurfaceUnknown
Unknown type.
IDataModel
IDataModel Interface
Declaration Syntax
public interface IDataModel
Table 30: Members
Property
AnalysisList
Property
AnalysisNames
Property
GeoData
Property
MeshDataNames
Returns the list of names for all available meshes on the model.
Method
AnalysisById(int)
Method
AnalysisByName(string)
Method
CurrentConsistentUnitFromQuantityName(string)
Method
CurrentUnitFromQuantityName(string)
Method
MeshDataByName(string)
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.
36
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 31: Members
Property
LogFilename
Method
ViewLog()
Method
WriteError(string)
Method
WriteMessage(string)
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.
38
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Geometry Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Geometry
Table 32: Members
IGeoAssembly
IGeoBody
IGeoData
IGeoData Interface
IGeoEdge
IGeoEntity
IGeoFace
IGeoLoop
IGeoPart
IGeoShell
IGeoTessellation
IGeoVertex
IGeoAssembly
Geometry Assembly Interface
Declaration Syntax
public interface IGeoAssembly
Table 33: Members
Property
Dimension
Property
Name
Property
Parts
Property
Unit
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
Table 34: Members
Property
Area
Property
BodyType
Property
CrossSection
Property
CrossSectionOffset
Gets or sets the beam cross section offset for this body.
Property
CrossSectionOffsetType
Gets or sets the beam cross section offset type for this
body.
Property
Edges
Property
Faces
40
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoBody
Property
Length
Property
Material
Property
Name
Property
Shells
Property
Suppressed
Property
Thickness
Property
Vertices
Property
Volume
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.
42
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 35: Members
Property
Assemblies
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
Method
GeoEntityById(int)
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
Table 36: Members
Property
CrossSectionOrientation
Property
CurveType
Property
EndVertex
Property
Extents
Property
Faces
Property
IsParamReversed
Property
Length
44
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoEdge
Property
StartVertex
Property
Vertices
Method
ParamAtPoint(double[])
Method
PointAtParam(double)
Method
PointsAtParams(double[])
Method
TangentAtParam(double)
Method
TangentsAtParams(double[])
Retuns an array of tangent vectors for the given set of params on this edge.
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)
46
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 37: Members
Property
Id
Property
Type
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
Table 38: Members
Property
48
Area
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoFace
Property
Body
Property
Edges
Property
Loops
Property
Shell
Property
SurfaceType
Property
Vertices
Method
NormalAtParam(double, double)
Method
NormalsAtParams(double[])
Returns an array of normal vectors for the given set of params on this face.
Method
ParamAtPoint(double[])
Method
PointAtParam(double, double)
Method
PointsAtParams(double[])
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.
50
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 39: Members
Property
Edges
Property
Face
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
Table 40: Members
Property
Bodies
Property
Name
52
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 41: Members
Property
Faces
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
Table 42: Members
Property
FacetCount
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
Property
Indices
Property
Normals
Property
Points
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
54
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IGeoVertex
Declaration Syntax
public interface IGeoVertex
Table 43: Members
Property
Bodies
Property
Edges
Property
Faces
Property
Property
Property
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; }
56
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Results Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Results
Table 44: Members
IResult
IResult Interface
IResultReader
IResultReader Interface
IResult
IResult Interface
Declaration Syntax
public interface IResult
Table 45: Members
Property
Components
Property
Name
Property
QuantityNames
Property
Units
Method
ElementValue(int, string)
Method
Method
NodeValue(int, string)
Method
NodeValues(IEnumerable<int>,
string)
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)
58
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 46: Members
Property
CurrentResultSet
Property
CurrentTimeFreq
Property
HasImaginaryResults
Property
ListTimeFreq
Property
ResultSetCount
Property
ResultsName
Method
Result(string)
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; }
60
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
62
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Analysis Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Analysis
Table 47: Members
CoordinateSystem
CoordinateSystem class
IAnalysis Interface
IDataObject
IDataObject Interface
IDataObjectCollection
IDataObjectCollection Interface
IDataObjectContainer
IDataObjectContainer Interface
CoordinateSystem
CoordinateSystem class
Declaration Syntax
public class CoordinateSystem
Table 48: Members
Constructor
CoordinateSystem(CoordinateSys- Constructor.
temTypeEnum)
Property
CoordinateSystemType
Property
Id
Property
Matrix
Property
Name
Property
Origin
Property
XAxis
Property
YAxis
Property
ZAxis
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; }
64
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 49: Members
Member
Cartesian
Member
Cylindrical
Member
Spherical
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
Table 50: Members
Property
AnalysisType
Property
Components
Property
CoordinateSystems
Property
GeoData
Property
Id
Property
LoadObjects
Property
MeshData
Property
Name
Property
PhysicsType
Property
PropertyNames
Property
ResultObjects
Property
ResultsData
Property
Solver
Property
SolverName
Property
StepsEndTime
Property
WorkingDir
Method
ComponentById(int)
Method
CoordinateSystemById(int)
Method
CreateLoadObject(string)
Method
CreateResultObject(string)
Method
Method
GenerateMesh()
Method
PropertyValue(string)
66
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
IAnalysis
Method
PropertyValue(string, object)
Method
Solve(bool)
Method
WriteInputFile(string)
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; }
68
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.
70
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 51: Members
Property
Id
Property
Name
Property
PropertyNames
Property
Type
Method
PropertyValue(string)
Method
PropertyValue(string, object)
Id
Returns the ID for this data object.
72
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 52: Members
Property
Ids
Property
List
Property
Names
Method
GetById(int)
Method
GetByName(string)
Method
GetEnumerator()
Method
NamesByType(string)
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.
74
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 53: Members
Property
DataObjects
DataObjects
Returns the DataObject collection.
Declaration Syntax
public IDataObjectCollection DataObjects { get; }
76
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Extension Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Extension
Table 54: Members
IApplication
IApplication Interface
IExtension
IExtension Interface
IExtensionAPI
IExtensionAPI Interface
IExtensionMgr
IExtensionMgr Interface
IApplication
IApplication Interface
Declaration Syntax
public interface IApplication
Table 55: Members
Property
ScriptNames
Method
LogError(string)
Method
LogWarning(string)
Method
ScriptByName(string)
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
Table 56: Members
Property
Name
Property
ScriptEngine
Property
ScriptScope
Property
Version
78
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 57: Members
Property
Application
Property
Context
Property
DataModel
Property
ExtensionMgr
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
Property
Graphics
Property
Log
Property
SelectionMgr
Returns the ISelectionMgr object. Useful for manipulating the graphic selection.
Method
LockPrePostLicense()
Method
ResultsData(string)
Method
UnlockPrePostLicense()
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; }
80
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 58: Members
Property
CurrentExtension
Property
Extensions
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; }
82
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Ansys.AAP.PublicAPIs.Graphics Namespace
Declaration Syntax
namespace Ansys.AAP.PublicAPIs.Graphics
Table 59: Members
IDraw3DContext
IGraphics
IDraw3DContext
Interface to draw 3D features
Declaration Syntax
public interface IDraw3DContext
Table 60: Members
Property
Color
Property
DepthTest
Property
LineWeight
Property
Translucency
Property
Visible
Method
Close()
Method
DrawCircle(IEnumerable<double>,
double, IEnumerable<double>)
Method
DrawDisc(IEnumerable<double>,
double, IEnumerable<double>)
Method
DrawPoints(IEnumerable<double>)
Method
DrawPolygon(IEnumerable<double>,
IEnumerable<double>)
Method
DrawPolyline(IEnumerable<double>)
Method
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
ation given by the IGeoTessellation interface.
Method
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; }
84
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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)
86
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
Table 61: Members
Property
Color
Property
LineWeight
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
Property
MainHandle
Property
MainWindow
Property
Translucency
Method
CreateAndOpenDraw3DContext()
Method
Draws text in the graphic window at x,y coordinate (given in pixel units).
Method
LineTo2D(int, int)
Method
MoveTo2D(int, int)
Method
PixelToWorld(IEnumerable<int>)
Method
PixelToWorld(int, int)
Method
WorldToPixel(IEnumerable<double>)
Method
WorldToPixel(double, double,
double)
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; }
88
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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)
90
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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
92
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.