You are on page 1of 269

MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MPI Application Programming Interface


The MPI Application Programming Interface (API) is an Object Linking and
Embedding (OLE) automation interface that allows MPI functionality to be exposed to
external applications. The macro recording/playback and command-line functionality
within MPI uses Visual Basic Script (VBS) as the programming language and Windows
Script Host (WSH) as the automation client.

By creating and manipulating automation objects through the API, you can:

• invoke actions that are equivalent to GUI commands and actions,


• retrieve information regarding the model, results and plots, and
• access advanced capabilities that are not available through the GUI due to their
"programmatic" nature, e.g., predicates.

Getting more information


Not all features are recordable or accessible in the current release. For the latest
information on API support within MPI, please visit the MPI documentation section of
the Moldflow Community Center. The MCC also contains a Macro Exchange area
where you can download sample API scripts or contribute your own scripts.

MPI Application Programming Interface 1


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

MPI Application Programming Interface Compound


List
Here are the classes, structs, unions and interfaces with brief descriptions:

This class provides functions to create boundary conditions for


BoundaryConditions
analyses
BoundaryList Utility class for boundary list
This class provides access to the cooling circuit wizard
CircuitGenerator
functionality
DataTransform Utility class for data manipulation
DiagnosisManager This class provides access to mesh diagnostics
DoubleArray Utility class for an array of double values
EntList This class is used to create and manipulate entity lists
ImportOptions This class is used to specify model import options
IntegerArray Utility class for an array of integer values
This class is used to create a job object and query job
Job
information
This class is used to define a Job Manager object and manage
JobMgr
jobs and servers
This class provides functionality to create and manipulate
LayerManager
model layers
MaterialSelector This class is used to select molding materials into the study
MeshEditor This class provides meshing utilities
MeshGenerator This class is used to generate a mesh in the model
This class provides access to individal value about mesh
MeshSummary
summary
This class provides access to the cavity duplication wizard
ModelDuplicator
functionality
Modeler This class provides modeling operations
This class provides access to the mold surface wizard
MoldSurfaceGenerator
functionality
Plot This class is used to manipulate plot attributes
PlotMgr This class is used to create, enumerate and fetch plots
Predicate This class is used to specify predicates to populate entity lists
PredicateManager This class is used to create Predicate objects
Project This class is used to manipulate MPI projects
Property This class is used to access property information
PropertyEditor This class is used to create and edit properties
This class provides access to the runner system wizard
RunnerGenerator
functionality

MPI Application Programming Interface Compound List 2


MPI Application Programming Interface

Server This class is used to define a Server Object


StudyDoc This class is used to query and manipulate studies
Synergy This class is used as the "top-level" object in MPI
UserPlot This class is used to create user-defined plot
This class is used to create and manipulate vector objects
Vector (3-tuples). All coordinates and vector quantities in the API use
Vector objects
VectorArray This class is used to create and manipulate an array of vectors
Viewer This class is used to manipulate the graphics window (view)

MPI Application Programming Interface Compound List 3


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

BoundaryConditions Class Reference


This class provides functions to create boundary conditions for analyses. More...

List of all members.

Public Methods
Object CreateEntityList ()
long CreateFixedConstraints (Object aNodes, long aAnalysisType)
long CreatePinConstraints (Object aNodes, long aAnalysisType)
long CreateSpringConstraints (Object aNodes, long aAnalysisType, Object aTrans,
Object aRot)
long CreateGeneralConstraints (Object aNodes, long aAnalysisType, Object aDisp,
Object aRot)
long CreateNodalLoads (Object aNodes, Object aForce, Object aMoment)
long CreateEdgeLoads (Object aNodes, Object aForce)
long CreateElementalLoads (Object aTris, Object aForce)
long CreatePressureLoads (Object aTris, double aPressure)
long CreateTemperatureLoads (Object aTris, double aTemp, double aGradient)
long CreateVolumeLoads (Object aTris, Object aForce)
long CreateCriticalDimension (Object aNode1, Object aNode2, double aUpper,
double aLower)
Object CreateNDBC (Object aNode, Object aNormal, long aType, Object aProperty)
Object CreateNDBCAtXYZ (Object aCoord, Object aNormal, long aType, Object
aProperty)
Boolean MoveNDBC (Object aNdbc, Object aNode, Object aNormal)
Boolean MoveNDBCToXYZ (Object aNdbc, Object aCoord, Object aNormal)
long SetProhibitedGateNodes (Object aNodes, long aAnalysisType)

Detailed Description
You can use this class to create:
• fixed, pin, spring and general constraints
• nodal, edge, element, pressure and volume loads
• dimensional constraints for shrink analysis
• injection entrances, coolant inlets and other "generic" boundary conditions

See also:
Synergy::BoundaryConditions

BoundaryConditions Class Reference 4


MPI Application Programming Interface

Member Function Documentation

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
EntList object

long CreateFixedConstraints ( Object aNodes,


long aAnalysisType
)
Creates fixed constraints at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aAnalysisType number that specifies which analysis the constraint is
applicable to:
• 1: stress
• 2: warp
• 3: both stress and warp

Returns:
number of constraints created

See also:
CreatePinConstraints , CreateSpringConstraints , CreateGeneralConstraints

Example:
This example creates a fixed constraint at node N1 for stress analysis.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "N1 "
BoundaryConditions.CreateFixedConstraints EntList, 1

long CreatePinConstraints ( Object aNodes,


long aAnalysisType
)
Creates pin constraints at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aAnalysisType number that specifies which analysis the constraint is
applicable to:
• 1: stress
• 2: warp
• 3: both stress and warp

Returns:

Member Function Documentation 5


MPI Application Programming Interface

number of constraints created

See also:
CreateFixedConstraints , CreateSpringConstraints ,
CreateGeneralConstraints

Example:
This example creates a pin constraint at node N1 for warp.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "N1 "
BoundaryConditions.CreatePinConstraints EntList, 2

long CreateSpringConstraints ( Object aNodes,


long aAnalysisType,
Object aTrans,
Object aRot
)
Creates spring constraints at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aRelevantAnalysis number that specifies which analysis the constraint is
applicable to:
• 1: stress
• 2: warp
• 3: both stress and warp
aTrans Vector object that specifies translation stiffnesses
aRot Vector object that specifies rotation stiffnesses

Returns:
number of constraints created

See also:
CreatePinConstraints , CreateFixedConstraints , CreateGeneralConstraints

Example:
This example creates a spring constraint at node N1 for stress and warp
analyses.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Vector_1 = Synergy.CreateVector()
EntList.SelectFromString "N1 "
Vector.SetXYZ 1, 1, 0
Vector_1.SetXYZ 0, 1, 1
BoundaryConditions.CreateSpringConstraints EntList, 3, Vector, Vector_1

Member Function Documentation 6


MPI Application Programming Interface

long CreateGeneralConstraints ( Object aNodes,


long aAnalysisType,
Object aTrans,
Object aRot
)
Creates general constraints at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aAnalysisType number that specifies which analysis the constraint is
applicable to:
• 1: stress
• 2: warp
• 3: both stress and warp
aTrans Vector object whose components specify displacement
constraints as follows:
• 0: free (unconstrained)
• -1: fixed
• values > 0: specified displacement
aRot Vector object whose components specify rotational
constraints as follows:
• 0: free (unconstrained)
• -1: fixed
• values > 0: specified rotation

Returns:
number of constraints created

See also:
CreatePinConstraints , CreateFixedConstraints , CreateSpringConstraints

Example:
This example creates a general constraint at node N1 for stress. The node is
free in the X direction, fixed in the Y direction and has a unit displacement
in the Z direction; its rotation is fixed along the X axis, free along the Y axis
and set to 25 along the Z axis.

Set BoundaryConditions = Synergy.BoundaryConditions()


EntList = BoundaryConditions.CreateEntityList()
Vector = Synergy.CreateVector()
Vector_1 = Synergy.CreateVector()
EntList.SelectFromString "N1 "
Vector.SetXYZ 0, -1, 1
Vector_1.SetXYZ -1, 0, 25
BoundaryConditions.CreateGeneralConstraints EntList, 1, Vector, Vector_1

long CreateNodalLoads ( Object aNodes,


Object aForce,
Object aMoment
)

Member Function Documentation 7


MPI Application Programming Interface

Creates nodal loads at selected nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aForce Vector object that specifies the force vector
aMoment Vector object that specifies the moment vector

Returns:
number of loads created

See also:
CreateEdgeLoads , CreatePressureLoads , CreateElementalLoads ,
CreateTemperatureLoads , CreateVolumeLoads

Example:
This example creates a nodal load at node N1.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Vector_1 = Synergy.CreateVector()
EntList.SelectFromString "N1 "
Vector.SetXYZ 1, 2, 0
Vector_1.SetXYZ 0, 2, 3
BoundaryConditions.CreateNodalLoads EntList, Vector, Vector_1

long CreateEdgeLoads ( Object aNodes,


Object aForce
)
Creates edge loads at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aForce Vector object that specifies edge force per unit length

Returns:
number of loads created

See also:
CreateNodalLoads , CreatePressureLoads , CreateElementalLoads ,
CreateTemperatureLoads , CreateVolumeLoads

Example:
This example creates an edge load on the edge defined by nodes N1-N2.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set Vector = Synergy.CreateVector()
EntList.SelectFromString "N1 N2 "
Vector.SetXYZ 1, 4, 0
BoundaryConditions.CreateEdgeLoads EntList, Vector

Member Function Documentation 8


MPI Application Programming Interface

long CreateElementalLoads ( Object aTris,


Object aForce
)
Creates elemental loads on given triangles

Parameters:
aTris EntList object containing triangles to be loaded
aForce Vector object that specifies the element load

Returns:
number of loads created

See also:
CreateNodalLoads , CreateEdgeLoads , CreatePressureLoads ,
CreateTemperatureLoads , CreateVolumeLoads

Example:
This example creates an elemental load on triangle T3.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set Vector = Synergy.CreateVector()
EntList.SelectFromString "T3"
Vector.SetXYZ 2, 1, 0
BoundaryConditions.CreateElementalLoads EntList, Vector

long CreatePressureLoads ( Object aTris,


double aPressure
)
Creates pressure load on given triangles

Parameters:
aTris EntList object containing triangles to be loaded
aPressure pressure on element

Returns:
number of loads created

See also:
CreateNodalLoads , CreateEdgeLoads , CreateElementalLoads ,
CreateTemperatureLoads , CreateVolumeLoads

Example:
This example creates a pressure load on triangle T3.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "T3 "
BoundaryConditions.CreatePressureLoads EntList, 2

Member Function Documentation 9


MPI Application Programming Interface

long CreateTemperatureLoads ( Object aTris,


double aTop,
double aBot
)
Create thermal loads on given triangles

Parameters:
aTris EntList object containing triangles to be loaded
aTop temperature increase on the top of the element
aBot temperature increase at the bottom of the element

Returns:
number of loads created

See also:
CreateNodalLoads , CreateEdgeLoads , CreateElementalLoads ,
CreatePressureLoads , CreateVolumeLoads

Example:
This example creates a temperature load at triangle T3.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "T3"
BoundaryConditions.CreateTemperatureLoads EntList, 1, 1

long CreateVolumeLoads ( Object aTris,


Object aForce
)
Creates volume loads on given triangles

Parameters:
aTris EntList object containing triangles to be loaded
aForce Vector object defining the force per unit volume

Returns:
number of loads created

See also:
CreateNodalLoads , CreateEdgeLoads , CreateElementalLoads ,
CreatePressureLoads , CreateTemperatureLoads

Example:
This example creates a volume load on triangle T3.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set Vector = Synergy.CreateVector()
EntList.SelectFromString "T3"
Vector.SetXYZ 3, 5, 3
BoundaryConditions.CreateVolumeLoads EntList, Vector

Member Function Documentation 10


MPI Application Programming Interface

long CreateCriticalDimension ( Object aNode1,


Object aNode2,
double aUpper,
double aLower
)
Creates critical dimensions

Parameters:
aNode1 EntList object containing the first node
aNode2 EntList object containing the second node
aUpper upper dimensional tolerance
aLower lower dimensional tolerance

Returns:
number of loads created

Example:
This example creates a critical dimension between nodes N1
and N2

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
Set EntList_1 = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "N1"
EntList_1.SelectFromString "N2"
BoundaryConditions.CreateCriticalDimension EntList, EntList_1, 0.1, 0.1

Object CreateNDBC ( Object aNode,


Object aNormal,
long aType,
Object aProp
)
Creates a "generic" boundary condition such as an injection entrance, coolant
entrance, gas entrance, etc.

Parameters:
aNodes EntList object containing the node on which the boundary
condition is to be created
aNormal Vector object that specifies the orientation of the boundary
condition
aType specifies the property type of the boundary condition
aProp property that needs to be attached to the boundary condition.
Specify Nothing to automatically create or select one for the
given property type

Returns:
EntList object containing the NDBC that was created

Example:
This example creates an injection entrance on node N1.

Member Function Documentation 11


MPI Application Programming Interface
Set BoundaryConditions = Synergy.BoundaryConditions()
Set Vector = Synergy.CreateVector()
Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "N1"
Vector.SetXYZ 0, 0, 1
Set EntList_1 = BoundaryConditions.CreateNDBC(EntList, Vector, 40000, Nothing)

Object CreateNDBCAtXYZ ( Object aCoord,


Object aNormal,
long aType,
Object aProp
)
Creates a "generic" boundary condition such as an injection entrance, coolant
entrance, gas entrance, etc., at a given location

Parameters:
aCoord Vector object that specifies the location
aNormal Vector object that specifies the orientation of the boundary
condition
aType specifies the property type of the boundary condition
aProp property that needs to be attached to the boundary condition.

Returns:
EntList object containing the NDBC that was created

Note:
Do not use this function after meshing your model since a node is created at
the specified location in order to create this NDBC.

Example:
This example creates an injection location at (100, 100, 0).

Set BoundaryConditions = Synergy.BoundaryConditions()


Set Vector = Synergy.CreateVector()
Vector.SetXYZ 0, 0, 1
Set Vector_1 = Synergy.CreateVector()
Vector.SetXYZ_1 100, 100, 0
Set EntList_1 = BoundaryConditions.CreateNDBC(Vector_1, Vector, 40000, Nothing)

Boolean MoveNDBC ( Object aNdbc,


Object aNode,
Object aNormal
)
Moves a boundary condition to a different node

Parameters:
aNdbc EntList object containing the NDBC to be moved
aNode EntList object containing the destination node
aNormal Vector object that specifies the orientation of the boundary
condition

Returns:

Member Function Documentation 12


MPI Application Programming Interface
True if successful; False if not

Example:
This example moves NBC11 to node N390.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set Vector = Synergy.CreateVector()
Set EntList = BoundaryConditions.CreateEntityList()
Set EntList_1 = BoundaryConditions.CreateEntityList()
EntList_1.SelectFromString "NBC11 "
EntList.SelectFromString "N390 "
Vector.SetXYZ 0, 0, 1
BoundaryConditions.MoveNDBC EntList_1, EntList, Vector

Boolean MoveNDBCToXYZ ( Object aNdbc,


Object aCoord,
Object aNormal
)
Moves a boundary condition to a different position

Parameters:
aNdbc EntList object containing the NDBC to be moved
aCoord Vector object that specifies the destination
aNormal Vector object that specifies the orientation of the boundary
condition

Returns:
True if successful; False if not

Example:
This example moves NDBC NBC11 to a new location (10, 100, 10).

Set BoundaryConditions = Synergy.BoundaryConditions()


Set Vector = Synergy.CreateVector()
Set Vector1 = Synergy.CreateVector()
Set EntList_1 = BoundaryConditions.CreateEntityList()
EntList_1.SelectFromString "NBC11 "
Vector.SetXYZ 0, 0, 1
Vector1.SetXYZ 10, 100, 10
BoundaryConditions.MoveNDBC EntList_1, Vector1, Vector

long SetProhibitedGateNodes ( Object aNodes,


long aAnalysisType
)
Set prohibited gate node constraints at given nodes

Parameters:
aNodes EntList object containing nodes to be constrained
aAnalysisType number that specifies which analysis the constraint is
applicable to. In current MPI6.2, the parameter is ignored
because it is always for gate optimization process

Returns:

Member Function Documentation 13


MPI Application Programming Interface

number of constraints created

Example:
This example set a prohibited gate node constraint at node N1 for
optimization analysis.

Set BoundaryConditions = Synergy.BoundaryConditions()


Set EntList = BoundaryConditions.CreateEntityList()
EntList.SelectFromString "N1 "
BoundaryConditions.SetProhibitedGateNodes EntList, 1

Member Function Documentation 14


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

BoundaryList Class Reference


Utility class for boundary list. More...

List of all members.

Public Methods
BoundaryList Entity (long aIndex)
SelectFromString (String aStr)
String ConvertToString ()

Public Attributes
long Size
Boundary list entities size.

Detailed Description
This class is used to create and manipulate boundary lists. It can be used to specify
mesh size on boundary curve of region See BoundaryList::SelectFromString

Member Function Documentation

BoundaryList Entity ( long aIndex )


Returns entity at a given index

Parameters:
aIndex index between 0 and
array.Size-1

Returns:
BoundaryList object containing the
object

SelectFromString ( String aStr )


Selects a list of entities from a string

Parameters:
aStr String representation of the
entities

BoundaryList Class Reference 15


MPI Application Programming Interface
Example:
This examples sets mesh size to global
size
Set EntList = Modeler.CreateEntityList()
Set BoundaryList = Modeler.CreateBoundaryList()
EntList.SelectFromString ""
BoundaryList.SelectFromString "R1:0:6 "
Modeler.SetMeshSize EntList, BoundaryList, 0

String ConvertToString ( )
Converts boundary list to a string

Returns:
string representation of the boundary
list

Example:
This example displays "R1:0:6"
Set EntList = Modeler.CreateEntityList()
Set BoundaryList = Modeler.CreateBoundaryList()
BoundaryList.SelectFromString "R1:0:6 "
Str = Boundary.ConvertToString()
MsgBox Str

Member Function Documentation 16


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

CircuitGenerator Class Reference


This class provides access to the cooling circuit wizard functionality. More...

List of all members.

Public Methods
Boolean Generate ()

Public Attributes
double Diameter
Cooling channel diameter.

double Distance
Clearance for the cooling channels from the model.

double Spacing
Spacing between cooling channels.

double Overhang
Distance to extend beyond the part.

long NumChannels
Number of channels.

Boolean DeleteOld
Specifies whether the old layout will be deleted before generating the new one.

Boolean UseHoses
Specifies whether hoses need to be used to connect channels.

Boolean XAlign
Specify True to align in the X direction; False to alignin the Y direction.

Detailed Description
You can use this class to automatically generate a cooling circuit in the model.

See also:
Synergy::CircuitGenerator

CircuitGenerator Class Reference 17


MPI Application Programming Interface

Member Function Documentation

Boolean Generate ( )
Automatically generates a coolant circuit

Returns:
True if the operation succeeded; False otherwise

Example:
This example generates a coolant circuit using the following
parameters.

Set CircuitGen = Synergy.CircuitGenerator()


CircuitGen.Diameter 10
CircuitGen.Distance 25
CircuitGen.Spacing 30
CircuitGen.Overhang 5
CircuitGen.NumChannels 1
CircuitGen.DeleteOld True
CircuitGen.UseHoses False
CircuitGen.XAlign True
CircuitGen.Generate

Member Function Documentation 18


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

DataTransform Class Reference


Utility class for data manipulation. More...

List of all members.

Public Methods
Boolean Func (String aFunc, Object aLabelIn, Object aDataIn, Object aLabelOut,
Object aDataOut)
Boolean Op (Object aLabel_1, Object aData_1, String aOp, Object aLabel_2, Object
aData_2, Object aLabelOut, Object aDataOut)
Boolean Scalar (Object aLabelIn, Object aDataIn, String aOp, double aVal, Object
aLabelOut, Object aDataOut)

Detailed Description
This class provides an efficient way to manipulate result data. It has three member
functions which can do calculation on input data ( IntegerArray and DoubleArray pair)
to generate output data (IntegerArray and DoubleArray pair ). E.g. it can be used to
calculate the difference between two sets of result data, or very complicated
calculation by calling the member function several time to generate a set of new data,
then create a UserPlot with this new data set.

See also:
Synergy::DataTransform , UserPlot , DoubleArray , IntegerArray

Member Function Documentation

Boolean Func ( String aFunc,


Object aLabelIn,
Object aDataIn,
Object aLabelOut,
Object aDataOut
)
This function calculates data using given function

Parameters:
aFunc Function name, could be one of the following
• sin: calculate the sine of the expression
• cos: calculate the cosine of the expression
• tan: calculate the tangent of the expression

DataTransform Class Reference 19


MPI Application Programming Interface

• abs: calculate the absolute value of the expression


• exp: exponentiate the expression (base 'e')
• nint:calculate the nearest integer to the expression (rounding on
S.I. units evaluation of the expression)
• sign:evaluates to 0, 1 or -1 if the expression evaluates to 0, >0 or
<0 respectively
• log: calculate the logarithm of the expression (base 'e')
• sqrt:calculate the square root of the expression
aLabelIn IntegerArray containing input elements ID
aDataIn DoubleArray containing input data
aLabelOut IntegerArray containing output elements ID
aDataOut DoubleArray containing output calculated data

Returns:
True if successful

Example:
This example does sine calculation on "Pressure (End of filling)" result
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set DataTrans = Synergy.DataTransform()
Set nodeIDs_P1 = Synergy.CreateIntegerArray()
Set P1 = Synergy.CreateDoubleArray()
id = PlotMgr.FindDatasetIDByName("Pressure (end of filling)")
PlotMgr.GetScalarData id, IndpValues, nodeIDs_P1, P1
DataTrans.Func "sin", nodeIDs_P1, P1, nodeIDs_P1, P1
Set UserPlot = PlotMgr.CreateUserPlot()
UserPlot.SetName("Plot of sine function")
UserPlot.SetDataType("NDDT")
UserPlot.SetDeptUnitName("MPa")
UserPlot.Build()

Boolean Op ( Object aLabel_1,


Object aData_1,
String aOp,
Object aLabel_2,
Object aData_2,
Object aLabelOut,
Object aDataOut
)
This function calculates two sets of data to generate output data

Parameters:
aLabel_1 IntegerArray of first elements list
aData_1 DoubleArray of first data list
aOp math operator, "+", "-", "*", "/"
aLabel_2 IntegerArray of second elements list
aData_2 DoubleArray of second data list
aLabelOut IntegerArray of intersect set of aLabel_1 and aLabel_2
aDataOut DoubleArray of output data

Returns:

Member Function Documentation 20


MPI Application Programming Interface

True if successful

Example:
This example calculates difference between two plots and stores data in
arrays
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set DataTrans = Synergy.DataTransform()
Set nodeIDs_P1 = Synergy.CreateIntegerArray()
Set P1 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1770, IndpValues, nodeIDs_P1, P1
Set nodeIDs_P2 = Synergy.CreateIntegerArray()
Set P2 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1630, IndpValues, nodeIDs_P2, P2
Set node_O = Synergy.CreateIntegerArray()
Set p_O = Synergy.CreateDoubleArray()
DataTrans.Op nodeIDs_P2, P2, "-", nodeIDs_P1, P1, node_O, p_O
UserPlot.SetName("Plot of diff")
UserPlot.SetDataType("NDDT")
UserPlot.SetDeptUnitName("MPa")
UserPlot.Build()

Boolean Scalar ( Object aLabelIn,


Object aDataIn,
String aOp,
double aVal,
Object aLabelOut,
Object aDataOut
)
This function calculates input data by operating with a scalar value

Parameters:
aVal scalar value
aOp operator string, current support "+", "-", "*", "/", "/=" for post
divide, "-=" for post minus
aLabelIn Input elements list
aDataIn Input data list
aLabelOut Output elements list
aDataOut Output elements list

Returns:
True if successful

Example:
This example scales result data by 2 times
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set DataTrans = Synergy.DataTransform()
Set nodeIDs_P1 = Synergy.CreateIntegerArray()
Set P1 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1770, IndpValues, nodeIDs_P1, P1
DataTrans.Scalar nodeIDs_P1, P1, "*", 2.0, node_O, p_O
UserPlot.SetName("Plot of scaling")
UserPlot.SetDataType("NDDT")
UserPlot.SetDeptUnitName("MPa")

Member Function Documentation 21


MPI Application Programming Interface
UserPlot.Build()

Member Function Documentation 22


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

DiagnosisManager Class Reference


This class provides access to mesh diagnostics. More...

List of all members.

Public Methods
ShowThickness (double aMin, double aMax, Boolean aAssignLayer)
ShowThickness2 (double aMin, double aMax, Boolean aAssignLayer, Boolean
aVisibleOnly)
ShowAspectRatio (double aMin, double aMax, Boolean aStdAR, Boolean
aAssignLayer, Boolean aShowTxt)
ShowAspectRatio2 (double aMin, double aMax, Boolean aStdAR, Boolean
aAssignLayer, Boolean aShowTxt, Boolean aVisibleOnly)
Object CreateEntityList ()
ShowConnect (Object aEnt, Boolean aExBeam, Boolean aAssignLayer, Boolean
aShowTxt)
ShowConnect2 (Object aEnt, Boolean aExBeam, Boolean aAssignLayer,
Boolean aShowTxt, Boolean aVisibleOnly)
ShowEdges (Boolean aNonManifold, Boolean aAssignLayer, Boolean
aShowTxt)
ShowEdges2 (Boolean aNonManifold, Boolean aAssignLayer, Boolean
aShowTxt, Boolean aVisibleOnly)
ShowOverlapping (Boolean aOverall, Boolean aProperIsect, Boolean
aAssignLayer, Boolean aShowTxt)
ShowOverlapping2 (Boolean aOverall, Boolean aProperIsect, Boolean
aAssignLayer, Boolean aShowTxt, Boolean aVisibleOnly)
ShowOverlapping3 (Boolean aOverall, Boolean aProperIsect, Boolean aExTri,
Boolean aExBeam, Boolean aAssignLayer, Boolean aShowTxt, Boolean
aVisibleOnly)
ShowMatchInfo (Boolean aAssignLayer, Boolean aShowTxt)
ShowMatchInfo2 (Boolean aAssignLayer, Boolean aShowTxt, Boolean
aReciprocal)
ShowOccurrence (Boolean aAssignLayer)
ShowOccurrence2 (Boolean aAssignLayer, Boolean aVisibleOnly)
ShowOrient (Boolean aAssignLayer, Boolean aShowTxt)
ShowOrient2 (Boolean aAssignLayer, Boolean aShowTxt, Boolean aVisibleOnly)
ShowSummary ()
long GetThicknessDiagnosis (double aMin, double aMax, Object aEntList, Object
aValueList)
long GetThicknessDiagnosis2 (double aMin, double aMax, Boolean aVisibleOnly,
Object aEntList, Object aValueList)
long GetAspectRatioDiagnosis (double aMin, double aMax, Boolean aStdAR, Object
aEntList, Object aValueList)
long

DiagnosisManager Class Reference 23


MPI Application Programming Interface
GetAspectRatioDiagnosis2 (double aMin, double aMax, Boolean aStdAR,
Boolean aVisibleOnly, Object aEntList, Object aValueList)
long GetConnectivityDiagnosis (Object aEnts, Boolean aExBeam, Object aEntList,
Object aValueList)
long GetConnectivityDiagnosis2 (Object aEnts, Boolean aExBeam, Boolean
aVisibleOnly, Object aEntList, Object aValueList)
long GetEdgesDiagnosis (Boolean aNonManifold, Object aEntList, Object
aValueList)
long GetEdgesDiagnosis2 (Boolean aNonManifold, Boolean aVisibleOnly, Object
aEntList, Object aValueList)
long GetOverlapDiagnosis (Boolean aOverall, Boolean aProperIsect, Object
aEntList, Object aValueList)
long GetOverlapDiagnosis2 (Boolean aOverall, Boolean aProperIsect, Boolean
aVisibleOnly, Object aEntList, Object aValueList)
long GetOccurrenceDiagnosis (Object aEntList, Object aValueList)
long GetOccurrenceDiagnosis2 (Boolean aVisibleOnly, Object aEntList, Object
aValueList)
long GetMatchInfoDiagnosis (Object aEntList, Object aValueList)
long GetOrientationDiagnosis (Object aEntList, Object aValueList)
long GetOrientationDiagnosis2 (Boolean aVisibleOnly, Object aEntList, Object
aValueList)
ShowZeroAreaElements (double aMin, Boolean aAssignLayer, Boolean
aShowTxt)
ShowZeroAreaElements2 (double aMin, Boolean aAssignLayer, Boolean
aShowTxt, Boolean aVisibleOnly)
long GetZeroAreaElementsDiagnosis (double aMin, Object aEntList, Object
aValueList)
long GetZeroAreaElementsDiagnosis2 (double aMin, Boolean aVisibleOnly, Object
aEntList, Object aValueList)
Object GetMeshSummary (Boolean aElementOnly)
long GetSurfWithBadTrimCurv (Boolean aOuterLoop, Boolean aInnerLoop, Boolean
aSurfDef, Boolean aVisibleOnly, Object aEntList, Object aValueList)
ShowSurfWithBadTrimCurv (Boolean aOuterLoop, Boolean aInnerLoop,
Boolean aSurfaceDef, Boolean aAssignLayer, Boolean aShowTxt, Boolean
aVisibleOnly)
long GetSurfWithFreeTrimCurv (Boolean aFree, Boolean aNM, Boolean
aVisibleOnly, Object aEntList, Object aValueList)
ShowSurfWithFreeTrimCurv (Boolean aFree, Boolean aNM, Boolean
aAssignLayer, Boolean aShowTxt, Boolean aVisibleOnly)
ShowLDRatio (double aMin, double aMax, Boolean aAssignLayer, Boolean
aVisibleOnly)
ShowCentroidCloseness (Boolean aAssignLayer, Boolean aVisibleOnly)
ShowBeamElementCount (long aMin, long aMax, Boolean aAssignLayer,
Boolean aVisibleOnly)
ShowCoolingCircuitValidity (Boolean aAssignLayer, Boolean aVisibleOnly)
ShowBubblerBaffleCheck (Boolean aAssignLayer, Boolean aVisibleOnly)
ShowTrappedBeam (Boolean aAssignLayer, Boolean aVisibleOnly)
UpdateThicknessDisplay (double aMin, double aMax)
ShowDimensions (double aMin, double aMax, Boolean aAssignLayer, Boolean
aVisibleOnly)
UpdateDimensionalDisplay (double aMin, double aMax)

Public Methods 24
MPI Application Programming Interface

Detailed Description
You can use this class to generate mesh diagnostics such as aspect ratios, thickness,
connectivity, overlaps/intersections, free edges, occurrence numbers and orientation.
Both graphical and textual output are supported.

See also:
Synergy::DiagnosisManager

Member Function Documentation

ShowThickness ( double aMin,


double aMax,
Boolean aAssignLayer
)
Generates thickness diagnostics

Parameters:
aMin lower bound for plotted thickness
aMax upper bound for plotted thickness
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise

Example:
This example shows element thickness between 1 and 2 and pushed these
elements into a diagnostics layer.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowThickness 1, 2, True

ShowThickness2 ( double aMin,


double aMax,
Boolean aAssignLayer,
Boolean aVisibleOnly
)
Generates thickness diagnostics

Parameters:
aMin lower bound for plotted thickness
aMax upper bound for plotted thickness
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:

Detailed Description 25
MPI Application Programming Interface

This example shows element thickness between 1 and 2 and pushed these
elements into a diagnostics layer.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowThickness2 1, 2, True, False

ShowAspectRatio ( double aMin,


double aMax,
Boolean aStdAR,
Boolean aAssignLayer,
Boolean aShowTxt
)
Generates aspect ratio diagnostics

Parameters:
aMin lower bound for aspect ratio
aMax upper bound for aspect ratio
aStdAR specify True for the standard aspect ratio measue; False for a
normalized measure
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example shows aspect ratios between 5 and 20.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowAspectRatio 5, 20, True, True, False

ShowAspectRatio2 ( double aMin,


double aMax,
Boolean aStdAR,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates aspect ratio diagnostics

Parameters:
aMin lower bound for aspect ratio
aMax upper bound for aspect ratio
aStdAR specify True for the standard aspect ratio measue; False for a
normalized measure
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Member Function Documentation 26


MPI Application Programming Interface
Example:
This example shows aspect ratios between 5 and 20 on visible elements.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowAspectRatio2 5, 20, True, True, False, True

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
empty EntList object

ShowConnect ( Object aEnts,


Boolean aExBeam,
Boolean aAssignLayer,
Boolean aShowTxt
)
Generates connectivity diagnostics

Parameters:
aEnts EntList object of entities to start searching from
aExBeam specifies whether beams need to be excluded while generating
the diagnostics
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example displays elements that are connected to node N1; beams are
excluded.

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
EntList.SelectFromString "N1"
DiagnosisManager.ShowConnect EntList, True, False, False

ShowConnect2 ( Object aEnts,


Boolean aExBeam,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates connectivity diagnostics

Parameters:
aEnts EntList object of entities to start searching from
aExBeam specifies whether beams need to be excluded while generating
the diagnostics
aAssignLayer

Member Function Documentation 27


MPI Application Programming Interface

specify True to push the elements within the diagnosis range


into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example displays elements that are connected to node N1; beams are
excluded.

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
EntList.SelectFromString "N1"
DiagnosisManager.ShowConnect2 EntList, True, False, False, False

ShowEdges ( Boolean aNonManifold,


Boolean aAssignLayer,
Boolean aShowTxt
)
Generates free and manifold edge diagnostics

Parameters:
aNonManifold specify True to generate diagnostics for non-manifold edges in
addition to free edges; False otherwise
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example shows free edges in the mesh.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowEdges False, False, False

ShowEdges2 ( Boolean aNonManifold,


Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates free and manifold edge diagnostics

Parameters:
aNonManifold specify True to generate diagnostics for non-manifold edges in
addition to free edges; False otherwise
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Member Function Documentation 28


MPI Application Programming Interface

Example:
This example shows free edges in the mesh.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowEdges2 False, False, False, False

ShowOverlapping ( Boolean aOverall,


Boolean aProperIsect,
Boolean aAssignLayer,
Boolean aShowTxt
)
Generates diagnostics for overlaps and intersections

Parameters:
aOverlaps specifies whether overlaps need to be displayed
aProperIsect specifies whether intersections need to be displayed
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example displays overlaps and intersections in the mesh graphically.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOverlapping True, True, False, False

ShowOverlapping2 ( Boolean aOverall,


Boolean aProperIsect,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates diagnostics for overlaps and intersections

Parameters:
aOverlaps specifies whether overlaps need to be displayed
aProperIsect specifies whether intersections need to be displayed
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example displays overlaps and intersections in the mesh graphically.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOverlapping2 True, True, False, False, False

Member Function Documentation 29


MPI Application Programming Interface

ShowOverlapping3 ( Boolean aOverall,


Boolean aProperIsect,
Boolean aExTri,
Boolean aExBeam,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates diagnostics for overlaps and intersections

Parameters:
aOverlaps specifies whether overlaps need to be displayed
aProperIsect specifies whether intersections need to be displayed
aExTri specifies whether excludes triangles
aExBeam specifies whether excludes beams
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example displays overlaps and intersections in the mesh graphically, for
beams only.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOverlapping3 True, True, True, False, False, False, False

ShowMatchInfo ( Boolean aAssignLayer,


Boolean aShowTxt
)
Generates mesh match diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example shows mesh match diagnostics in text mode.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowMatchInfo False, True

ShowMatchInfo2 ( Boolean aAssignLayer,


Boolean aShowTxt,
Boolean aReciprocal
)

Member Function Documentation 30


MPI Application Programming Interface
Generates mesh match diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aReciprocal TrueReciprocal mesh matching

Example:
This example shows mesh match reciprocal diagnostics.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowMatchInfo2 False, False, True

ShowOccurrence ( Boolean aAssignLayer )


Generates occurrence number diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise

Example
This example shows mesh element occurrence numbers.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOccerence False

ShowOccurrence2 ( Boolean aAssignLayer,


Boolean aVisibleOnly
)
Generates occurrence number diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example
This example shows mesh element occurrence numbers.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOccerence2 False, True

ShowOrient ( Boolean aAssignLayer,


Boolean aShowTxt
)
Generates mesh orientation diagnostics

Parameters:
aAssignLayer

Member Function Documentation 31


MPI Application Programming Interface
specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results

Example:
This example generates text diagnostics for mesh orientation.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOrient False, True

ShowOrient2 ( Boolean aAssignLayer,


Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates mesh orientation diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example generates text diagnostics for mesh orientation.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowOrient2 False, True, False

ShowSummary ( )
Generates diagnostics summary

Example:
This example displays a diagnostics
summary.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowSummary

long GetThicknessDiagnosis ( double aMin,


double aMax,
Object aEntList,
Object aValueList
)
To get a list of entity ID and thickness value between the limits

Parameters:
aMin minimum thickness, use 0 to include all thickness
aMax maximum thickness, use 0 to include all thickness

Member Function Documentation 32


MPI Application Programming Interface

aEntList an IntegerArray of element IDs


aValueList a DoubleArray of thickness of the corresponding element

Returns:
Number of elements found

Example:
This example gets elements information into IntArr and DoubleArr of the
thickness between 1 and 3

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DoubleArr = Synergy.CreateDoubleArray()
DiagnosisManager.GetThicknessDiagnosis 1, 3, IntArr, DoubleArr

long GetThicknessDiagnosis2 ( double aMin,


double aMax,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID and thickness value with given limit

Parameters:
aMin Minimum limit of the thickness
aMax Maximum limit of the thickness
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of thickness of the corresponding element

Returns:
number of elements found

Example:
This example gets visible elements information into IntArr and DoubleArr of
the thickness between 1 and 3

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DoubleArr = Synergy.CreateDoubleArray()
DiagnosisManager.GetThicknessDiagnosis2 1, 3, True, IntArr, DoubleArr

long GetAspectRatioDiagnosis ( double aMin,


double aMax,
Boolean aStdAR,
Object aEntList,
Object aValueList
)

Member Function Documentation 33


MPI Application Programming Interface

To get a list of entity ID and aspect ratio value between the given limits

Parameters:
aMin lower limit, use 0 to include all
aMax upper limit, use 0 to include all
aStdAR specify True for the standard aspect ratio measue; False for a
normalized measure
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of aspect ratio of the corresponding element

Returns:
Number of elements found

Example:
This example gets elements information into IntArr and DoubleArr of the
aspect ratio between 1 and 10

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DoubleArr = Synergy.CreateDoubleArray()
DiagnosisManager.GetAspectRatioDiagnosis 1, 10, TRUE, IntArr, DoubleArr

long GetAspectRatioDiagnosis2 ( double aMin,


double aMax,
Boolean aStdAR,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID and aspect ratio value with given limit

Parameters:
aMin Lower limit
aMax Upper limit
aStdAR specify True for the standard aspect ratio measue; False
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValue a DoubleArray of aspect ratio of the corresponding element

Returns:
number of elements found

Example:
This example gets elements information into IntArr and DoubleArr of the
aspect ratio between 1 and 10

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DoubleArr = Synergy.CreateDoubleArray()
DiagnosisManager.GetAspectRatioDiagnosis2 1, 10, TRUE, False, IntArr, DoubleArr

Member Function Documentation 34


MPI Application Programming Interface

long GetConnectivityDiagnosis ( Object aEnts,


Boolean aExBeam,
Object aEntList,
Object aValueList
)
To get a list of entity ID connected with a given element

Parameters:
aEnts seed element
aExBeam whether to exclude beam elements
aEntList an IntegerArray of element IDs connected with the given element
aValueList a DoubleArray of connectivity value, currently all 1.

Returns:
Number of elements found

Example:
This example gets elements information into IntArr and DoubleArr of the
elements connected with "T1"

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
EntList.SelectFromString "T1"

Set IntArr = Synergy.CreateIntegerArray()


Set DblArr = Synergy.CreateDoubleArray()

num = DiagnosisManager.GetConnectivityDiagnosis(EntList, TRUE, IntArr, DblArr)

long GetConnectivityDiagnosis2 ( Object aEnts,


Boolean aExBeam,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID connected with a given element

Parameters:
aEnts Given element handle
aExBeam Whether to exclude beam elements
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs connected with the given
element
aValueList a DoubleArray of connectivity value, currently all 1.

Returns:
Number of elements connected with given element

Example:
This example gets elements information into IntArr and DoubleArr of the
elements connected with "T1"

Member Function Documentation 35


MPI Application Programming Interface

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
EntList.SelectFromString "T1"
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetConnectivityDiagnosis2(EntList, TRUE, False, IntArr, DblArr)

long GetEdgesDiagnosis ( Boolean aNonManifold,


Object aEntList,
Object aValueList
)
To get a list of entity ID of edges

Parameters:
aNonManifold whether to include non-manifold edges
aEntList element number
aValueList value list, each value specifies freeedge / non-manifold

000000AB 000000CD 000000EF 00000000


A = 1 if first edge of the element is a Free Edge
B = 1 if first edge of the element is a Non-manifold Edge
C = 1 if second edge of the element is a Free Edge
D = 1 if second edge of the element is a Non-manifold Edge
E = 1 if third edge of the element is a Free Edge
F = 1 if third edge of the element is a Non-manifold Edge
E.g. If DoubleArr contains a value 512, which is 10 00000000 in binary, means the
3rd edge is a free edge

Returns:
Number of elements containing free/non-manifold edge

Example:
This example gets elements information into IntArr and DoubleArr of free
edges

Set Synergy = CreateObject("synergy.Synergy")


Set DiagnosisManager = Synergy.DiagnosisManager()
Set Arr1 = Synergy.CreateIntegerArray()
Set Arr2 = Synergy.CreateDoubleArray()
sum = DiagnosisManager.GetEdgesDiagnosis(FALSE, Arr1, Arr2)

long GetEdgesDiagnosis2 ( Boolean aNonManifold,


Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID of edges with a given element

Parameters:
aNonManifold Whether to include non-manifold edges
aVisibleOnly Include only visible elements in the diagnosis

Member Function Documentation 36


MPI Application Programming Interface

aEntList Element number


aValueList bit field for freeedge / non-manifold
[0000001(FreeEdge)1(Non-Manifold)] Edge1 [00000011]
Edge2 [00000011] Edge3 [00000000] Not used

Returns:
Number of free edges

Example:
This example gets visible elements information into IntArr and DoubleArr of
free edges

Set Synergy = CreateObject("synergy.Synergy")


Set DiagnosisManager = Synergy.DiagnosisManager()
Set Arr1 = Synergy.CreateIntegerArray()
Set Arr2 = Synergy.CreateDoubleArray()
sum = DiagnosisManager.GetEdgesDiagnosis2(FALSE, True, Arr1, Arr2)

long GetOverlapDiagnosis ( Boolean aOverall,


Boolean aProperIsect,
Object aEntList,
Object aValueList
)
To get a list of overlapping elements

Parameters:
aOverall whether to include fully overlap elements
aProperIsect whether to include intersect elements
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of intersect/overlap value

0 - Overlap
1 - Intersect

Returns:
Number of overlapping/intersect elements

Example:
This example gets elements information of overlapping and intersect
elements

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOverlapDiagnosis(TRUE, TRUE, IntArr, DblArr)

Member Function Documentation 37


MPI Application Programming Interface

long GetOverlapDiagnosis2 ( Boolean aOverall,


Boolean aProperIsect,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of overlapping element

Parameters:
aOverall whether to include fully overlap elements
aProperIsect whether to include intersect elements
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of intersect/overlap value 1 - Intersect,

Returns:
Number of problem elements.

Example:
This example gets elements information of overlapping and intersect
elements

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOverlapDiagnosis2(TRUE, TRUE,FALSE, IntArr, DblArr)

long GetOccurrenceDiagnosis ( Object aEntList,


Object aValueList
)
To get a list of element ID and occurrence number

Parameters:
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of occurrence number

Returns:
Number of elements found

Example:
This example gets elements occurrence information

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOccurrenceDiagnosis(IntArr, DblArr)

Member Function Documentation 38


MPI Application Programming Interface

long GetOccurrenceDiagnosis2 ( Boolean aVisibleOnly,


Object aEntList,
Object aValueList
)
To get a list of element ID and occurrence number

Parameters:
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValue an DoubleArray of occurrence number

Returns:
Number of elements found

Example:
This example gets visible elements occurrence information

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOccurrenceDiagnosis2(True,IntArr, DblArr)

long GetMatchInfoDiagnosis ( Object aEntList,


Object aValueList
)
To get a list of element ID match information

Parameters:
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of the value

Returns:
Number of elements found

Example:
This example gets elements match information

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetMatchInfoDiagnosis(IntArr, DblArr)

long GetOrientationDiagnosis ( Object aEntList,


Object aValueList
)
To get a list of un-oriented elements ID

Parameters:
aEntList an IntegerArray of element IDs

Member Function Documentation 39


MPI Application Programming Interface

aValueList a DoubleArray containing all 1.0

Returns:
Number of un-oriented elements Note: It could be the number of oriented
elements.

Example:
This example gets un-oriented elements information

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOrientationDiagnosis(IntArr, DblArr)

long GetOrientationDiagnosis2 ( Boolean aVisibleOnly,


Object aEntList,
Object aValueList
)
To get a list of unOriented element ID

Parameters:
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValueList a DoubleArray of the value

Returns:
Total unoriented element number Note: It could be the number of oriented
elements.

Example:
This example gets visible un-oriented elements information

Set DiagnosisManager = Synergy.DiagnosisManager()


Set EntList = DiagnosisManager.CreateEntityList()
Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetOrientationDiagnosis2(True, IntArr, DblArr)

ShowZeroAreaElements ( double aMin,


Boolean aAssignLayer,
Boolean aShowTxt
)
Generates zero area elements diagnostic

Parameters:
aMin edge length used to calculate equivalent area
ZeroArea = Sqrt(3)/4 * aMin * aMin
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show

Member Function Documentation 40


MPI Application Programming Interface
graphical results

Example:
This example generates text diagnostics for zero area elements.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowZeroAreaElements 1, False, True

ShowZeroAreaElements2 ( double aMin,


Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generates zero area elements diagnostic

Parameters:
aMin edge length used to calculate equivalent area
ZeroArea = Sqrt(3)/4 * aMin * aMin
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show
graphical results
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example generates text diagnostics for zero area elements.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowZeroAreaElements2 1, False, True, True

long GetZeroAreaElementsDiagnosis ( double aMin,


Object aEntList,
Object aValueList
)
To get a list of zero area elements

Parameters:
aMin edge length used to calculate equivalent area
ZeroArea = Sqrt(3)/4 * aMin * aMin
aEntList an IntegerArray of element IDs
aValueList a DoubleArray containing all 1 to indicate it is zero area element

Returns:
Number of zero area elements found

Example:
This example gets elements information of elements with area less than a
normal triangle

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()

Member Function Documentation 41


MPI Application Programming Interface
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetZeroAreaElementsDiagnosis(1,IntArr, DblArr)

long GetZeroAreaElementsDiagnosis2 ( double aMin,


Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of zero area elements

Parameters:
aMin edge length used to calculate equivalent area
ZeroArea = Sqrt(3)/4 * aMin * aMin
aEntList an IntegerArray of element IDs
aValueList a DoubleArray containing all 1 to indicate it is zero area element
aVisibleOnly Include only visible elements in the diagnosis

Returns:
Number of zero area elements found

Example:
This example gets elements information of elements with area less than a
normal triangle

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetZeroAreaElementsDiagnosis2(1,True, IntArr, DblArr)

Object GetMeshSummary ( Boolean aElementOnly )


To return a MeshSummary object

Parameters:
aElementOnly True - to get element counts summary only, which includes TrianglesC
NodesCount BeamsCount, MeshVolume and RunnerVolume
False - to get all mesh summary

Returns:
MeshSummary object

Example:
This example displays partial mesh summary information on screen.
Set Synergy = CreateObject("synergy.Synergy")
Set DiagnosisManager = Synergy.DiagnosisManager()
Set Summary = DiagnosisManager.GetMeshSummary(false)
StrMsg = "Surface Triangles: " + CStr(summary.TrianglesCount) + vbNewLine
StrMsg = StrMsg + "Node : " + CStr( summary.NodesCount ) + vbNewLine
StrMsg = StrMsg + "Beams : " + CStr( summary.BeamsCount ) + vbNewLine
StrMsg = StrMsg + "Mesh Volume " + CStr( summary.MeshVolume ) + vbNewLine
StrMsg = StrMsg + "RunnerVolume " + cstr( summary.runnerVolume ) + vbNewLine
StrMsg = StrMsg + "Min Aspect Ratio: " + CStr(Summary.MinAspectRatio) + vbNewLine
StrMsg = StrMsg + "Max Aspect Ratio: " + CStr(Summary.MaxAspectRatio) + vbNewLine
StrMsg = StrMsg + "AVE Aspect Ratio: " + CStr(Summary.AveAspectRatio) + vbNewLine + vb

Member Function Documentation 42


MPI Application Programming Interface
StrMsg = StrMsg + "Free Edges : " + CStr(Summary.FreeEdgesCount) + vbNewLine
StrMsg = StrMsg + "Manifold Edges: " + CStr(Summary.ManifoldEdgesCount) + vbNewLine
StrMsg = StrMsg + "Nonmanifold Edges: " + CStr(Summary.NonManifoldEdgesCount) + vbNewLi
StrMsg = StrMsg + "Match Ratio: " + CStr( Summary.MatchRatio) + vbNewLine
MsgBox StrMsg

long GetSurfWithBadTrimCurv ( Boolean aOuterLoop,


Boolean aInnerLoop,
Boolean aSurfDef,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID and surfaces with bad trimming curves

Parameters:
aOutLoop if set will test surface outer loops for errors
aInnerLoop if set will test surface inner loops for errors
aSurfDef if set will test underlying surface definition for errors
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValue a DoubleArray of diagnostic index value ratio of the
corresponding element

Returns:
number of surfs found

Example:
This example gets a list of entity ID and surfaces with bad trimming curves

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetSurfWithBadTrimCurv(True,True, False, False, IntArr, DblArr)

ShowSurfWithBadTrimCurv ( Boolean aOuterLoop,


Boolean aInnerLoop,
Boolean aSurfDef,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generate trimming curve diagnosis

Parameters:
aOutLoop if set will test surface outer loops for errors
aInnerLoop if set will test surface inner loops for errors
SurfDef if set will test underlying surface definition for errors
aAssignLayer specify True to push the elements within the diagnosis range into a
diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show graphical resu

Member Function Documentation 43


MPI Application Programming Interface

aVisibleOnly Include only visible elements in the diagnosis @Par Example: This exam
generates trimming curve diagnosis
Set DiagnosisManager = Synergy.DiagnosisManager()
DiagnosisManager.ShowSurfWithBadTrimCurv True, True, False, True, False,

long GetSurfWithFreeTrimCurv ( Boolean aFree,


Boolean aNM,
Boolean aVisibleOnly,
Object aEntList,
Object aValueList
)
To get a list of entity ID and surfaces with free trimming curves

Parameters:
aFree if set will test surface for a free edge
aInnerLoop if set will test surface a non manifold edge
aVisibleOnly Include only visible elements in the diagnosis
aEntList an IntegerArray of element IDs
aValue a DoubleArray of diagnostic index value ratio of the
corresponding element

Returns:
number of surfs found

Example:
This example gets a list of entity ID and surfaces with free trimming curves

Set DiagnosisManager = Synergy.DiagnosisManager()


Set IntArr = Synergy.CreateIntegerArray()
Set DblArr = Synergy.CreateDoubleArray()
num = DiagnosisManager.GetSurfWithFreeTrimCurv(True,True, False, IntArr, DblArr)

ShowSurfWithFreeTrimCurv ( Boolean aFree,


Boolean aNM,
Boolean aAssignLayer,
Boolean aShowTxt,
Boolean aVisibleOnly
)
Generate free trimming curves diagnosis

Parameters:
aFree if set will test surface for a free edge
aInnerLoop if set will test surface a non manifold edge
aAssignLayer specify True to push the elements within the diagnosis range into a
diagnostics layer; False otherwise
aShowTxt specify True to generate text diagnostics; False to show graphical
results
aVisibleOnly Include only visible elements in the diagnosis @Par Example: This
example generates trimming curve diagnosis
Set DiagnosisManager = Synergy.DiagnosisManager()
DiagnosisManager.ShowSurfWithFreeTrimCurv True, True, True, False, False

Member Function Documentation 44


MPI Application Programming Interface

ShowLDRatio ( double aMin,


double aMax,
Boolean aAssignLayer,
Boolean aVisibleOnly
)
Generates L/D ratio diagnostics

Parameters:
aMin lower bound for L/D ratio
aMax upper bound for L/D ratio
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows beams with L/D between 1 and 20 and put these elements
into a diagnostics layer.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowLDRatio 1, 20, True, False

ShowCentroidCloseness ( Boolean aAssignLayer,


Boolean aVisibleOnly
)
Generates centroid closeness diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows centroid closeness diagnostics.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowCentroidCloseness False, False

ShowBeamElementCount ( long aMin,


long aMax,
Boolean aAssignLayer,
Boolean aVisibleOnly
)
Generates beam segment diagnostics

Parameters:
aMin lower bound
aMax upper bound
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Member Function Documentation 45


MPI Application Programming Interface
Example:
This example shows beam segment diagnostics.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowBeamElementCount 1, 100, False, False

ShowCoolingCircuitValidity ( Boolean aAssignLayer,


Boolean aVisibleOnly
)
Generates cooling circuit diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows cooling circuit diagnostics.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowCoolingCircuitValidity False, False

ShowBubblerBaffleCheck ( Boolean aAssignLayer,


Boolean aVisibleOnly
)
Generates bubbler/baffle diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows bubbler/baffle diagnostics.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowBubblerBaffleCheck False, False

ShowTrappedBeam ( Boolean aAssignLayer,


Boolean aVisibleOnly
)
Generates trapped beam diagnostics

Parameters:
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows trapped beam diagnostics.

Member Function Documentation 46


MPI Application Programming Interface
Set DiagnosisManager = Synergy.DiagnosisManager()
DiagnosisManager.ShowTrappedBeam False, False

UpdateThicknessDisplay ( double aMin,


double aMax
)
Updates displayed thickness diagnostics

Parameters:
aMin lower bound for plotted thickness
aMax upper bound for plotted thickness

Example:
This example changes the display to show element thickness between 1 and
2\4.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.UpdateThicknessDisplay 1, 4

ShowDimensions ( double aMin,


double aMax,
Boolean aAssignLayer,
Boolean aVisibleOnly
)
Generates 3D dimensional diagnostics

Parameters:
aMin lower bound for plotted dimension
aMax upper bound for plotted dimension
aAssignLayer specify True to push the elements within the diagnosis range
into a diagnostics layer; False otherwise
aVisibleOnly Include only visible elements in the diagnosis

Example:
This example shows element dimension between 1 and 2 and pushed these
elements into a diagnostics layer.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.ShowDimensions 1, 2, True, False

UpdateDimensionalDisplay ( double aMin,


double aMax
)
Updates displayed dimension diagnostics

Parameters:
aMin lower bound for plotted dimension
aMax upper bound for plotted dimension

Example:

Member Function Documentation 47


MPI Application Programming Interface

This example changes the display to show element dimension between 1 and
2\4.

Set DiagnosisManager = Synergy.DiagnosisManager()


DiagnosisManager.UpdateDimensionalDisplay 1, 4

Member Function Documentation 48


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

DoubleArray Class Reference


Utility class for an array of double values. More...

List of all members.

Public Methods
double Val (long aIndex)
AddDouble (double aVal)
VARIANT ToVBSArray ()
long FromVBSArray (const VARIANT FAR &aArray)

Public Attributes
long Size
Number of values in the array (read-only).

Detailed Description
This class is used when an array of doubles needs to be passed into or returned by an
API function, e.g., when writing and reading property field values.

See also:
Synergy::CreateDoubleArray

Member Function Documentation

double Val ( long aIndex )


Returns value at a given index

Parameters:
aIndex index between 0 and
array.Size-1

Example:
See UserPlot::AddVectorData

AddDouble ( double aVal )


Adds a double value to the end of the array

DoubleArray Class Reference 49


MPI Application Programming Interface
Parameters:
aValue value to be added

Example:
This example creates an array with two values, 0.1 and
0.2.

Set MaxArray = Synergy.CreateDoubleArray()


MaxArray.AddDouble(0.1)
MaxArray.AddDouble(0.2)

VARIANT ToVBSArray ( )
Converts DoubleArray to VB Script array

Returns:
Variant of VB Script array

Example:
This example converts DoubleArray to VBScript array
DiagnosisManager.GetAspectRatioDiagnosis 1, 3, TRUE, IntArr, DoubleArr
VBArr = DoubleArr.ToVBSArray()

long FromVBSArray ( const VARIANT FAR & aArray )


Converts VB Script array to DoubleArray

Parameters:
aArray

Returns:
number of elements added

Example:
This example converts VBScript array to
DoubleArray
Set DoubleArr = Synergy.CreateDoubleArray()
Dim Arr1(10)
Arr1(0) = 1
Arr1(1) = 10
Arr1(2) = 100
Arr1(3) = 134.23
Arr1(4) = 324.432
DoubleArr.FromVBSArray( Arr1 )

Member Function Documentation 50


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

EntList Class Reference


This class is used to create and manipulate entity lists. More...

List of all members.

Public Methods
Object Entity (long aIndex)
SelectFromString (String aStr)
SelectFromPredicate (Object aPred)
String ConvertToString ()
SelectFromSavedList (String aListName)

Public Attributes
long Size
Number of entities in the list (read-only).

Detailed Description
You can use this class to create and manipulate entity lists. Entities include essentially
all useful geometric and mesh components of your model including nodes, curves,
regions, surfaces, elements, coordinate systems and boundary conditions. Most API
functions that operate on the model take entity lists as input or provide them as
output. This class can be used very effectively in conjunction with Predicate to select
entities by complex criteria

See also:
StudyDoc::CreateEntityList , Modeler::CreateEntityList ,
MeshEditor::CreateEntityList , BoundaryConditions::CreateEntityList ,
PropertyEditor::CreateEntityList

Member Function Documentation

Object Entity ( long aIndex )


Returns entity at a given index

Parameters:
aIndex index between 0 and list.Size-1

EntList Class Reference 51


MPI Application Programming Interface
Returns:
EntList containing the entity at the offset
aIndex

SelectFromString ( String aStr )


Converts a string to a list of entities

Parameters:
aStr string containing entity names

Note:
This function does not allow ranges to be specified using the syntax "N1:20",
e.g. Please use PredicateManager to create a label predicate that will allow
you to specify ranges. Entity prefixes are as follows:
• Nodes: N
• Beams: B
• Triangles: T
• Tetrahedral elements: TE
• Curves: C
• Surfaces: S
• Regions: R
• STL envelopes: STL
• Nodal boundary conditions: NBC
• Surface/element boundary conditions: SBC
• Local coordinate systems: LCS

Example:
This example sets the entity list to the nodes N18 and N23.

EntList.SelectFromString "N18 N23"

SelectFromPredicate ( Object aPredicate )


Converts a predicate into a list of entities

Parameters:
aPredicate Predicate object that defines the criterion for inclusion of an
entity

See also:
PredicateManager

Example:
The following example selects nodes with labels N23 to N100.

Set Predicate1 = PredicateManager.CreateLabelPredicate("N23:N100")


EntList.SelectFromPredicate Predicate1

String ConvertToString ( )
Convert a list of entities into a string

Member Function Documentation 52


MPI Application Programming Interface
Returns:
string representation of the entity list

Example:
The following example returns "N1 N2 N3".

Set Predicate1 = PredicateManager.CreateLabelPredicate("N1:3")


EntList.SelectFromPredicate Predicate1
Set Str = EntList.ConvertToString()

SelectFromSavedList ( String aListName )


Get entities from a saved entity list name

Parameters:
aListName name of a saved entity list

Example:
The following example selects a list of entities from
"MyTest"
Set EntList = StudyDoc.CreateEntityList()
EntList.SelectFromSavedList "MyTest"
MsgBox EntList.ConvertToString()

Member Function Documentation 53


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

ImportOptions Class Reference


This class is used to specify model import options. More...

List of all members.

Public Attributes
String MeshType
String Units
Boolean MDLMesh
Specifies whether MDL should generate a mesh when importing the model.

Boolean MDLSurfaces
Specifies whether MDL should translate surfaces when importing the model.

Boolean UseMDL
Specifies whether MDL should be used for model import.

String MDLKernel
Boolean MDLAutoEdgeSelect
Specifies whether default edge length should be used for meshing.

double MDLEdgeLength
Specifies edge length value for meshing.

long MDLTetraLayers
Specifies the minimum number of tetra layer through thickness in 3D meshing.

Boolean MDLChordAngleSelect
Specifies whether chord angle should be used for meshing.

double MDLChordAngle
Specifies chord angle value for meshing(in radian).

Boolean MDLSliverRemoval
Specifies whether sliver removal option should be used for meshing.

String MDLContactMeshType

Detailed Description
See also:
Synergy::ImportFile

ImportOptions Class Reference 54


MPI Application Programming Interface
Example
You can use this class to specify options that affect import of models into MPI.
These options include the mesh type, import units, MDL options, etc.

See also:
Synergy::ImportOptions

Member Data Documentation

String MeshType
Mesh type. Can be one of:
• Midplane
• Fusion
• 3D

String Units
Units of measurement for the model to be imported. Can be one of:
• mm: Millimeters
• cm: Centimeters
• m: Meters
• in: Inches

String MDLKernel
Specifies which MDL kernel should be used. Can be one of:
• Parametric
• Parasolid

String MDLContactMeshType
Specifies which MDL assembly contact mesh type should be used. Can be one of:
• Precise match
• Fault tolerant
• Ignore contact

Detailed Description 55
MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

IntegerArray Class Reference


Utility class for an array of integer values. More...

List of all members.

Public Methods
long Val (long aIndex)
AddInteger (long aInt)
VARIANT ToVBSArray ()
long FromVBSArray (const VARIANT FAR &aArray)

Public Attributes
long Size
Number of values in the array (read-only).

Detailed Description
This class is used when an array of integers needs to be passed into or returned by an
API function, e.g., when get mesh diagnostic object values.

See also:
Synergy::CreateIntegerArray

Member Function Documentation

long Val ( long aIndex )


Returns value at a given index

Parameters:
aIndex index between 0 and array.Size-1

Returns:
value at a given index @Par Example: This example
prints 30
Set IntArr = Synergy.CreateIntegerArray()
IntArr.AddInteger( 30 )
MsgBox IntArr.Val(0)

IntegerArray Class Reference 56


MPI Application Programming Interface

AddInteger ( long aInt )


Adds an integer value to the end of the array

Parameters:
aInt value to be added

Example:
This example adds 30 to a new
IntegerArray
Set IntArr = Synergy.CreateIntegerArray()
IntArr.AddInteger( 30 )

VARIANT ToVBSArray ( )
Converts IntegerArray to VB Script array

Returns:
Variant of VB Script array

Example:
This example converts IntegerArray to VBScript array
DiagnosisManager.GetAspectRatioDiagnosis 1, 3, TRUE, IntArr, DoubleArr
VBArr = IntArr.ToVBSArray()

long FromVBSArray ( const VARIANT FAR & aArray )


Converts VB Script array to IntegerArray

Parameters:
aArray

Returns:
number of elements added

Example:
This example converts VBScript array to
IntegerArray
Set IntArr = Synergy.CreateIntegerArray()
Dim Arr1(10)
Arr1(0) = 1
Arr1(1) = 10
Arr1(2) = 100
Arr1(3) = 134
Arr1(4) = 324
IntArr.FromVBSArray( Arr1 )

Member Function Documentation 57


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Job Class Reference


This class is used to create a job object and query job information. More...

List of all members.

Public Methods
Boolean IsCheckAnalysis ()
Object FindServer ()

Public Attributes
String AnalysisName
Analysis name.

String ClientAddress
Client address.

long ClientPort
Client port.

String CommandLine
Command line.

String FinishTime
Finish time.

long JobID
Job ID.

String JobType
Job type.

String ModelName
Model name.

String Priority
Priority.

String User
User.

String RestartFile
Restart file.

Job Class Reference 58


MPI Application Programming Interface
String ResultName
Result name.

String ScheduleTime
Schedule time.

String Status
Status.

String StartTime
Start time.

String WorkingFolder
Working folder.

Detailed Description
You can use this class to set job priority and retrieve all information about a job

Member Function Documentation

Boolean IsCheckAnalysis ( )
Get analysis type

Returns:
true if the job is for checking only

Example:
This example prints "True" if the Job is doing check, "False"
otherwise.
If Job.IsCheckAnalysis Then
MsgBox "True"
Else
MsgBox "False"
EndIf

Object FindServer ( )
Find the server holding this job

Returns:
Server object

Example:
This example find the server holding
this job
srv = Job.FindServer()

Public Attributes 59
MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

JobMgr Class Reference


This class is used to define a Job Manager object and manage jobs and servers. More...

List of all members.

Public Methods
Boolean AddServer (String aAddress, String aName, String aPriority, long aRunLimit)
Boolean StartBatchQueue (String aServer)
Boolean HaltBatchQueue (String aServer)
Object GetJob (long aJobIndex)
Object GetServer (long aSvrIndex)
Boolean AbortJob (Object aJob)
Boolean AbortJobByID (long aJobID)
Boolean AbortJobByIndex (long aJobIndex)
Boolean DeleteServer (Object aServer)
Boolean DeleteServerByName (String aName)
Boolean DeleteServerByAddress (String aAddress)
Object FindJobByID (long aJobID)
Boolean AbortMyJobsOnServer (Object aServer)
Boolean AbortMyJobsOnServerByName (String aName)
Boolean AbortMyJobsOnServerByAddress (String aAddress)

Public Attributes
String DefaultServer
Default server address.

long NumberOfJobs
Number of jobs.

long NumberOfServers
Number of servers.

Detailed Description
You can use this class to add, delete server and set default server, also to start batch
queue on a given server and abort an existing job etc.

See also:
Synergy::JobManager

JobMgr Class Reference 60


MPI Application Programming Interface

Member Function Documentation

Boolean AddServer ( String aAddress,


String aName,
String aPriority,
long aRunLimit
)
Adds a new Server

Parameters:
aAddress Server address
aName Server name
aPriority Priority
aRunLimit Run limit

Returns:
TRUE if successful

Example:
This example adds a new server
Set JobManager = Synergy.JobManager()
JobManager.AddServer "localhost", "localhost", "Low", 1

Boolean StartBatchQueue ( String aServer )


Starts all jobs in the batch queue

Parameters:
aServer Server

Returns:
TRUE if successful

Example:
This example starts batch queue on local
server
Set JobManager = Synergy.JobManager()
JobManager.StartBatchQueue "127.0.0.1"

Boolean HaltBatchQueue ( String aServer )


Stop all jobs in the batch queue

Parameters:
aServer

Returns:
TRUE if successful

Example:

Member Function Documentation 61


MPI Application Programming Interface
This example stops batch queue on local
server
Set JobManager = Synergy.JobManager()
JobManager.HaltBatchQueue "127.0.0.1"

Object GetJob ( long aJobIndex )


Gets job by index

Parameters:
aJobIndex Job index

Returns:
a Job object

Example:
Set JobManager = Synergy.JobManager()
Set job = JobManager.GetJob(1)

Object GetServer ( long aSvrIndex )


Gets Server by index

Parameters:
aSvrIndex Server index

Returns:
Server object

Example:
Set JobManager = Synergy.JobManager()
Set svr = JobManager.GetServer(1)

Boolean AbortJob ( Object aJob )


Aborts job

Parameters:
aJob Job object

Returns:
TRUE if successful

Example:
This example aborts first job.
Set JobManager = Synergy.JobManager()
Set job = JobManager.GetJob(1)
JobManager.AbortJob(job)

Boolean AbortJobByID ( long aJobID )


Aborts job with given job ID

Parameters:
aJobID Job ID

Member Function Documentation 62


MPI Application Programming Interface
Returns:
TRUE if successful

Example:
This example aborts job with
ID 1
Set JobManager = Synergy.JobManager()
JobManager.AbortJobByID (1)

Boolean AbortJobByIndex ( long aJobIndex )


Aborts job at given job index

Parameters:
aJobIndex Job index

Returns:
TRUE if successful

Example:
This example aborts job with
index 1
Set JobManager = Synergy.JobManager()
JobManager.AbortJobByIndex (1)

Boolean DeleteServer ( Object aServer )


Deletes server

Parameters:
aServer Server

Returns:
TRUE if successful

Example:
This example delete server with
index 1
Set JobManager = Synergy.JobManager()
Set svr = JobManager.GetServer(1)
jobMgr.DeleteServer(svr)

Boolean DeleteServerByName ( String aName )


Deletes server with given server name

Parameters:
aName Server name

Returns:
TRUE if successful

Example:

Member Function Documentation 63


MPI Application Programming Interface
This example deletes server
"localhost"
Set JobManager = Synergy.JobManager()
JobManager.DeleteServerByName "localhost"

Boolean DeleteServerByAddress ( String aAddress )


Deletes server at given server address

Parameters:
aAddress Server address

Returns:
TRUE if successful

Example:
This example deletes server with IP address
127.0.0.1
Set jobMgr = Synergy.JobManager()
jobMgr.DeleteServerByAddress "127.0.0.1"

Object FindJobByID ( long aJobID )


Finds job with given job ID

Parameters:
aJobID Job ID

Returns:
TRUE if successful

Example:
This example finds job with ID
100000
Set jobMgr = Synergy.JobManager()
Set Job = jobMgr.FindJobByID(100000)

Boolean AbortMyJobsOnServer ( Object aServer )


Aborts my jobs on the given server.

Parameters:
aServer Server

Returns:
TRUE if successful.

Example:
This example aborts my jobs on the server with
index 1.
Set JobManager = Synergy.JobManager()
Set svr = JobManager.GetServer(1)
jobMgr.AbortMyJobsOnServer(svr)

Member Function Documentation 64


MPI Application Programming Interface

Boolean AbortMyJobsOnServerByName ( String aName )


Aborts my jobs on the server with the given server name.

Parameters:
aName Server name

Returns:
TRUE if successful.

Example:
This example aborts all jobs on the server
"localhost".
Set JobManager = Synergy.JobManager()
JobManager.AbortMyJobsOnServerByName "localhost"

Boolean AbortMyJobsOnServerByAddress ( String aAddress )


Aborts my jobs on the server at the given server address.

Parameters:
aAddress Server address

Returns:
TRUE if successful.

Example:
This example aborts all jobs on the server with IP address
127.0.0.1.
Set JobManager = Synergy.JobManager()
JobManager.AbortMyJobsOnServerByAddress "127.0.0.1"

Member Function Documentation 65


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

LayerManager Class Reference


This class provides functionality to create and manipulate model layers. More...

List of all members.

Public Methods
Boolean CreateLayer ()
Boolean ActivateLayer (Object aEnt)
Object CreateEntityList ()
long AssignToLayer (Object aEnts, Object aLayer)
Boolean DeleteLayer (Object aLayer, Boolean aMove)
Boolean ToggleLayer (Object aLayer)
long ExpandLayer (Object aLayer, long aLevels, Boolean aExpandNewLayer)
Boolean SetLayerName (Object aLayer, String aName)
Boolean ShowAllLayers ()
long SetTypeColor (Object aLayer, String aType, Boolean aDefault, long aRed,
long aGreen, long aBlue)
Boolean SetTypeVisible (Object aLayer, String aType, Boolean aVisible)
Boolean SetTypeDisplayOption (Object aLayer, String aType, String aOption)
Object GetFirst ()
Object GetNext (Object aLayer)
String GetName (Object aLayer)
Boolean ShowLabels (Object aLayer, Boolean aShow)
Boolean SetTypeShowLabels (Object aLayer, String aType, Boolean aShow)
Object CreateLayerByName (String aName)
Object FindLayerByName (String aName)
Boolean HideAllOtherLayers (Object aLayer)
Boolean RemoveEmptyLayers ()

Detailed Description
You can use this class to create new layers, delete layers, activate a layer, expand a
layer, set layer display options, etc.

See also:
Synergy::LayerManager

Member Function Documentation

Boolean CreateLayer ( )

LayerManager Class Reference 66


MPI Application Programming Interface
Creates a new layer

Returns:
True if successful; False
otherwise

Example:
This example creates a new layer.

Set LayerManager = Synergy.LayerManager()


LayerManager.CreateLayer

Boolean ActivateLayer ( Object aEnt )


Activates a layer

Parameters:
aEnt EntList object that contains the layer to be
activated

Returns:
True if successful; False otherwise

Example:
This example activates the layer L2.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L2 "
LayerManager.ActivateLayer EntList

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
EntList object @Par Example:

See also:
LayerManager::CreateLayerByName

long AssignToLayer ( Object aEnts,


Object aLayer
)
Assigns entities to a layer

Parameters:
aEnts EntList that contains entities that are to be assigned to a layer
aLayer EntList that contains the layer to which the entities will be
assigned

Returns:
number of entities that have been assigned to the layer

Member Function Documentation 67


MPI Application Programming Interface
Example:
This example assigns node N1 and triangle T3 to layer L2.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromString "N1 T3 "
EntList.SelectFromString "L2 "
LayerManager.AssignToLayer EntList_1, EntList

Boolean DeleteLayer ( Object aLayer,


Boolean aMove
)
Deletes a layer

Parameters:
aLayer EntList object containing the layer to be deleted
aMove specify True to move entities in this layer to the active layer; False if
you want to delete these entities along with the layer

Returns:
True if successful; False otherwise

Example:
This example deletes layer L5 and all entities in it.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L5 "
LayerManager.DeleteLayer EntList, False

Boolean ToggleLayer ( Object aLayer )


Toggles layer visibility

Parameters:
aLayer EntList object containing the layer whose visibility is to be
toggled

Returns:
True if successful; False otherwise

Example:
This example toggles the visibility of layer L3.

LayerManager.DeleteLayer EntList, False


Set LayerManager = Synergy.LayerManager()
Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.ToggleLayer EntList

Member Function Documentation 68


MPI Application Programming Interface

long ExpandLayer ( Object aLayer,


long aLevels,
Boolean aExpandNewLayer
)
Expands a layer by a specified number of "levels"

Parameters:
aLayer EntList object containing the layer to be expanded
aLevels number of levels to expand
aExpandNewLayer whether to create a new layer for the expanded
entities

Returns:
number of entities affected

Example:
This example expands layer L3 by 3 levels.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.ExpandLayer EntList, 3, False

Boolean SetLayerName ( Object aLayer,


String aName
)
Renames a layer

Parameters:
aLayer EntList object containing the layer to be
renamed
aName new name

Returns:
True if successful; False otherwise

Example:
This example renames layer L3 to "New Nodes".

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetLayerName EntList, "New Nodes"

Boolean ShowAllLayers ( )
Shows all layers

Returns:
True if successful; False
otherwise

Member Function Documentation 69


MPI Application Programming Interface

Example:
This example shows all layers
Set LayerManager = Synergy.LayerManager()
LayerManager.ShowAllLayers

long SetTypeColor ( Object aLayer,


String aType,
Boolean aDefault,
long aRed,
long aGreen,
long aBlue
)
Sets color of a given entity type in a layer

Parameters:
aLayer EntList object containing a layer
aType string that specifies the entity type
• N: Node
• B: Beam ( 1D element )
• T: Triangle
• C: Curve
• S: Surface
• R: Region
• NBC: NDBC
• SBC: SUBC
• LCS: LCS
• TE: TET4
• STL: STL
aDefault specify True to use the default color; False
otherwise
aRed red component of color; can be between 0 and
255
aGreen green component of color; can be between 0 and
255
aBlue blue component of color; can be between 0 and
255

Returns:
integer identifier for the color

See also:
SetTypeDisplayOption , SetTypeVisible

Example:
This example sets nodes on layer L3 to red.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetTypeColor EntList, "N", False, 255, 0, 0

Member Function Documentation 70


MPI Application Programming Interface

Boolean SetTypeVisible ( Object aLayer,


String aType,
Boolean aVisible
)
Sets visibility for a given entity type in a layer

Parameters:
aLayer EntList object containing a layer
aType string that specifies the entity type
• N: Node
• B: Beam ( 1D element )
• T: Triangle
• C: Curve
• S: Surface
• R: Region
• NBC: NDBC
• SBC: SUBC
• LCS: LCS
• TE: TET4
• STL: STL
aVisible specify True to make the layer visible; False
otherwise

Returns:
True if successful; False otherwise

See also:
SetTypeDisplayOption , SetTypeColor

Example:
This example turns off visibility of triangles in the layer L3.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetTypeVisible EntList, "T", False

Boolean SetTypeDisplayOption ( Object aLayer,


String aType,
String aOption
)
Sets display options for an entity type in a layer

Parameters:
aLayer EntList object containing a layer
aType string that specifies the entity type
• N: Node
• B: Beam ( 1D element )
• T: Triangle
• C: Curve

Member Function Documentation 71


MPI Application Programming Interface
• S: Surface
• R: Region
• NBC: NDBC
• SBC: SUBC
• LCS: LCS
• TE: TET4
• STL: STL
aOption display option. Valid display options for entities are shown in the table below
Display Beam Tert ST
Triangle Node Surface Region
optionOption elements elements Fa
Solid X X X - X X X
Solid+Element
X X X - - - -
Edges
Transparent X X X - X X X
Transparent +
Element X X X - - - -
Edges
Shrunken X X X - - - -
Axis Line Only - X - - - - -
Point - - - X - - -
Triad - - - X - - -
Net - - - - X X X
Solid + Net - - - - X X X
Transparent +
- - - - X X X
Net

Returns:
True if successful; False otherwise

See also:
SetTypeVisible , SetTypeColor

Example:
This example specifies that triangles in layer L3 should be displayed as "Solid".

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetTypeDisplayOption EntList, "T", "Solid"

Object GetFirst ( )
Gets the first layer in the model

Returns:

Member Function Documentation 72


MPI Application Programming Interface
EntList object containing the first
layer

Example:
Set LayerManager = Synergy.LayerManager()
Set L1 = LayerManager.GetFirst()

Object GetNext ( Object aLayer )


Gets the next layer in the model

Parameters:
aLayer EntList object containing a
layer

Returns:
EntList object containing the next
layer

Example:
This example shows all layer name
Set LayerManager = Synergy.LayerManager()
Set L1 = LayerManager.GetFirst()
While Not L1 Is Nothing
MsgBox LayerManager.GetName( L1 )
Set L1 = LayerManager.GetNext(L1)
Wend

String GetName ( Object aLayer )


Gets the name of a layer

Parameters:
aLayer EntList object containing a layer

Returns:
name of the layer

Example:
This example gets the name of the first
layer.

Set LayerManager = Synergy.LayerManager()


Set L1 = LayerManager.GetFirst()
LName = LayerManager.GetName( L1 )

Boolean ShowLabels ( Object aLayer,


Boolean aShow
)
Shows/hides entity labels in layer

Parameters:
aLayer layer entity
aShow whether to show or hide

Member Function Documentation 73


MPI Application Programming Interface
Returns:
True if successful; False otherwise

Example:
This example show labels of the layer
L2.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L2 "
LayerManager.ShowLabels EntList, True

Boolean SetTypeShowLabels ( Object aLayer,


String aType,
Boolean aShow
)
Sets label on/off for a given entity type in a layer

Parameters:
aLayer EntList object containing a layer
aType string that specifies the entity type
• N: Node
• B: Beam ( 1D element )
• T: Triangle
• C: Curve
• S: Surface
• R: Region
• NBC: NDBC
• SBC: SUBC
• LCS: LCS
• TE: TET4
• STL: STL
aShow specify True to make the layer visible; False
otherwise

Returns:
True if successful; False otherwise

See also:
SetTypeDisplayOption , SetTypeColor

Example:
This example turns off label of triangles in the layer L3.

Set LayerManager = Synergy.LayerManager()


Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetTypeShowLabels EntList, "T", False

Object CreateLayerByName ( String aName )


Creates a new layer by name

Member Function Documentation 74


MPI Application Programming Interface
Parameters:
aName layer name

Returns:
EntList object containing the new layer

Example:
This example creates a new layer and assign N1 to this new
layer.

Set Synergy = CreateObject("synergy.Synergy")


Set LayerManager = Synergy.LayerManager()
Set NewLayer = LayerManager.CreateLayerByName( "My New Layer 2")
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromString "N1 "
LayerManager.AssignToLayer EntList_1, NewLayer

Object FindLayerByName ( String aName )


Find a layer by given name

Parameters:
aName layer name

Returns:
EntList object containing the layer

Example:
This example assigns T1 to layer "My New Layer 3".

Set ALayer = LayerManager.FindLayerByName( "My New Layer 3")


EntList_1.SelectFromString "T1"
LayerManager.AssignToLayer EntList_1, ALayer

Boolean HideAllOtherLayers ( Object aLayer )


Hide all the layers other than the given one

Returns:
True if successful; False otherwise

Example:
This example hides all layers but "L3"
Set LayerManager = Synergy.LayerManager()
Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.HideAllOtherLayers EntList

Boolean RemoveEmptyLayers ( )
Delete empty layers

Returns:
True if successful; False
otherwise

Member Function Documentation 75


MPI Application Programming Interface
Example:
This example deletes all empty
layers.
Set LayerManager = Synergy.LayerManager()
LayerManager.RemoveEmptyLayers()

Member Function Documentation 76


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MaterialSelector Class Reference


This class is used to select molding materials into the study. More...

List of all members.

Public Methods
Boolean Select (String aFile, String aFileType, long aIndex, long aMat)

Detailed Description
You can use this class to select molding materials from system or user databases

See also:
Synergy::MaterialSelector

Member Function Documentation

Boolean Select ( String aFile,


String aFileType,
long aIndex,
long aMat
)
Selects a material from a database file

Parameters:
aFile material database file name
aFileType file type, which can be one of the following:
• "System": for databases that reside in the "system" database
directory,
• "User": for databases that reside in the "user" directory, and
• "": for databases that reside in neither of the above locations; the
last option should be used with caution since scripts written with
"absolute" file path names are typically not usable across different
versions of the software
aIndex material index in the database that uniquely identifies this
material; the easiest way to ascertain the material index is to
record a macro that selects the material from the database
aMat specify 0 to select the material as the first molding material and 1
to select it as the second molding material

MaterialSelector Class Reference 77


MPI Application Programming Interface

Returns:
True if successful; False otherwise

Example:

Set Synergy = CreateObject("synergy.Synergy")


Set MatSel = Synergy.MaterialSelector()
MatSel.Select "Basell Polyolefins.21000.udb","System", 20024, 0

Member Function Documentation 78


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MeshEditor Class Reference


This class provides meshing utilities. More...

List of all members.

Public Methods
long AutoFix ()
long GlobalMerge (double aToler, Boolean aFusion)
long PurgeNodes ()
long MergeNodes (Object aTarget, Object aNodes, Boolean aFusion)
Object CreateEntityList ()
Boolean SwapEdge (Object aTri1, Object aTri2, Boolean aFeatAllow)
Boolean StitchFreeEdges2 (Object aNodes, double aToler)
Object InsertNode (Object aNode1, Object aNode2)
Object InsertNodeInTri (Object aNode1, Object aNode2, Object aNode3)
Object InsertNodeInTetByNodes (Object aNode1, Object aNode2, Object aNode3,
Object aNode4)
Object InsertNodeInTet (Object aTet)
Boolean MoveNodes (Object aNodes, Object aCoord, Boolean aAbs)
Boolean AlignNodes (Object aNode1, Object aNode2, Object aToAlign)
Boolean SmoothNodes (Object aNodes, Boolean aFeat)
Boolean Orient (Boolean aFusion)
Boolean FlipNormals (Object aEnts)
long AlignNormals (Object aSeed, Object aEnts)
Boolean FillHole (Object aNodes)
Object CreateTet (Object aNode1, Object aNode2, Object aNode3, Object aNode4,
Object aPropSet)
Boolean RefineTetras (long aTetRefLayerID, long aNumLayers, Boolean
aRefineSurface, double aSurfaceEdgeLength)
Object CreateWedge (Object aNode1, Object aNode2, Object aNode3, Object
aNode4, Object aNode5, Object aNode6, Object aPropSet)
Boolean ConvertWedgesToTetras (Object aEnts, long aNumLayers)
Object CreateTri (Object aNode1, Object aNode2, Object aNode3, Object aPropSet)
Object CreateBeams (Object aNode1, Object aNode2, long aNum, Object aPropSet)
Object Delete (Object aEnts)
Boolean RemeshArea (Object aEnts, double aSize)
long MatchNodes (Object aNodes, Object aTris, String aLayer)
long MakeRegion (double aTol, Boolean aIsAngular)
long MakeRegion2 (double aTol, Boolean aIsAngular, Boolean aMesh, Object
aPropSet)
Boolean MoveBeamNode (Object aMovingNode, Object aTargetCoord)
Boolean MoveNodeToEdge (Object aNode, Object aEdgeNode1, Object aEdgeNode2,
double aParamLoc)
Boolean RemeshArea2 (Object aEnts, double aSize, double aSmooth)

MeshEditor Class Reference 79


MPI Application Programming Interface
Object CreateBeamsByPoints (Object aPt1, Object aPt2, long aNum, Object
aPropSet)
Boolean ProjectMesh (Object aEnts)
long ConvertToBeams (Object aStartNodes, Object aPropSet, Boolean aJunction,
long aNum)

Detailed Description
You can use this class to repair mesh defects, refine and modify meshes, delete
entities, smooth nodes, etc.

See also:
Synergy::MeshEditor

Member Function Documentation

long AutoFix ( )
Attempts to repair the mesh by automatically removing overlaps and intersections

Returns:
Number of overlaps/intersections that were removed

Example:
This example repairs the current mesh.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.AutoFix

long GlobalMerge ( double aToler,


Boolean aFusion
)
Merges nodes in the model that are within a specified tolerance

Parameters:
aToler merge tolerance
aFusion specify True to disallow merges between nodes that are not on the
same element

Returns:
number of nodes merged

Example:
This example merges nodes with a tolerance of 0.1mm.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.GlobalMerge 0.1, True

Public Methods 80
MPI Application Programming Interface

long PurgeNodes ( )
Deletes nodes in the model that are not connected to any elements

Returns:
number of nodes removed

Example:
This example deletes all disconnected nodes in the model.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.PurgeNodes

long MergeNodes ( Object aTarget,


Object aNodes,
Boolean aFusion
)
Merges one or more nodes to a target node

Parameters:
aTarget EntList object containing the target node
aNodes EntList object containing the set of nodes to be merged to the target
node
aFusion specify True to disallow merges between nodes that are not on the
same element

Returns:
number of nodes merged

Example:
This example merges node N20 with N10.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N10 "
EntList_1.SelectFromString "N20 "
MeshEditor.MergeNodes EntList, EntList_1, True

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
EntList object

Note:
When using this function, it will first ask for result invalidation. If you want to
select entities without checking result, use StudyDoc.CreateEntityList.

Member Function Documentation 81


MPI Application Programming Interface

Boolean SwapEdge ( Object aTri1,


Object aTri2,
Boolean aFeatAllow
)
Swaps the common edge between two triangles

Parameters:
aTri1 EntList object containing the first triangle
aTri2 EntList object containing the second triangle
aFeatAllow specify True to permit modifications of feature
edges

Returns:
True if operation is successful; False otherwise

Example:
This example swaps the edge between triangles T22 and T23.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
EntList.SelectFromString "T22"
EntList_1.SelectFromString "T23 "
MeshEditor.SwapEdge EntList, EntList_1, False

Boolean StitchFreeEdges2 ( Object aNodes,


double aToler
)
Stitches free edges within a given tolerance by providing a set of nodes

Parameters:
aNodes EntList object containing the nodes
aTolerance Tolerance

Returns:
True if successful

Example:
This example stitches free edges defined by a set of given nodes .

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 N11 N12 N13 N14 N15 N16
MeshEditor.StitchFreeEdges2 EntList, 0.1

Object InsertNode ( Object aNode1,


Object aNode2
)
Inserts a node between two nodes, modifying and creating new triangles as
necessary

Member Function Documentation 82


MPI Application Programming Interface
Parameters:
aNode1 EntList object containing the first node
aNode2 EntList object containing the second node

Returns:
EntList object containing the new node that is created

Example:
This example inserts a node between nodes N1 and N10.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1"
EntList_1.SelectFromString "N10 "
Set EntList_2 = MeshEditor.InsertNode(EntList, EntList_1)

Object InsertNodeInTri ( Object aNode1,


Object aNode2,
Object aNode3
)
Inserts a node in the centroid of a given triangle

Parameters:
aNode1 EntList object containing the first node of triangle
aNode2 EntList object containing the second node of triangle
aNode3 EntList object containing the third node of triangle

Returns:
EntList object containing the new node that is created

Example:
This example inserts a node in triangle.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
Set EntList_2 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N382 "
EntList_1.SelectFromString "N403 "
EntList_2.SelectFromString "N404 "
Set EntList_3 = MeshEditor.InsertNodeInTri(EntList, EntList_1, EntList_2)

Object InsertNodeInTetByNodes ( Object aNode1,


Object aNode2,
Object aNode3,
Object aNode4
)
Inserts a node in the centroid of a given tetra

Parameters:
aNode1 EntList object containing the first node of tetra

Member Function Documentation 83


MPI Application Programming Interface

aNode2 EntList object containing the second node of tetra


aNode3 EntList object containing the third node of tetra
aNode4 EntList object containing the third node of tetra

Returns:
EntList object containing the new node that is created

Example:
This example inserts a node in tetra.

Set MeshEditor = Synergy.MeshEditor()


EntList.SelectFromString "N382 "
EntList_1.SelectFromString "N403 "
EntList_2.SelectFromString "N404 "
EntList_3.SelectFromString "N55"
Set EntList_4 = MeshEditor.InsertNodeInTetByNodes(EntList, EntList_1, EntList_2, EntList

Object InsertNodeInTet ( Object aTet )


Inserts a node in the centroid of a given tetra

Parameters:
aTet EntList object containing the tetra

Returns:
EntList object containing the new node that is
created

Example:
This example inserts a node in tetra.

Set MeshEditor = Synergy.MeshEditor()


EntList.SelectFromString "TE343 "
Set EntList_4 = MeshEditor.InsertNodeInTetByNodes(EntList)

Boolean MoveNodes ( Object aNodes,


Object aCoord,
Boolean aAbs
)
Moves nodes to a new location or by an offset

Parameters:
aNode EntList object containing the nodes to be moved
aCoord Vector object that specifies the destination location or an offset
vector
aAbs specify True to specify a location and False to to specify an offset
vector

Returns:
True if operation is successful; False otherwise

Example:

Member Function Documentation 84


MPI Application Programming Interface
This example move node N1 to the given location.

Set Vector = Synergy.CreateVector()


Set MeshEditor = Synergy.MeshEditor()
Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1 "
Vector.SetXYZ -0.00024, 0.01711, 0.00844
MeshEditor.MoveNodes EntList, Vector, True

Boolean AlignNodes ( Object aNode1,


Object aNode2,
Object aToAlign
)
Aligns a set of nodes so that they are collinear with a given pair of nodes

Parameters:
aNode1 EntList object containing the first node
aNode2 EntList object containing the second node
aToAlign EntList object containing nodes that are to be aligned between
aNode1 and aNode2

Returns:
True if operation is successful; False otherwise

Example:
This example lines up node N10 between nodes N1 and N2.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
Set EntList_2 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1"
EntList_1.SelectFromString "N2 "
EntList_2.SelectFromString "N10"
MeshEditor.AlignNodes EntList, EntList_1, EntList_2

Boolean SmoothNodes ( Object aNodes,


Boolean aFeat
)
Performs Laplacian smoothing on a set of nodes

Parameters:
aNodes EntList object containing nodes to be smoothed
aFeat specify True to preserve feature edges during
smoothing

Returns:
True if operation is successful; False otherwise

Example:
This example smooths nodes N1 to N100.

Set MeshEditor = Synergy.MeshEditor()

Member Function Documentation 85


MPI Application Programming Interface
Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1:100"
MeshEditor.SmoothNodes EntList, False

Boolean Orient ( Boolean aFusion )


Orients the mesh

Parameters:
aFusion specify True if the mesh if for a fusion
model

Returns:
True if operation is successful; False otherwise

Example:
This example orients the current fusion mesh.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.Orient True

Boolean FlipNormals ( Object aEnts )


Flips triangle normals

Parameters:
aEnts EntList object containing the triangles whose normals are to be
flipped

Returns:
True if operation is successful; False otherwise

Example:
This example flips all triangle normals.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "T1:"
MeshEditor.FlipNormals EntList

long AlignNormals ( Object aSeed,


Object aEnts
)
Aligns normals for a set of triangles with that of a given "seed" triangle

Parameters:
aSeed EntList object containing the "seed" triangle
aEnts EntList object containing the triangles that are to be
oriented

Returns:
number of triangles flipped

Member Function Documentation 86


MPI Application Programming Interface

Example:
This example aligns normals of triangles T2 T3 and T4 with T1.

Set Synergy = CreateObject("synergy.Synergy")


Set MeshEditor = Synergy.MeshEditor()
Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
EntList_1.SelectFromString "T1 "
EntList.SelectFromString "T2 T3 T4 "
MeshEditor.AlignNormals EntList_1, EntList

Boolean FillHole ( Object aNodes )


Fill a "hole" in the mesh by creating triangles between given nodes

Parameters:
aNodes EntList object containing an ordered sequence of nodes defining the
outer boundary of the hole

Returns:
True if operation is successful; False otherwise

Example:
This example fills a hole defined by the nodes N2515, N2522, N1662 and N2510.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "N2515 N2522 N1662 N2510 "
MeshEditor.FillHole EntList

Object CreateTet ( Object aNode1,


Object aNode2,
Object aNode3,
Object aNode4,
Object aPropSet
)
Create tetra with given nodes

Parameters:
aNode1 First node
aNode2 Second node
aNode3 Third node
aNode4 Fourth node
aPropSet Property set

Returns:
Tetra created

Example:
This example creates a tetra with given nodes
EntList.SelectFromString "N112 "
EntList_1.SelectFromString "N397 "
EntList_2.SelectFromString "N68 "

Member Function Documentation 87


MPI Application Programming Interface
EntList_3.SelectFromString "N439 "
Set EntList_4 = MeshEditor.CreateTet(EntList, EntList_1, EntList_2, EntList_3, Nothing)

Boolean RefineTetras ( long aTetRefLayerID,


long aNumLayers,
Boolean aRefineSurface,
double aSurfaceEdgeLength
)
Refine selected tetras

Parameters:
aTetRefLayerID Layer ID of tetras
aNumLayers Number of layers
aRefineSurface whether to refine
surface mesh
aSurfaceEdgeLength Surface mesh edge
length

Returns:
True if operation is successful; False
otherwise

Example:
This example refines tetras layer
Set MeshEditor = Synergy.MeshEditor()
Set EntList = MeshEditor.CreateEntityList()
MeshEditor.RefineTetras 5, 6, True, 0.002195

Object CreateWedge ( Object aNode1,


Object aNode2,
Object aNode3,
Object aNode4,
Object aNode5,
Object aNode6,
Object aPropSet
)
Create a wedge with given nodes

Parameters:
aNode1...aNode6 Six given nodes
aPropSet Property set

Returns:
Wedge created

Example:
This example creates a wedge with given nodes
EntList.SelectFromString "N112 "
EntList_1.SelectFromString "N397 "
EntList_2.SelectFromString "N68 "
EntList_3.SelectFromString "N439 "
EntList_4.SelectFromString "N432 "

Member Function Documentation 88


MPI Application Programming Interface
EntList_5.SelectFromString "N445 "
Set EntList_6 = MeshEditor.CreateTet(EntList, EntList_1, EntList_2, EntList_3, EntList_4

Boolean ConvertWedgesToTetras ( Object aEnts,


long aNumLayers
)
Convert selected wedges to tetras

Parameters:
List of wedges
aNumLayers Number of layers

Returns:
True if operation is successful; False
otherwise

Example:
This example refines tetras layer
Set MeshEditor = Synergy.MeshEditor()
Set EntList = MeshEditor.CreateEntityList()
MeshEditor.ConvertWedgesToTetras 5, 6

Object CreateTri ( Object aNode1,


Object aNode2,
Object aNode3,
Object aPropSet
)
Creates a triangle from three nodes

Parameters:
aNode1 EntList object containing the first node
aNode2 EntList object containing the second node
aNode3 EntList object containing the third node
aPropSet Property object that will be assigned to the triangle

Returns:
EntList object containing the triangle that is created

Note:
If aPropSet is Nothing, it uses the property set assigned to its
neighbors

Example:
This example creates a triangle using node N10, N9 and N7.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
Set EntList_2 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N10 "
EntList_1.SelectFromString "N9 "
EntList_2.SelectFromString "N7"

Member Function Documentation 89


MPI Application Programming Interface
Set EntList_3 = MeshEditor.CreateTri(EntList, EntList_1, EntList_2, Nothing)

Object CreateBeams ( Object aNode1,


Object aNode2,
long aNum,
Object aPropSet
)
Create beams between two given nodes

Parameters:
aNode1 EntList object containing the first node
aNode2 EntList object containing the second node
aNum number of beams to be created
aPropSet Property object that will be assigned to the
beams

Returns:
EntList object containing the list of beams that were
created

Example:
This example create one beam between nodes N1 and N2.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
Set Prop = MeshEditor.FindProperty(40420, 1)
EntList.SelectFromString "N1"
EntList_1.SelectFromString "N2"
Set EntList_2 = MeshEditor.CreateBeams(EntList, EntList_1, 1, Prop)

Object Delete ( Object aEnts )


Deletes a set of entities

Parameters:
aEnts EntList object containing entities to be deleted

Returns:
EntList object containing entities that were not deleted

Note:
If you attempt to delete nodes that are referenced by elements or boundary
conditions, these will not be deleted. You would need to delete the dependent
entities first

Example:
This example deletes the beam B4.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "B4"
Set EntList_1 = MeshEditor.Delete(EntList)

Member Function Documentation 90


MPI Application Programming Interface

Boolean RemeshArea ( Object aEnts,


double aSize
)
Remeshes a set of triangles

Parameters:
aEnts EntList object containing triangles to be remeshed
aSize target mesh size

Returns:
True if operation is successful; False otherwise

Example:
This example remeshes triangles T13, T14 and T15 with target size
1.52.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "T13 T14 T15"
MeshEditor.RemeshArea EntList, 1.52

long MatchNodes ( Object aNodes,


Object aTris,
String aLayer
)
Matches nodes on one side of a fusion mesh to another

Parameters:
aNode EntList object containing nodes to be matched
aTris EntList object containing triangles defining the other side
aLayer name of the layer to which newly created nodes will be addigned.
Specify an empty string ("") to create nodes in the currently active
layer.

Returns:
number of nodes affected

Example:
This example matches nodes to the given triangles
Set MeshEditor = Synergy.MeshEditor()
Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1006 N1468 N1545 "
EntList_1.SelectFromString "T1867 T1926 T2021 T2023 T2797 T2817 T2818 T2950 T2974 T3046
MeshEditor.MatchNodes EntList, EntList_1, ""

long MakeRegion ( double aTol,


Boolean aIsAngular
)
Creates geometric regions from all the triangles in the mesh

Member Function Documentation 91


MPI Application Programming Interface

Parameters:
aTol specifies planar or angular tolerance
aIsAngular specify True to check angular tolerance when merging triangles
and False to specify a planar tolerance

Returns:
number of regions created

Example:
This example creates a regions from triangles using an angular tolerance 0.1.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.MakeRegion 0.1, True

long MakeRegion2 ( double aTol,


Boolean aIsAngular,
Boolean aMesh,
Object aPropSet
)
Creates geometric regions from mesh triangle or STL

Parameters:
aTol specifies planar or angular tolerance
aIsAngular specify True to check angular tolerance when merging triangles
and False to specify a planar tolerance
aMesh specify True to convert mesh to regions and False to convert STL
aPropSet property to set the region (for STL only)

Returns:
number of regions created

Example:
This example creates a regions from STL using an angular tolerance 0.1.

Set MeshEditor = Synergy.MeshEditor()


MeshEditor.MakeRegion2 0.1, True, False, Null

Boolean MoveBeamNode ( Object aMovingNode,


Object aTargetCoord
)
Moves a beam node

Parameters:
aMovingNode EntList object containing the beam node to be
moved
aTargetCoord Vector object containing the destination point

Returns:
True if operation is successful; False otherwise

Member Function Documentation 92


MPI Application Programming Interface

Example:
This example moves the beam node N152 to the following
position.

Set EntList = MeshEditor.CreateEntityList()


Set Vector = Synergy.CreateVector()
EntList.SelectFromString "N152 "
Vector.SetXYZ -33.2956, 2.96411, -53.236
MeshEditor.MoveBeamNode EntList, Vector

Boolean MoveNodeToEdge ( Object aNode,


Object aEdgeNode1,
Object aEdgeNode2,
double aParamLoc
)
Moves a node to a triangle edge. It breaks triangles that share the edge and creates
new ones if necessary

Parameters:
aNode EntList object containing the node to be moved
aEdgeNode1 EntList object containing the first node on the edge
aEdgeNode2 EntList object containing the second node on the edge
aParamLoc parametric location on the edge between 0.0 and 1.0, where
0.0 is the location of the first edge node and 1.0 is the location
of the second edge node

Returns:
True if operation is successful; False otherwise

Example:
This example moves the node N1 to mid-point of the edge N10-N11.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
Set EntList_1 = MeshEditor.CreateEntityList()
Set EntList_2 = MeshEditor.CreateEntityList()
EntList.SelectFromString "N1"
EntList_1.SelectFromString "N10 "
EntList_2.SelectFromString "N11 "
MeshEditor.MoveNodeToEdge EntList, EntList_1, EntList_2, 0.5

Boolean RemeshArea2 ( Object aEnts,


double aSize,
double aSmooth
)
Remeshes a set of triangles by incremental mesh size

Parameters:
aEnts EntList object containing triangles to be remeshed
aSize target mesh size
aSmooth whether to smooth

Member Function Documentation 93


MPI Application Programming Interface
Returns:
True if operation is successful; False otherwise

Example:
This example remeshes triangles T13, T14 and T15 smoothly with target size
1.52.

Set MeshEditor = Synergy.MeshEditor()


Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "T13 T14 T15"
MeshEditor.RemeshArea2 EntList, 1.52, True

Object CreateBeamsByPoints ( Object aPt1,


Object aPt2,
long aNum,
Object aPropSet
)
Create beams between two given points

Parameters:
aPt1 Vector object containing the first point
aPt2 Vector object containing the second point
aNum number of beams to be created
aPropSet Property object that will be assigned to the beams

Returns:
EntList object containing the list of beams that were created

Example:
This example create one beam between two points P1 and P2.

Set Vector = Synergy.CreateVector()


Set Vector_1 = Synergy.CreateVector()
Set MeshEditor = Synergy.MeshEditor()
Set Prop = MeshEditor.FindProperty(40420, 1)
Vector.SetXYZ -7.83, -0.5, -8.01
Vector_1.SetXYZ 9.54, 4.69, -40.59
Set EntList = MeshEditor.CreateBeamsByPoints(Vector, Vector_1, 1, Prop)

Boolean ProjectMesh ( Object aTris )


Project mesh to geometry

Parameters:
aTris Triangles to be projected

Returns:
True if operation is successful; False otherwise

Example:
This example projects triangle T1 T2 T3to
geometry.

Member Function Documentation 94


MPI Application Programming Interface
Set EntList = MeshEditor.CreateEntityList()
Set EntList.SelectFromString "T1 T2 T3 "
MeshEditor.ProjectMesh EntList

long ConvertToBeams ( Object aStartNodes,


Object aPropSet,
Boolean aJunction,
long aNumBranch
)
Converts mesh to beam elements

Parameters:
aStartNodes Node to start
aPropSet Property set for the new beams
aJunction Whether have junction
aNumBranch Number of branches

Returns:
True if operation is successful; False otherwise

Example:
This example converts elements to beams starting with
N9.

Set MeshEditor = Synergy.MeshEditor()


Set Prop = MeshEditor.FindProperty(40420, 1)
Set EntList = MeshEditor.CreateEntityList()
EntList.SelectFromString "N9 "
MeshEditor.ConvertToBeams EntList, Prop, True, 1

Member Function Documentation 95


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MeshGenerator Class Reference


This class is used to generate a mesh in the model. More...

List of all members.

Public Methods
Boolean Generate ()
Boolean SaveOptions ()

Public Attributes
double EdgeLength
Edge length target for the mesh.

double MergeTolerance
Merge tolerance; nodes within this tolerance will be merged after meshing.

Boolean Match
Enables/disables matched meshing for fusion models.

Boolean Smoothing
Specifies whether node positions will be smoothed.

Boolean ElementReduction
Enables/disables automatic element size determination for fusion meshes from faceted
geometry.

Boolean TetraRefine
Enables/disables tetrahedral refinement for 3D meshes.

long TetraLayers
Number of layers through thickness for tetrahedral meshes.

double TetraMaxAR
Limit on aspect ratio for tetrahedral meshes.

long MaximumMatchDistanceOption
Specifies the option to determine the limit on max match dist.

double MaximumMatchDistance
Limit on match distance for wedges.

Boolean UseTetrasOnEdge

MeshGenerator Class Reference 96


MPI Application Programming Interface
Specifies whether tetras are to be created on model edges.

Boolean RemeshAll
Specifies whether previously meshed portions of the model will be re-meshed.

Boolean UseActiveLayer
Specifies whether the newly generated mesh will be pushed into the active layer.

Boolean PostMeshActions
Specifies whether post-meshing actions such as smoothing are enabled.

double ChordHeight
Chord height value.

Boolean ChordHeightControl
Specifies whether using chord height.

long NurbsMesher
Specifies nurbs mesher algorithm using default(0) or Advancing Front(1).

Boolean AutomaticTetraOptimization
Specifies whether optimizing tetras automatically.

String SourceGeomType
Specifies Source Geometry Type.

Boolean ChordHtProximity
Specifies whether using chord height proximity.

Boolean MergeCavityRunner
Specifies whether merging cavity runner.

Detailed Description
You can use this class to create a midplane, fusion or 3D mesh in the model.

See also:
Synergy::MeshGenerator

Member Function Documentation

Boolean Generate ( )
Generates a mesh in the model

Returns:

Public Attributes 97
MPI Application Programming Interface
True if the mesh was generated successfully; False
otherwise

Example
This example generates a mesh using default parameters:

Set Synergy = CreateObject("synergy.Synergy")


Set MeshGenerator = Synergy.MeshGenerator()
MeshGenerator.Generate

Boolean SaveOptions ( )
Save mesh options

Returns:
True if operation is successful; False
otherwise

Example
This example saves mesh options:

Set MeshGenerator = Synergy.MeshGenerator()


MeshGenerator.EdgeLength 4
MeshGenerator.MergeTolerance 0.2
MeshGenerator.Match True
MeshGenerator.Smoothing False
MeshGenerator.ElementReduction True
MeshGenerator.SurfaceOptimization True
MeshGenerator.AutomaticTetraOptimization True
MeshGenerator.TetraRefine True
MeshGenerator.TetraLayers 6
MeshGenerator.TetraMaxAR 15
MeshGenerator.MaximumMatchDistanceOption 0
MeshGenerator.MaximumMatchDistance 1e20
MeshGenerator.UseTetrasOnEdge False
MeshGenerator.RemeshAll True
MeshGenerator.UseActiveLayer True
MeshGenerator.PostMeshActions True
MeshGenerator.MergeCavityRunner True
MeshGenerator.ChordHeightControl True
MeshGenerator.ChordHtAspectRatio False
MeshGenerator.ChordHtProximity False
MeshGenerator.ChordHeight 0.1
MeshGenerator.NurbsMesher 1
MeshGenerator.SourceGeomType "Auto-Detect"
MeshGenerator.SaveOptions

Member Function Documentation 98


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MeshSummary Class Reference


This class provides access to individal value about mesh summary. More...

List of all members.

Public Attributes
double MinAspectRatio
Minimum aspect ratio.

double MaxAspectRatio
Maximum aspect ratio.

double AveAspectRatio
Average aspect ratio.

long FreeEdgeCount
Free edge count.

long ManifoldEdgeCount
Manifold edge count.

long NonManifoldEdgeCount
Non-manifold edge count.

long TrianglesCount
Number of triangles.

long TetrasCount
Number of Tetras.

long NodesCount
Number of nodes.

long BeamsCount
Number of beams.

long ConnectivityRegions
Number of connectivity regions.

long Unoriented
Unoriented elements count.

long IntersectionElements

MeshSummary Class Reference 99


MPI Application Programming Interface

Intersection elements count.

long OverlapElements
Overlap elements count.

long DuplicatedBeams
Duplicated beams count.

double MatchRatio
Mesh match ratio.

double MeshVolume
Mesh volume.

double RunnerVolume
Runner volume.

long ZeroTriangles
Number of zero area triangles.

long ZeroBeams
Number of zero length beams.

double FusionArea
Fusion area.

Detailed Description
You can use this class to mesh summary value such as min, max or average of aspect
ratios, number of entities, connected region, free edges count, match ratio etc.

See also:
DiagnosisManager::GetMeshSummary

Public Attributes 100


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

ModelDuplicator Class Reference


This class provides access to the cavity duplication wizard functionality. More...

List of all members.

Public Methods
Boolean Generate ()

Public Attributes
long NumCavities
Number of cavities desired.

Boolean ByColumns
Specify True to arrange by columns; False to arrange byrows.

long NumCols
Number of columns; relevant only if ByColumns is set to True.

long NumRows
Number of rows; relevant only if ByColumns is set to False.

double XSpacing
Spacing in the X direction.

double YSpacing
Spacing in the Y direction.

Boolean AlignGates
Specify True to position cavities so that their gates are aligned.

Detailed Description
You can use this class to duplicate model cavities

See also:
Synergy::ModelDuplicator

ModelDuplicator Class Reference 101


MPI Application Programming Interface

Member Function Documentation

Boolean Generate ( )
Duplicates cavities

Returns:
True if the operation succeeded; False otherwise

Example
This example generates cavities using the following
parameters.

Set Synergy = CreateObject("synergy.Synergy")


Set ModelDup = Synergy.ModelDuplicator()
ModelDup.NumCavities 2
ModelDup.ByColumns True
ModelDup.NumCols 2
ModelDup.NumRows 2
ModelDup.XSpacing 182
ModelDup.YSpacing 202
ModelDup.AlignGates True
ModelDup.Generate

Member Function Documentation 102


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Modeler Class Reference


This class provides modeling operations. More...

List of all members.

Public Methods
Object CreateNodeByXYZ (Object aCoord)
Object CreateNodesBetween (Object aStart, Object aEnd, long aNum)
Object CreateNodesByOffset (Object aCoord, Object aOffset, long aNum)
Object CreateNodesByDivide (Object aCurve, long aNum, Boolean aEnds)
Object CreateEntityList ()
Object CreateNodeByIntersect (Object aCurv1, Object aCurv2, Object aPt)
Object CreateLine (Object aCoord, Object aVec, Boolean aRelative, Object aPropSet,
Boolean aEndPts)
Object CreateArcByAngle (Object aCenter, double aRadius, double aStart, double
aEnd, Object aPropSet, Boolean aEndPts)
Object CreateArcByPoints (Object aPt1, Object aPt2, Object aPt3, Boolean aCircle,
Object aPropSet, Boolean aEndPts)
Object FindProperty (long aType, long aID)
Object CreateCurveByConnect (Object aCurv1, double aEnd1, Object aCurv2, double
aEnd2, double aFactor, Object aPropSet)
Object CreateSpline (Object aCoords, Object aPropSet, Boolean aEndPts)
Boolean BreakCurves (Object aCurv1, Object aCurv2)
Object CreateRegionByBoundary (Object aCurves, Object aPropSet)
Object CreateRegionByNodes (Object aNodes, Object aPropSet)
Object CreateRegionByRuling (Object aCurves1, Object aCurves2, Object aPropSet)
Object CreateRegionByExtrusion (Object aCurve, Object aDir, Object aPropSet)
Boolean CreateHoleByBoundary (Object aRegion, Object aCurves)
Boolean CreateHoleByNodes (Object aRegion, Object aNodes)
Boolean Reflect (Object aEnts, Object aRefPt, Object aPlane, Boolean aCopy, Boolean
aMerge)
Boolean Scale (Object aEnts, Object aRefPt, Object aScale, Boolean aCopy, Boolean
aMerge)
Boolean Translate (Object aEnts, Object aVec, Boolean aCopy, long aNumCopies,
Boolean aMerge)
Boolean Rotate (Object aEnts, Object aCenter, Object aAxis, double aAngle, Boolean
aCopy, long aNumCopies, Boolean aMerge)
Boolean Rotate3Pts (Object aEnts, Object aPt1, Object aPt2, Object aPt3, Boolean
aCopy, Boolean aMerge)
Object CreateLCSByPoints (Object aCoord1, Object aCoord2, Object aCoord3)
Boolean ActivateLCS (Object aLCS, Boolean aActivate, String aType)
Object CreateBoundaryList ()
Boolean SetMeshSize (Object aEnts, Object aBoundaries, double aSize)
Boolean ScaleMeshDensity (Object aEnts, Object aBoundaries, double aScale)

Modeler Class Reference 103


MPI Application Programming Interface

Detailed Description
You can use this class to create nodes, lines, curves, regions and local coordinate
systems. You can also move or copy all entities by translation, rotation, reflection and
scaling operations.

See also:
Synergy::Modeler

Member Function Documentation

Object CreateNodeByXYZ ( Object aCoord )


Creates a node at a given point

Parameters:
aCoord Vector object that specifies the coordinates at which the node will be
created

Returns:
EntList object containing the node that is created

See also:
CreateNodesBetween , CreateNodesByOffset , CreateNodeByIntersect ,
CreateNodesByDivide

Example:
This example creates a node at (10 ,100 ,0).

Set Vector = Synergy.CreateVector()


Set Modeler = Synergy.Modeler()
Vector.SetXYZ 10, 100, 0
Set EntList = Modeler.CreateNodeByXYZ(Vector)

Object CreateNodesBetween ( Object aStart,


Object aEnd,
long aNum
)
Creates a set of nodes between two given points

Parameters:
aStart Vector object that specifies the coordinates of the first point
aEnd Vector object that specifies the coordinates of the second point
aNum number of nodes to be created

Returns:
EntList object containing the nodes that were created

Public Methods 104


MPI Application Programming Interface
See also:
CreateNodeByXYZ , CreateNodesByOffset , CreateNodeByIntersect ,
CreateNodesByDivide

Example:
This example creates a node at the mid-point of (10 ,100 ,0) and (100 ,10
,0).

Set Vector = Synergy.CreateVector()


Set Vector_1 = Synergy.CreateVector()
Set Modeler = Synergy.Modeler()
Vector.SetXYZ 10, 100, 0
Vector_1.SetXYZ 100, 10, 0
Set EntList = Modeler.CreateNodesBetween(Vector, Vector_1, 1)

Object CreateNodesByOffset ( Object aCoord,


Object aOffset,
long aNum
)
Creates a set of nodes by an offset operation

Parameters:
aCoord Vector object that specifies the reference point
aOffset Vector object that specifies the offset vector
aNum number of nodes to be created

Returns:
EntityList object containing the nodes that were created

See also:
CreateNodeByXYZ , CreateNodesBetween , CreateNodeByIntersect ,
CreateNodesByDivide

Example:
This example creates node at (110, 100, 0), which is (100, 0, 0) offset
from (10, 100, 0).

Set Vector = Synergy.CreateVector()


Set Vector_1 = Synergy.CreateVector()
Set Modeler = Synergy.Modeler()
Vector.SetXYZ 10, 100, 0
Vector_1.SetXYZ 100, 0, 0
Set EntList = Modeler.CreateNodesByOffset(Vector, Vector_1, 1)

Object CreateNodesByDivide ( Object aCurve,


long aNum,
Boolean aEnds
)
Creates a set of nodes by dividing a curve (the curve itself is not modified)

Parameters:
aCurv EntList object that specifies the curve to be divided

Member Function Documentation 105


MPI Application Programming Interface
aNum number of nodes to be created
aEnds specifies whether nodes need to be created at the ends of the curves

Returns:
EntityList object containing the nodes that were created

See also:
CreateNodeByXYZ , CreateNodesByOffset , CreateNodeByIntersect ,
CreateNodesBetween

Example:
This example creates 3 nodes by dividing curve C2.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
EntList.SelectFromString "C2 "
Set EntList_1 = Modeler.CreateNodesByDivide(EntList, 3, True)

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
EntList object

Note:
When using this function, it will first ask for result invalidation. If you want to
select entities without checking result, use StudyDoc.CreateEntityList.

Example:

See also:
Modeler::CreateCurveByConnect

Object CreateNodeByIntersect ( Object aCurv1,


Object aCurv2,
Object aPt
)
Creates a node at an intersection of two curves

Parameters:
aCurv1 EntList object that specifies the first curve
aCurv2 EntList object that specifies the second curve
aPt Vector object that specifies a point close to the intersection point.
This parameter is used to make a unique choice if there are multiple
intersections

Returns:
EntList object containing the nodes that were created

See also:

Member Function Documentation 106


MPI Application Programming Interface

CreateNodeByXYZ , CreateNodesByOffset , CreateNodesBetween ,


CreateNodesByDivide

Example:
This example creates a node at intersection point of curves C1 and C2.

Set EntList = Modeler.CreateEntityList()


Set EntList_1 = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
EntList.SelectFromString "C1 "
EntList_1.SelectFromString "C2 "
Vector.SetXYZ 50.91, 59.09, 0
Set EntList_2 = Modeler.CreateNodeByIntersect(EntList, EntList_1, Vector)

Object CreateLine ( Object aCoord,


Object aVec,
Boolean aRelative,
Object aPropSet,
Boolean aEndPts
)
Creates a line from between two given points

Parameters:
aCoord Vector object that specifies the coordinates of the first point
aVec Vector object that specifies the coordinates of the second point or
an offset vector
aRelative specify False if aVec specifies the coordinates of the second point
and True if aVec specifies an offset that will be added to the first
point to obtain the second
aPropSet Property object that will be assigned to the line
aEndPts specifies whether nodes need to be created at the ends of the line

Returns:
EntList object containing the line that is created

See also:
FindProperty

Example:
This example creates a line from (110, 100, 0) to (45, 55, 0).

Set Vector = Synergy.CreateVector()


Set Vector_1 = Synergy.CreateVector()
Set Modeler = Synergy.Modeler()
Modeler.FindProperty 0, 0
Vector.SetXYZ 110, 100, 0
Vector_1.SetXYZ 45, 55, 0
Set EntList = Modeler.CreateLine(Vector, Vector_1, False, Nothing, True)

Member Function Documentation 107


MPI Application Programming Interface

Object CreateArcByAngle ( Object aCenter,


double aRadius,
double aStart,
double aEnd,
Object aPropSet,
Boolean aEndPts
)
Creates an arc from a center and start and end angles

Parameters:
aCenter Vector object that specifies the coordinates of the center of the arc
aRadius radius of the arc
aStart start angle
aEnd end angle
aPropSet Property object that will be assigned to the arc
aEndPts specifies whether nodes need to be created at the ends of the arc

Returns:
EntList object containing the arc that is created

See also:
CreateArcByPoints , FindProperty

Example:
This example creates an arc centered at (45, 55, 0) with a radius of 50; the
start angle is 0 degrees and the end angle is 60 degrees.

Set Vector = Synergy.CreateVector()


Set Modeler = Synergy.Modeler()
Modeler.FindProperty 0, 0
Vector.SetXYZ 45, 55, 0
Set EntList = Modeler.CreateArcByAngle(Vector, 50, 0, 60, Nothing, True)

Object CreateArcByPoints ( Object aPt1,


Object aPt2,
Object aPt3,
Boolean aCircle,
Object aPropSet,
Boolean aEndPts
)
Creates an arc from three points

Parameters:
aPt1 Vector object that specifies the coordinates of the first point
aPt2 Vector object that specifies the coordinates of the second point
aPt3 Vector object that specifies the coordinates of the third point
aCircle specify True to create a circle and False to create an arc between the
first and third points, respectively
aPropSet Property object that will be assigned to the arc
aEndPts specifies whether nodes need to be created at the ends of the arc

Member Function Documentation 108


MPI Application Programming Interface
Returns:
EntList object containing the arc that is created

See also:
CreateArcByAngle , FindProperty

Example:
This example create a circle passing through the following three points.

Set Vector = Synergy.CreateVector()


Set Vector_1 = Synergy.CreateVector()
Set Vector_2 = Synergy.CreateVector()
Set Modeler = Synergy.Modeler()
Modeler.FindProperty 0, 0
Vector.SetXYZ 10, 100, 0
Vector_1.SetXYZ 66.67, 70, 0
Vector_2.SetXYZ 100, 10, 0
Set EntList = Modeler.CreateArcByPoints(Vector, Vector_1, Vector_2, False, Nothing, Tr

Object FindProperty ( long aType,


long aID
)
Finds a property of a given type and id

Parameters:
aType property type
aID property id

Returns:
Property object of the given type and id

Example:
This example finds the property of type 40420 (cold runner) and
id 1.

Set Modeler = Synergy.Modeler()


Set Prop = Modeler.FindProperty(40420, 1)

Object CreateCurveByConnect ( Object aCurv1,


double aEnd1,
Object aCurv2,
double aEnd2,
double aFactor,
Object aPropSet
)
Creates a curve by connecting two curves

Parameters:
aCurv1 EntList object containing the first curve
aEnd1 specify 0 to choose the beginning of the first curve or 1 to choose
its end
aCurv2 EntList object containing the second curve

Member Function Documentation 109


MPI Application Programming Interface

aEnd2 specify 0 to choose the beginning of the second curve or 1 to


choose its end
aFactor fillet factor
aPropSet Property object that will be assigned to the curve

Returns:
EntList object containing the curve that is created

See also:
FindProperty

Example:
This example creates a curve that connects curves C17 and C25.

Set EntList = Modeler.CreateEntityList()


Set EntList_1 = Modeler.CreateEntityList()
Modeler.FindProperty 0, 0
EntList.SelectFromString "C17 "
EntList_1.SelectFromString "C25 "
Set EntList_2 = Modeler.CreateCurveByConnect(EntList, 1, EntList_1, 1, 1, Nothing)

Object CreateSpline ( Object aCoords,


Object aPropSet,
Boolean aEndPts
)
Creates a spline from a set of points

Parameters:
aCoords VectorArray object containing the points that define the spline
aPropSet Property object that will be assigned to the spline
aEndPts specifies whether nodes need to be created at the ends of the
spline

Returns:
EntList object containing the spline that is created

See also:
FindProperty

Example:
This example creates a spline.

Set VectorArray = Synergy.CreateVectorArray()


Set Modeler = Synergy.Modeler()
Modeler.FindProperty 0, 0
VectorArray.Clear
VectorArray.AddXYZ 10, 100, 0
VectorArray.AddXYZ 45, 55, 0
VectorArray.AddXYZ 100, 10, 0
VectorArray.AddXYZ 95, 55, 0
Set EntList = Modeler.CreateSpline(VectorArray, Nothing, True)

Member Function Documentation 110


MPI Application Programming Interface

Boolean BreakCurves ( Object aCurv1,


Object aCurv2
)
Breaks two curves at their intersection point

Parameters:
aCurv1 EntList object containing the first
curve
aCurv2 EntList object containing the second
curve

Returns:
True if operation is successful; False
otherwise

Example:
This example breaks curve C1 and C8.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set EntList_1 = Modeler.CreateEntityList()
EntList.SelectFromString "C8 "
EntList_1.SelectFromString "C1 "
Modeler.BreakCurves EntList, EntList_1

Object CreateRegionByBoundary ( Object aCurves,


Object aPropSet
)
Creates a region from an ordered sequence of boundary curves

Parameters:
aCurves EntList object containing the boundary curves
aPropSet Property object that will be assigned to the region

Returns:
EntList object containing the region that is created

See also:
CreateRegionByNodes , CreateRegionByRuling , CreateRegionByExtrusion ,
FindProperty

Example:
This example creates a region using the curves C8, C1 and C7.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set Prop = Modeler.FindProperty(40800, 1)
EntList.SelectFromString "C8 C1 C7 "
Set EntList_1 = Modeler.CreateRegionByBoundary(EntList, Prop)

Member Function Documentation 111


MPI Application Programming Interface

Object CreateRegionByNodes ( Object aNodes,


Object aPropSet
)
Creates a region from an ordered sequence of boundary nodes

Parameters:
aNodes EntList object containing the boundary nodes
aPropSet Property object that will be assigned to the region that is created

Returns:
EntList object containing the region that is created

See also:
CreateRegionByBoundary , CreateRegionByRuling , CreateRegionByExtrusion
, FindProperty

Example:
This example creates a region using the nodes N14, N9, N4, N8 and N6.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set Prop = Modeler.FindProperty(40800, 1)
EntList.SelectFromString "N14 N9 N4 N8 N6 "
Set EntList_1 = Modeler.CreateRegionByNodes(EntList, Prop)

Object CreateRegionByRuling ( Object aCurves1,


Object aCurves2,
Object aPropSet
)
Creates one or more regions between two sets of curves by a ruling operation

Parameters:
aCurves1 EntList object containing the first set of curves
aCurves2 EntList object containing the second set of curves
aPropSet Property object that will be assigned to the region

Returns:
EntList object containing the region that is created

See also:
CreateRegionByNodes , CreateRegionByBoundary , CreateRegionByExtrusion
, FindProperty

Example:
This example creates a region by a ruling operation between curve C5 and C4.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set EntList_1 = Modeler.CreateEntityList()
Set Prop = Modeler.FindProperty(40800, 1)
EntList.SelectFromString "C5 "
EntList_1.SelectFromString "C4 "

Member Function Documentation 112


MPI Application Programming Interface
Set EntList_2 = Modeler.CreateRegionByRuling(EntList, EntList_1, Prop)

Object CreateRegionByExtrusion ( Object aCurve,


Object aDir,
Object aPropSet
)
Creates one or more regions by extruding a set of curves along a given direction
vector

Parameters:
aCurve EntList object containing a set of curves
aDir Vector object defining the extrusion vector
aPropSet Property object that will be assigned to the region

Returns:
EntList object containing the region that is created

See also:
CreateRegionByNodes , CreateRegionByBoundary , CreateRegionByRuling ,
FindProperty

Example:
This example creates a region by extruding C7 along the vector <ttt>(15, 0,
0).

Set Vector = Synergy.CreateVector()


Set Modeler = Synergy.Modeler()
Set EntList = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Prop = Modeler.FindProperty(40800, 1)
EntList.SelectFromString "C7 "
Vector.SetXYZ 15, 0, 0
Set EntList_1 = Modeler.CreateRegionByExtrusion(EntList, Vector, Prop)

Boolean CreateHoleByBoundary ( Object aRegion,


Object aCurves
)
Creates a hole in a region from an ordered sequence of boundary curves

Parameters:
aRegion EntList object containing the region
aCurves EntList object containing the boundary curves for the hole

Returns:
True if the hole was created; False if the operation failed.

See also:
CreateHoleByNodes

Example:
This example creates a hole on region R3 using C8, C10, C1 and C7.

Member Function Documentation 113


MPI Application Programming Interface

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set EntList_1 = Modeler.CreateEntityList()
EntList.SelectFromString "R3 "
EntList_1.SelectFromString "C8 C10 C1 C7 "
Modeler.CreateHoleByBoundary EntList, EntList_1

Boolean CreateHoleByNodes ( Object aRegion,


Object aNodes
)
Creates a hole in a region from an ordered sequence of boundary nodes

Parameters:
aRegion EntList object containing the region
aNodes EntList object containing the boundary nodes for the hole

Returns:
True if the hole was created; False if the operation failed.

See also:
CreateHoleByBoundary

Example:
This example creates a hole on region R4 using N13, N10, N3.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set EntList_1 = Modeler.CreateEntityList()
EntList.SelectFromString "R4 "
EntList_1.SelectFromString "N13 N10 N3 "
Modeler.CreateHoleByNodes EntList, EntList_1

Boolean Reflect ( Object aEnts,


Object aRefPt,
Object aPlane,
Boolean aCopy,
Boolean aMerge
)
Reflects entities about a plane passing through a given reference point

Parameters:
aEnts EntList object containing the entities to be reflected
aRefPt Vector object that specifies the reference point
aPlane Vector object that specifies the normal to the plane about which the
entities are to be reflected
aCopy specify True to copy entities; False to move them
aMerge specify True to merge nodes after the reflect operation

Returns:
True if operation is successful; False otherwise

Member Function Documentation 114


MPI Application Programming Interface

Example:
This example copies C6 by reflecting it about the YZ plane.

EntList.SelectFromString "C6 "


Vector.SetXYZ 0, 0, 0
Vector_1.SetXYZ 1, 0, 0
Modeler.Reflect EntList, Vector, Vector_1, True, False

Boolean Scale ( Object aEnts,


Object aRefPt,
Object aScale,
Boolean aCopy,
Boolean aMerge
)
Scales entities about a given reference point

Parameters:
aEnts EntList object containing the entities to be scaled
aRefPt Vector object that specifies the reference point
aScale Vector object that specifies the scale factors in the three coordinate
directions
aCopy specify True to copy entities; False to move them
aMerge specify True to merge nodes after the reflect operation

Returns:
True if operation is successful; False otherwise

Example:
This example scales the curve C6 by a factor of 1.5 in all directions.

EntList.SelectFromString "C6 "


Vector.SetXYZ 0, 0, 0
Vector_1.SetXYZ 1.5, 1.5, 1.5
Modeler.Scale EntList, Vector, Vector_1, False, False

Boolean Translate ( Object aEnts,


Object aVec,
Boolean aCopy,
long aNumCopies,
Boolean aMerge
)
Translates entities by a given vector

Parameters:
aEnts EntList object containing the entities to be
translated
aVec Vector object that specifies the translation
aCopy specify True to copy entities; False to move them
aNumCopies for a copy operation, the number of copies to be
made
aMerge

Member Function Documentation 115


MPI Application Programming Interface

specify True to merge nodes after the reflect


operation

Returns:
True if operation is successful; False otherwise

Example:
This example translates node N13, curves C4, C5 and regions R4,
R3.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
EntList.SelectFromString "N13 C4 C5 R4 R3 "
Vector.SetXYZ 10, 10, 0
Modeler.Translate EntList, Vector, False, 1, False

Boolean Rotate ( Object aEnts,


Object aCenter,
Object aAxis,
double aAngle,
Boolean aCopy,
long aNumCopies,
Boolean aMerge
)
Rotates entities about an axis passing through a reference point

Parameters:
aEnts EntList object containing the entities to be
rotated
aCenter Vector object that specifies the center of
rotation
aAxis Vector object that specifies that axis of rotation
aAngle rotation angle
aCopy specify True to copy entities; False to move
them
aNumCopies the number of copies to translate
aMerge specify True to merge nodes after the reflect
operation

Returns:
True if operation is successful; False otherwise

Example:
This example rotates region R5 about the X axis.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Vector_1 = Synergy.CreateVector()
EntList.SelectFromString "R5 "
Vector.SetXYZ 0, 0, 0

Member Function Documentation 116


MPI Application Programming Interface
Vector_1.SetXYZ 1, 0, 0
Modeler.Rotate EntList, Vector, Vector_1, 0.436332, False, 1, False

Boolean Rotate3Pts ( Object aEnts,


Object aPt1,
Object aPt2,
Object aPt3,
Boolean aCopy,
Boolean aMerge
)
TODO Rotates entities about 3 points defining local coordinate system

Parameters:
aEnts EntList object containing the entities to be rotated
aPt1 First point
aPt2 Second point
aPt3 Third point
aCopy specify True to copy entities; False to move them
aNumCopies the number of copies to translate
aMerge specify True to merge nodes after the reflect
operation

Returns:
True if operation is successful; False otherwise

Example:
This example rotates a triangle based on three points.

Set Synergy = CreateObject("synergy.Synergy")


Set Modeler = Synergy.Modeler()
Set EntList = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Vector_1 = Synergy.CreateVector()
Set Vector_2 = Synergy.CreateVector()
EntList.SelectFromString "T2 "
Vector.SetXYZ -489.73, 294.97, 467.19
Vector_1.SetXYZ -483.29, 7, 502.2
Vector_2.SetXYZ -112.22, 181.52, 349.31
Modeler.Rotate3Pts EntList, Vector, Vector_1, Vector_2, False, False

Object CreateLCSByPoints ( Object aCoord1,


Object aCoord2,
Object aCoord3
)
Creates a local coordinate system from one, two or three points

Parameters:
aCoord1 Vector object that specifies the first point
aCoord2 Vector object that specifies the second point; specify Nothing if you
want to use only one point
aCoord3 Vector object that specifies the third point; specify Nothing if you
want to use only two points

Member Function Documentation 117


MPI Application Programming Interface
Returns:
EntList object containing the local coordinate system that is created

Example:
This example creates a local coordinate systems using the three points below.

Set Modeler = Synergy.Modeler()


Vector.SetXYZ 100, 10, 0
Vector_1.SetXYZ 95, 55, 0
Vector_2.SetXYZ 45, 55, 0
Set EntList = Modeler.CreateLCSByPoints(Vector, Vector_1, Vector_2)

Boolean ActivateLCS ( Object aLCS,


Boolean aActive,
String aType
)
Activates or de-activates a local coordinate system

Parameters:
aLCS EntList object that specifies the local coordinate system that will be
(de-)activated
aActive specify True to activate and False to de-activate the LCS
aType specify "LCS" to activate as a coordinate system and "Plane" tp
activate as a modeling plane. This parameter is ignored if an LCS is
being de-activated

Returns:
True if operation is successful; False otherwise

Example:
This example activates LCS1 as a modeling plane.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
EntList.SelectFromString "LCS1 "
Modeler.ActivateLCS EntList, True, "Plane"

Object CreateBoundaryList ( )
Creates a BoundaryList object

Returns:
BoundaryList object

Example:

See also:
Modeler::SetMeshSize

Boolean SetMeshSize ( Object aEnts,


Object aBoundaries,
double aSize

Member Function Documentation 118


MPI Application Programming Interface

)
Set the mesh size on a set of entities

Parameters:
aEnts EntList object containing the entities to be set mesh size
aBoundaries BoundaryList object containing boundary list to be set mesh
size
aSize mesh size

Returns:
True if operation is successful; False otherwise

Example:
This example sets region R54 remesh size to 1.5
Set Modeler = Synergy.Modeler()
Set EntList = Modeler.CreateEntityList()
Set BoundaryList = Modeler.CreateBoundaryList()
EntList.SelectFromString "R54 "
BoundaryList.SelectFromString ""
Modeler.SetMeshSize EntList, BoundaryList, 1.5

Boolean ScaleMeshDensity ( Object aEnts,


Object aBoundaries,
double aScale
)
Scales the mesh size on given entities by a factor

Parameters:
aEnts EntList object of given entities
aBoundaries BoundaryList object
aScale scale value

Returns:
True if operation is successful; False otherwise

Example:
This example reduces mesh density by half.

Set Modeler = Synergy.Modeler()


Set EntList = Modeler.CreateEntityList()
Set BoundaryList = Modeler.CreateBoundaryList()
EntList.SelectFromString ""
BoundaryList.SelectFromString "S78:0:1 "
Modeler.ScaleMeshDensity EntList, BoundaryList, 0.5

Member Function Documentation 119


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

MoldSurfaceGenerator Class Reference


This class provides access to the mold surface wizard functionality. More...

List of all members.

Public Methods
Boolean Generate ()

Public Attributes
Boolean Centered
Specifies whether the mold surface should be centered around your model.

Object Origin
If you set the above to False, specify a center for the mold surfaceusing this parameter.

Object Dimensions
Vector object that specifies the mold dimensions in the X, Y, and Z directions.

Detailed Description
You can use this class to automatically generate a mold surface boundary in your
model

See also:
Synergy::MoldSurfaceGenerator

Member Function Documentation

Boolean Generate ( )
Generates mold surfaces

Returns:
True if the operation succeeded; False otherwise

Example:
This example generates mold surfaces using the following
parameters.

MoldSurfaceGenerator Class Reference 120


MPI Application Programming Interface
Set Synergy = CreateObject("synergy.Synergy")
Set MoldSurfGen = Synergy.MoldSurfaceGenerator()
MoldSurfGen.Centered True
Set Vector = CreateObject("")
Vector.SetXYZ 146.5, 29.75, 0
MoldSurfGen.Origin Vector
Set Vector = CreateObject("")
Vector.SetXYZ 546, 285, 200
MoldSurfGen.Dimensions Vector
MoldSurfGen.Generate

Member Function Documentation 121


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Plot Class Reference


This class is used to manipulate plot attributes. More...

List of all members.

Public Methods
Regenerate ()
long GetNumberOfFrames ()
SetNumberOfFrames (long aNbFrames)
String GetName ()
SetName (String aName)
long GetNumberOfContours ()
SetNumberOfContours (long aNbCountours)
long GetComponent ()
SetComponent (long aComponent)
double GetMeshFill ()
SetMeshFill (double aFill)
Boolean GetNodalAveraging ()
SetNodalAveraging (Boolean aNodeAvg)
Boolean GetSmoothShading ()
SetSmoothShading (Boolean aSmooth)
Boolean GetColorScale ()
SetColorScale (Boolean aColorScale)
Boolean GetCapping ()
SetCapping (Boolean aCapping)
long GetScaleOption ()
SetScaleOption (long aScaleOption)
long GetPlotMethod ()
SetPlotMethod (long aPlotMethod)
long GetAnimationType ()
SetAnimationType (long aType)
long GetNumberOfIndpVars ()
long GetActiveIndpVar ()
SetActiveIndpVar (long aIndpVar)
SetFixedIndpVarValue (long aIndex, double aValue)
Boolean GetExtendedColor ()
SetExtendedColor (Boolean aExtendedColor)
SetColorBands (long aNbColors)
long GetColorBands ()
Boolean GetXYPlotShowLegend ()
SetXYPlotShowLegend (Boolean aShowL)
Boolean GetXYPlotShowPoints ()
SetXYPlotShowPoints (Boolean aShowP)
SetXYPlotOverlayWithMesh (Boolean aOverlay)

Plot Class Reference 122


MPI Application Programming Interface
Boolean GetXYPlotOverlayWithMesh ()
long GetXYPlotMaxNumberOfCurves ()
SetXYPlotMaxNumberOfCurves (long aMaxNbCurves)
SetXYPlotAutoRangeX (Boolean aAutoRX)
Boolean GetXYPlotAutoRangeY ()
Boolean GetXYPlotAutoRangeX ()
SetXYPlotAutoRangeY (Boolean aAutoRY)
String GetXYPlotTitleX ()
String GetXYPlotTitleY ()
SetXYPlotTitle (String aTitle)
SetXYPlotTitleX (String aXTitle)
SetXYPlotTitleY (String aYTitle)
double GetMinValue ()
SetMinValue (double aMinValue)
double GetMaxValue ()
SetMaxValue (double aMaxValue)
double GetXYPlotMinX ()
double GetXYPlotMaxX ()
double GetXYPlotMinY ()
double GetXYPlotMaxY ()
SetXYPlotMinX (double aMinX)
SetXYPlotMaxX (double aMaxX)
SetXYPlotMinY (double aMinY)
SetXYPlotMaxY (double aMaxY)
double GetXYPlotLegendRectLeft ()
double GetXYPlotLegendRectBottom ()
double GetXYPlotLegendRectWidth ()
double GetXYPlotLegendRectHeight ()
SetXYPlotLegendRectLeft (double aLeft)
SetXYPlotLegendRectBottom (double aBottom)
SetXYPlotLegendRectWidth (double aWidth)
SetXYPlotLegendRectHeight (double aHeight)
String GetPlotType ()
String GetNotes ()
SetNotes (String aNotes)
SaveResultInXML (String aFileName)
SaveResultInPatran (String aBaseFileName)
long GetXYPlotNumberOfCurves ()
AddXYPlotCurve (Object aEntities)
DeleteXYPlotCurve (Object aEntities)
SetEdgeDisplay (long aEdgeDisplay)
long GetEdgeDisplay ()
long GetDataNbComponents ()
long GetDataID ()
String GetDataType ()
Boolean RestoreOriginalPosition ()
Boolean ApplyBestFit (Object aNodeIDs)
double GetDeflectionScaleFactor ()
SetDeflectionScaleFactor (double aFactor)
long GetDeflectionScaleDirection ()
SetDeflectionScaleDirection (long aDir)

Public Methods 123


MPI Application Programming Interface
Boolean GetDeflectionOverlayWithMesh ()
SetDeflectionOverlayWithMesh (Boolean aOverlay)
Boolean GetDeflectionShowAnchorPlane ()
SetDeflectionShowAnchorPlane (Boolean aShow)
Boolean WarpQueryBegin ()
WarpQueryEnd ()
Boolean WarpQueryNode (long aNodeID, Object aRetValues)
long GetProbePlotNumberOfProbeLines ()
Boolean GetProbePlotProbeLine (long aIndex, Object aStartPt, Object aEntPt)
Boolean AddProbePlotProbeLine (Object aStartPt, Object aEndPt)
Boolean SetProbePlotProbeLine (long aIndex, Object aStartPt, Object aEndPt)
Boolean SaveResultInPatran2 (String aBaseFileName, String aUnitSysName)
Boolean SaveResultInXML2 (String aFileName, String aUnitSysName)
long GetNumberOfAnimationFrames ()
long GetFirstAnimationFrameIndex ()
Boolean SetFirstAnimationFrameIndex (long aIndex)
long GetLastAnimationFrameIndex ()
Boolean SetLastAnimationFrameIndex (long aIndex)
Boolean SetNumberOfAnimationFrames (long aNbFrames)
Boolean SaveXYPlotCurveData (String aFileName)
Boolean SaveWarpedShapeInSTL (String aFileName, double aScaleFactor, Boolean
aBinary)
Boolean SaveWarpedShapeInUDM (String aFileName, double aScaleFactor)
Boolean SaveWarpedShapeInSTL2 (String aFileName, double aScaleFactor, Boolean
aBinary, String aUnitSysName)
Boolean SetUseSingleColor (Boolean aSingleColor)
Boolean GetUseSingleColor ()

Detailed Description
You can use this class to manipulate plots in your study. Plots are created or obtained
using the PlotMgr class

See also:
PlotMgr::GetFirstPlot , PlotMgr::GetNextPlot , PlotMgr::CreatePlotByDsID ,
PlotMgr::CreatePlotByName , PlotMgr::CreateXYPlotByName ,
Viewer::ShowPlot , Viewer::HidePlot , Viewer::OverlayPlot , Viewer::GetPlot

Member Function Documentation

Regenerate ( )
Rebuilds the plot

Example
This example regenerates
plot.
Plot.SetScaleOption 1

Detailed Description 124


MPI Application Programming Interface
Plot.Regenerate

long GetNumberOfFrames ( )
Gets total number of frames in the plot

Returns:
total number of frames

See also:
SetNumberOfFrames

Example:
This example gets the number of
frames
nFrames = Plot.GetNumberOfFrames()

SetNumberOfFrames ( long aNewValue )


Sets number of animation frames in a min/max animation plot

Parameters:
aNewValue number of animation frames

See also:
GetNumberOfFrames This example set the number of animation frames to be
4 (for min/max animation only)

Example:
This example sets number of frames to be 4
Plot.SetNumberOfFrames 4

String GetName ( )
Gets name of the plot

Returns:
name of the plot

See also:
SetName

Example:
This example returns plot
name
strName = Plot.GetName()

SetName ( String aName )


Sets name of the plot

Parameters:
aName name of the plot

Member Function Documentation 125


MPI Application Programming Interface
See also:
GetName

Example:
This example set plot name to "My Fill Time
Result"
Plot.SetName "My Fill Time Result"

long GetNumberOfContours ( )
Gets number of plot contours

Returns:
number of plot contours

See also:
SetNumberOfContours

Example:
This example gets number of
contours.
nContours = Plot.GetNumberOfContours()

SetNumberOfContours ( long aNbCountours )


Sets number of plot contours

Parameters:
aNbCountours number of plot contours

See also:
GetNumberOfContours

Example:
This examples set number of contour to
be 5.
Plot.SetNumberOfContours 5

long GetComponent ( )
Gets displayed data component

Returns:
data component
• 0: X component of vectors or 11 component of
tensors
• 1: Y component of vectors or 22 component of
tensors
• 2: Z component of vectors or 33 component of
tensors
• 3: magnitude of vectors or 12 component of
tensors
• 4: 23 component of tensors

Member Function Documentation 126


MPI Application Programming Interface
• 5: 31 component of tensors
• 6: first tensor principal value
• 7: second tensor principal value
• 8: third tensor principal value

See also:
SetComponent

Example:
This example returns data component.
nNumber = Plot.GetComponent()

SetComponent ( long aComponent )


Sets displayed data component

Parameters:
aComponent data component

See also:
GetComponent

Example:
This example set to use component 1 to colot the
plot
Plot.SetComponent 1

double GetMeshFill ( )
Gets mesh fill option

Returns:
mesh fill value The value changes from 0 to 1, stands for plot
opacity

See also:
SetMeshFill

Example:
This example returns mesh fill value.
dMesh = Plot.GetMeshFill()

SetMeshFill ( double aMeshFill )


Sets mesh fill option

Parameters:
aMeshFill mesh fill option

See also:
GetMeshFill

Example:

Member Function Documentation 127


MPI Application Programming Interface
This example set mesh fill
value.
Plot.SetMeshFill 0.5

Boolean GetNodalAveraging ( )
Gets nodal averaging option

Returns:
nodal averaging option

See also:
SetNodalAveraging

Example:
This example gets nodal averaging
option.
isAve = Plot.GetNodalAveraging

SetNodalAveraging ( Boolean aNodalAvg )


Sets nodal averaging option

Parameters:
aNodalAvg nodal averaging option

See also:
GetNodalAveraging

Example:
This example set the plot not to use nodal
averaging
Plot.SetNodalAveraging False

Boolean GetSmoothShading ( )
Gets smooth (Gouraud) shading option

Returns:
True if smooth shading is on

See also:
SetSmoothShading

Example:
This example gets smooth sharding
options.
isAve = Plot.GetSmoothShading

SetSmoothShading ( Boolean aSmooth )


Sets smooth shading option

Parameters:

Member Function Documentation 128


MPI Application Programming Interface
aSmooth smooth shading option

See also:
GetSmoothShading

Example:
This example sets smooth shading option to
false.
Plot.SetSmoothShading False

Boolean GetColorScale ( )
Gets color scale

Returns:
True if color scale is from blue-to-red; False if
vice-versa

See also:
SetColorScale

Example:
This example gets color scale option.
isScale = Plot.GetColorScale

SetColorScale ( Boolean aColorScale )


Sets color scale

Parameters:
aColorScale color scale

See also:
GetColorScale

Example:
This example sets color scale option to
False.
Plot.SetColorScale False

Boolean GetCapping ( )
Gets "capping" option in 3D clipping-plane plots

Returns:
True if the part of model behide active cutting planes is shown in addition to
the clipping plane

See also:
SetCapping

Example:
This example gets plot capping options.
isScale = Plot.GetCapping

Member Function Documentation 129


MPI Application Programming Interface

SetCapping ( Boolean aCapping )


Sets "capping" option in 3D clipping-plane plots

Parameters:
aCapping Capping plane option

See also:
GetCapping

Example:
This example set plot Capping option.
Plot.SetColorScale True

long GetScaleOption ( )
Gets scale option

Returns:
scale option
• 0: automatic scaling over all frames
• 1: automatic scaling with colors scaled per animation
frame
• 2: specified (manual) scaling

See also:
SetScaleOption

Example:
This example gets scale option.
scale = Plot.GetScaleOption

SetScaleOption ( long aScale )


Sets scale option

Parameters:
aScale scale option

See also:
GetScaleOption

Example:
This example sets scale option
to 1.
Plot.SetScaleOption 1

long GetPlotMethod ( )
Gets plot method

Returns:
plot method
• 1: Deflection plot

Member Function Documentation 130


MPI Application Programming Interface
• 2: Shaded plot
• 4: Contour plot
• 8: Display vector as darts
• 16: Display vector as segments
• 32: Display tensor as axes
• 64: Display tensor as ellipses
• 128: Display tensor principal vector as
darts
• 256: Display tensor principal vector as
segments

See also:
SetPlotMethod

SetPlotMethod ( long aPlotMethod )


Sets plot method

Parameters:
aPlotMethod plot method

See also:
GetPlotMethod

Example:
This example set to use contour
method
Plot.SetPlotMethod 4

long GetAnimationType ( )
Gets animation type

Returns:
animation type
• 0: frame animation(e.g. Average
Velocity)
• 1: min-max animation(e.g. Fill
Time)

See also:
SetAnimationType

Example:
This example gets animation type.
aType = Plot.GetAnimationType

SetAnimationType ( long aType )


Sets animation type

Parameters:
aType animation type

Member Function Documentation 131


MPI Application Programming Interface
• 0: frame animation(e.g. Average
Velocity)
• 1: min-max animation(e.g. Fill
Time)

See also:
GetAnimationType

Example:
This example sets animation type to 1.
Plot.SetAnimationType 1

long GetNumberOfIndpVars ( )
Gets number of independent variables in the data

Returns:
number of independent variables

Example:
This example returns number of independent
variables.
nVar = Plot.GetNumberOfIndpVars()

long GetActiveIndpVar ( )
Gets active independent variable (the one over which animation
is performed)

Returns:
active independent variable

See also:
SetActiveIndpVar

Example:
This example gets active independent variable.
nVar = Plot.GetActiveIndpVar()

SetActiveIndpVar ( long aIndpVar )


Sets active independent variable

Parameters:
aIndpVar active independent variable

See also:
SetActiveIndpVar

Example:
This example set active indenpedent variable
to 1.
Plot.SetActiveIndpVar 1

Member Function Documentation 132


MPI Application Programming Interface

SetFixedIndpVarValue ( long aIndex,


double aValue
)
Sets value of fixed independent variable for animations

Parameters:
aIndex specifies which independent variable is being
specified
aValue independent variable value

Example:
This example sets fixed indenpedent variable.
Plot.SetFixedIndpVar 0

Boolean GetExtendedColor ( )
Gets extended color option

Returns:
True if extended coloring is on

See also:
SetExtendedColor

Example:
This example gets extended color
option.
exOn = Plot.GetExtended

SetExtendedColor ( Boolean aExtendedColor )


Sets extended color option

Parameters:
aExtendedColor extended coloring option

See also:
GetExtendedColor

Example:
This example sets extended color option to be
True.
Plot.SetExtendedColor True

SetColorBands ( long aNbColors )


Sets number of color bands or smooth coloring

Parameters:
aNbColors number of colors

See also:
GetColorBands

Member Function Documentation 133


MPI Application Programming Interface
Example:
This example sets color bands to 256.
Plot.SetColorBands 256

long GetColorBands ( )
Gets number of color bands or smooth coloring

Returns:
number of color bands
• values between 2 through 64: banded coloring with this number of
colors
• 256: smooth coloring

See also:
SetColorBands

Example
This example gets color bands.
colBands = Plot.GetColorBands

Boolean GetXYPlotShowLegend ( )
Gets XY plot legend display option

Returns:
returns True if the legend is shown

See also:
SetXYPlotShowLegend

Example:
This example gets option whether to show XY plot
legend.
show = Plot.GetXYPlotShowLegend

SetXYPlotShowLegend ( Boolean aShowL )


Sets XY plot legend display option

Parameters:
aShowL legend display option

See also:
GetXYPlotShowLegend

Example:
This example sets option to not show XY plot
legend.
Plot.SetXYPlotShowLegend False

Boolean GetXYPlotShowPoints ( )
Gets option to display points in XY plots

Member Function Documentation 134


MPI Application Programming Interface
Returns:
True if data points are displayed

See also:
SetXYPlotShowPoints

Example:
This example get option whether to display points in XY
plots.
show = Plot.GetXYPlotShowPoints

SetXYPlotShowPoints ( Boolean aShowP )


Sets option to display points in XY plots

Parameters:
aShowP display option

See also:
GetXYPlotShowPoints

Example:
This example set option to display points in XY
plot.
Plot.SetXYPlotShowPoints True

SetXYPlotOverlayWithMesh ( Boolean aOverlay )


Sets XY plot overlay option

Parameters:
aOverlay overlay option

See also:
GetXYPlotOverlayWithMesh

Example:
This example sets XY plot overlay option to be
True.
Plot.SetXYPlotOverlayWithMesh True

Boolean GetXYPlotOverlayWithMesh ( )
Gets XY plot overlay option @Return True if plot is overlaid with the model

See also:
SetXYPlotOverlayWithMesh

Example:
This example get XY plot overlay options.
withMesh = Plot.GetXYPlotOverlayWithMesh

long GetXYPlotMaxNumberOfCurves ( )

Member Function Documentation 135


MPI Application Programming Interface
Gets maximum number of curves for XY plots

Returns:
maximum number of curves

See also:
SetXYPlotMaxNumberOfCurves

Example:
This example gets XY plot maximum number of
curves.
maxCur = Plot.GetXYPlotMaxNumberOfCurves

SetXYPlotMaxNumberOfCurves ( long aNbCurves )


Sets maximum number of curves for XY plot

Parameters:
aNbCurves maximum number of curves

See also:
GetXYPlotMaxNumberOfCurves

Example:
This example set maximum number of curves of XY plot to
be 5.
Plot.SetXYPlotMaxNumberOfCurves 5

SetXYPlotAutoRangeX ( Boolean aAutoRX )


Sets automatic X range option in XY plots

Parameters:
aAutoRX range

See also:
GetXYPlotAutoRangeX

Example:
This example sets automatic X range
option.
Plot.SetXYPlotAutoRangeX True

Boolean GetXYPlotAutoRangeY ( )
Sets automatic Y range option in XY plots

Parameters:
aAutoRY range

See also:
SetXYPlotAutoRangeY

Member Function Documentation 136


MPI Application Programming Interface
Example:
This example gets automatic Y range
option.
autoY = Plot.GetXYPlotAutoRangeY

Boolean GetXYPlotAutoRangeX ( )
Gets automatic X range option in XY plots

Returns:
True if the X range is determined
automatically

See also:
SetXYPlotAutoRangeX

Example
This example gets automatic X range
option.
autoX = Plot.GetXYPlotAutoRangeX

SetXYPlotAutoRangeY ( Boolean aAutoY )


Sets automatic Y range option in XY plots

Returns:
True if the Y range is determined automatically

See also:
GetXYPlotAutoRangeY

Example
This example sets automatic Y range option to be
True.
Plot.SetXYPlotAutoRangeY True

String GetXYPlotTitleX ( )
Gets X axis title

Returns:
X axis title

See also:
GetXYPlotTitleY

Example:
This example gets X axis
title.
xTitle = Plot.GetXYPlotTitleX

String GetXYPlotTitleY ( )
Gets Y axis title

Member Function Documentation 137


MPI Application Programming Interface
Returns:
Y axis title

See also:
GetXYPlotTitleX

Example
This example gets Y axis
title.
yTitle = Plot.GetXYPlotTitleY

SetXYPlotTitle ( String aTitle )


Sets XY plot title

Parameters:
aTitle plot title

Example:
This example sets XY Plot title to be
"Thickness".
Plot.SetXYPlotTitle "Thickness"

SetXYPlotTitleX ( String aXTitle )


Sets X axis title

Parameters:
aXTitle X axis title

See also:
SetXYPlotTitleY , GetXYPlotTitleX

Example:
This example sets X axis title to be "Normalized
Thickness".
Plot.SetXYPlotTitleX "Normalized Thickness"

SetXYPlotTitleY ( String aYTitle )


Sets Y axis title

Parameters:
aYTitle Y axis title

See also:
GetXYPlotTitleY , SetXYPlotTitleX

Example:
This example sets Y axis title to be "Pressure
Trace".
Plot.SetXYPlotTitleY "Pressure Trace"

Member Function Documentation 138


MPI Application Programming Interface

double GetMinValue ( )
Gets minimum value of plotted range

Returns:
minimum value

See also:
SetMinValue

Example:
This example gets minimum value of plotted
range.
minV = Plot.GetMinValue

SetMinValue ( double aMinValue )


Sets minimum value of plotted range

Parameters:
aMinValue minimum value

See also:
GetMinValue

Example:
This example set minimum value of plotted range to be
0.5.
Plot.SetMinValue 0.5

double GetMaxValue ( )
Gets maximum value of plotted range

Returns:
Maximum value

See also:
GetMinValue , SetMaxValue

Example:
This example gets maximum value of plotted
range.
maxV = Plot.GetMaxValue

SetMaxValue ( double aMaxValue )


Sets maximum value of plotted range

Parameters:
aMaxValue maximum value value

See also:
SetMinValue , GetMaxValue

Member Function Documentation 139


MPI Application Programming Interface
Example:
This example sets maximum value of plotted range to be
1.5.
Plot.SetMaxValue 1.5

double GetXYPlotMinX ( )
Gets minimum X for XY plots

Returns:
minimum X value

Example:
This example gets minimum X
value.
minX = Plot.GetXYPlotMinX()

double GetXYPlotMaxX ( )
Gets maximum X for XY plots

Returns:
maximum X value

Example:
This example gets maximum X
value.
maxX = Plot.GetXYPlotMaxX()

double GetXYPlotMinY ( )
Gets minimum Y for XY plots

Returns:
minimum value

Example:
This example gets minimum Y
value.
minY = Plot.GetXYPlotMinY()

double GetXYPlotMaxY ( )
Gets maximum Y for XY plots

Returns:
maximum value

Example:
This example gets maximum Y
value.
maxY = Plot.GetXYPlotMaxY()

SetXYPlotMinX ( double aMinX )

Member Function Documentation 140


MPI Application Programming Interface
Sets minimum X for XY plots

Parameters:
aMinX minimum value

Example:
This example set minimum X value to
be 15.
Plot.SetXYPlotMinX 15

SetXYPlotMaxX ( double aMaxX )


Sets maximum X for XY plots

Parameters:
aMaxX maximum value

Example:
This example sets maximum X value to be
150.
Plot.SetXYPlotMaxX 150

SetXYPlotMinY ( double aMinY )


Sets minimum Y for XY plots

Parameters:
aMinY minimum value

Example:
This example sets minimum Y value to
be 15.
Plot.SetXYPlotMinY 15

SetXYPlotMaxY ( double aMaxY )


Sets maximum Y for XY plots

Parameters:
aMaxY maximum value

Example:
This example sets maximum Y to be
150.
Plot.SetXYPlotMaxY 150

double GetXYPlotLegendRectLeft ( )
Gets the XY plot legend left position

Returns:
left position

Example:

Member Function Documentation 141


MPI Application Programming Interface
This example gets XY plot legend left
position.
recLeft = Plot.GetXYPlotLegendLeft

double GetXYPlotLegendRectBottom ( )
Gets the XY plot legend bottom position

Returns:
bottom position

Example:
This example gets XY plot legend bottom
position.
recBot = Plot.GetXYPlotLegendBottom

double GetXYPlotLegendRectWidth ( )
Gets the XY plot legend width

Returns:
width

Example:
This example gets XY plot legend
width.
recWidth = Plot.GetXYPlotLegendWidth

double GetXYPlotLegendRectHeight ( )
Gets the XY plot legend height

Returns:
height

Example:
This example gets XY plot legend
height.
recHeight = Plot.GetXYPlotLegendHeight

SetXYPlotLegendRectLeft ( double aLeft )


Sets the XY plot legend left position

Parameters:
aLeft left position

Example:
This example sets XY plot legend left position to be
0.1.
Plot.SetXYPlotLegendLeft 0.1

SetXYPlotLegendRectBottom ( double aBottom )


Sets the XY plot legend bottom position

Member Function Documentation 142


MPI Application Programming Interface
Parameters:
aBottom bottom position

Example:
This example sets XY plot legend bottom position to be
0.1.
Plot.SetXYPlotLegendBottom 0.1

SetXYPlotLegendRectWidth ( double aWidth )


Sets the XY plot legend width

Parameters:
aWidth width

Example:
This example sets XY plot legend width to be
0.5.
Plot.SetXYPlotLegendWidth 0.5

SetXYPlotLegendRectHeight ( double aHeight )


Sets the XY plot legend height

Parameters:
aHeight height

Example:
This example sets XY plot legend height to be
0.5.
Plot.SetXYPlotLegendHeight 0.5

String GetPlotType ( )
Gets plot type

Returns:
plot type, which is one
of:
• Highlight Plot
• XY Plot
• Vector Plot
• Tensor Plot
• XYZ Plot
• Shrink Check Plot
• Sink Mark Plot
• Contour Plot

Example:
This example gets plot
type.
type = Plot.GetPlotType

Member Function Documentation 143


MPI Application Programming Interface

String GetNotes ( )
Gets plot notes

Returns:
plot notes

Example:
This examples gets plot
notes.
note = Plot.GetNotes

SetNotes ( String aNotes )


Sets plot notes

Parameters:
aNotes plot notes

Example:
This example sets plot notes to be "This is the fill-time plot for the model with
3 gates".
Plot.SetNote "This is the fill-time plot for the model with 3 gates"

SaveResultInXML ( String aFileName )


Saves results in an XML file

Parameters:
aFilename XML file name

Example:
This example saves results in "c:\mpi
project\result.xml".
Plot.SaveResultInXML "c:\mpi project\result.xml"

SaveResultInPatran ( String aBaseFileName )


Saves result in a Patran file

Parameters:
aBaseFileName basename for the Patran results fileset; extensions will be
automatically added as required

Example:
This example saves results in "C:\mpi310-files

long GetXYPlotNumberOfCurves ( )
Gets number of curves of XY plot

Returns:
number of curves

Member Function Documentation 144


MPI Application Programming Interface

AddXYPlotCurve ( Object aEntities )


Adds curves to XY plot

Parameters:
aEntities curve objects to be
added

DeleteXYPlotCurve ( Object aEntities )


Deletes curves from XY plot

Parameters:
aEntities curve objects to be
deleted

SetEdgeDisplay ( long aEdgeDisplay )


Sets edge display option

Parameters:
aEdgeDisplay edge display option
• 0 - Off
• 1 - Feature edge
• 2 - Mesh edge

See also:
GetEdgeDisplay

Example:
This example sets edge display to
be 1.
Plot.SetEdgeDisplay( 1 )

long GetEdgeDisplay ( )
Gets edge display option

Returns:

• 0 - Off
• 1 - Feature edge
• 2 - Mesh edge

See also:
SetEdgeDisplay

Example:
This example gets edge display
option.
bEdge = Plot.GetEdgeDisplay()

long GetDataNbComponents ( )

Member Function Documentation 145


MPI Application Programming Interface
Gets number of components

Returns:
number of components, which could be 1, 3, or 6

Example:
This example gets number of components( =3 ) of "Average velocity"
plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Average velocity")
Plot.GetDataNbComponents()

long GetDataID ( )
Gets data set ID

Returns:
data set ID

Example:
This example gets plot ID of "Pressure"
plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Pressure")
Pid = Plot.GetDataID()

String GetDataType ( )
Gets data type string

Returns:
Data type string, which could be one of the
following
• LBDT
• LYDT
• NDDT
• ELDT
• NMDT
• TXDT
• HLDT

Example:
This example prints "NDDT" on screen
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Pressure")
DType = Plot.GetDataType()
MsgBox DType

Boolean RestoreOriginalPosition ( )
Restores plot original position

Returns:
True if successful

Member Function Documentation 146


MPI Application Programming Interface
Example:
This example restores the original position of the deformed part in a
deflection plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.RestoreOriginalPosition()

Boolean ApplyBestFit ( Object aNodes )


Applies best fit

Parameters:
aNodes EntityList object of nodes

Returns:
True if successful

Example:
This example applies best on a deflection plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.ApplyBestFit Nothing

double GetDeflectionScaleFactor ( )
Get deflection scale factor

Returns:
deflection scale factor

Example:
This example gets deflection scale factor for a given plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
val = Plot.GetDeflectionScaleFactor()

SetDeflectionScaleFactor ( double aFactor )


Sets deflection scale factor

Parameters:
aFactor deflection scale factor

Example:
This example sets deflection scale factor for a given plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.SetDeflectionScaleFactor 1.5

long GetDeflectionScaleDirection ( )
Get deflection scale direction

Returns:
deflection scale factor
0 -X

Member Function Documentation 147


MPI Application Programming Interface
1 -Y
2 -Z
3 - All directions

Example:
This example gets deflection scale direction for a given plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
val = Plot.GetDeflectionScaleDirection()

SetDeflectionScaleDirection ( long aDir )


Sets deflection scale direction

Parameters:
aDir scale direction
0 -X
1 -Y
2 -Z
3 - All directions

Example:
This example sets deflection scale direction for a given plot
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.SetDeflectionScaleDirection 3

Boolean GetDeflectionOverlayWithMesh ( )
Gets deflection overlay with mesh

Returns:
True if successful

Example:
This example gets the flag of deflection overlay with mesh
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
flag = Plot.GetDeflectionOverlayWithMesh()

SetDeflectionOverlayWithMesh ( Boolean aOverlay )


Sets deflection overlay with mesh

Parameters:
aOverlay True or False

Example:
This example sets the flag of deflection overlay with mesh to be
True
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.SetDeflectionOverlayWithMesh True

Boolean GetDeflectionShowAnchorPlane ( )

Member Function Documentation 148


MPI Application Programming Interface
Gets deflection show anchor plane flag

Returns:
True if successful

Example:
This example gets the flag of deflection show anchor plane
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
flag = Plot.GetDeflectionShowAnchorPlane()

SetDeflectionShowAnchorPlane ( Boolean aShow )


Sets deflection show anchor plane flag

Parameters:
aShow True or False

Example:
This example sets the flag of deflection show anchor plane to be
false
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.FindPlotByName("Deflection, all effects:Deflection")
Plot.SetDeflectionShowAnchorPlane False

Boolean WarpQueryBegin ( )
Start a warp query on a deflection plot

Returns:
TRUE if successful

Example:
This example queries on node 96 and node
358
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot()
Plot.WarpQueryBegin
Set DVec = Synergy.CreateDoubleArray()
Plot.WarpQueryNode 96, DVec
Plot.WarpQueryNode 358, DVec
Plot.WarpQueryEnd

WarpQueryEnd ( )
Ends a warp query on a deflection plot

Example:
This example queries on node 96 and node
358
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot()
Plot.WarpQueryBegin
Set DVec = Synergy.CreateDoubleArray()
Plot.WarpQueryNode 96, DVec

Member Function Documentation 149


MPI Application Programming Interface
Plot.WarpQueryNode 358, DVec
Plot.WarpQueryEnd

Boolean WarpQueryNode ( long aNodeID,


Object aRetValues
)
Queries a node on a deflection plot

Parameters:
aNodeID node ID
aRetValues returned query values (node coordinates before and after
deflection, and displacements)

Returns:
TRUE if successful

Example:
This example queries on node 96 and node 358
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot()
Plot.WarpQueryBegin
Set DVec = Synergy.CreateDoubleArray()
Plot.WarpQueryNode 96, DVec
Plot.WarpQueryNode 358, DVec
Plot.WarpQueryEnd

long GetProbePlotNumberOfProbeLines ( )
Return number of probe lines in the probe plot

Returns:
Number of probe lines

Example:
This example retrieves number of probe lines of a given
plot
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set probePlot = Viewer.ActivePlot()
nProbeLines = GetProbePlotNumberOfProbeLines

Boolean GetProbePlotProbeLine ( long aIndex,


Object aStartPt,
Object aEndPt
)
Returns the two end points of a probe line

Parameters:
aIndex probe line index
aStartPt probe line start point
aEndPt probe line end point

Member Function Documentation 150


MPI Application Programming Interface
Returns:
TRUE if successful

Example:
This example gets the first proble line in the
plot
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set probePlot = Viewer.ActivePlot()
Set VectorA = Synergy.CreateVector()
Set VectorB = Synergy.CreateVector()
Plot.GetProbePlotProbeLine 0, VectorA, VectorB

Boolean AddProbePlotProbeLine ( Object aStartPt,


Object aEndPt
)
Adds a probe line

Parameters:
aStartPt probe line start point
aEndPt probe line end point

Returns:
TRUE if successful

Example:
This example adds a probe line to the
plot
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set probePlot = Viewer.ActivePlot()
Set VectorA = Synergy.CreateVector()
Set VectorB = Synergy.CreateVector()
VectorA.SetXYZ -14.5647, 10.5087, 25
VectorB.SetXYZ -14.5647, 10.5087, -25
Plot.AddProbePlotProbeLine VectorA, VectorB
Plot.Regenerate

Boolean SetProbePlotProbeLine ( long aIndex,


Object aStartPt,
Object aEndPt
)
Modifies an existing probe line

Parameters:
aIndex probe line index
aStartPt probe line start point
aEndPt probe line end point

Returns:
TRUE if successful

Member Function Documentation 151


MPI Application Programming Interface
Example:
This example sets new start and end point to a given probe
line
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot()
Set VectorA = Synergy.CreateVector()
Set VectorB = Synergy.CreateVector()
VectorA.SetXYZ 0.00132512, -0.00195111, 0.0626239
VectorB.SetXYZ -0.00132512, 0.00195111, 0.0626239
Plot.SetProbePlotProbeLine 0, VectorA, VectorB

Boolean SaveResultInPatran2 ( String aBaseFileName,


String aUnitSysName
)
Saves result in a Patran file with a given unit system

Parameters:
aBaseFileName basename for the Patran results fileset; extensions will be
automatically added as required
aUnitSysName Unit system name as "English" or "Metric"

Returns:
True if successful

Example:
This example saves results in "C:\mpi_project\test.ele" in English unit
Set Plot = Viewer.ActivePlot()
Plot.SaveResultInPatran2 "C:\mpi_project\test.ele", "English"

Boolean SaveResultInXML2 ( String aFileName,


String aUnitSysName
)
Saves results in an XML file with a given unit system

Parameters:
aFilename XML file name
aUnitSysName Unit system name as "English" or "Metric"

Example:
This example saves results in "c:\mpi_project\result.xml" in
Metric.
Set Plot = Viewer.ActivePlot()
Plot.SaveResultInXML2 "C:\mpi_project\result.xml", "metric"

long GetNumberOfAnimationFrames ( )
Gets number of animation frames in a frame animation plot

Returns:
number of animation frames

Member Function Documentation 152


MPI Application Programming Interface
Example:
This example gets the number of animation frames
nFrames = Plot.GetNumberOfAnimationFrames()

long GetFirstAnimationFrameIndex ( )
Gets the index of the first animation frame in a frame animation plot

Returns:
frame index

Example:
This example gets the index of the first animation frame
iFrame = Plot.GetFirstAnimationFrameIndex()

Boolean SetFirstAnimationFrameIndex ( long aIndex )


Sets the index of the first animation frame in a frame animation plot

Returns:
TRUE if successful

Example:
This example sets the index of the first animation frame
Plot.SetFirstAnimationFrameIndex iFrame

long GetLastAnimationFrameIndex ( )
Gets the index of the last animation frame in a frame animation plot

Returns:
frame index

Example:
This example gets the index of the last animation frame
iFrame = Plot.GetLastAnimationFrameIndex()

Boolean SetLastAnimationFrameIndex ( long aIndex )


Sets the index of the last animation frame in a frame animation plot

Returns:
TRUE if successful

Example:
This example sets the index of the last animation frame
Plot.SetLastAnimationFrameIndex iFrame

Boolean SetNumberOfAnimationFrames ( long aNbFrames )


Sets number of animation frames in a frame animation plot

Parameters:
aNbFrames number of animation frames This example set the number of
animation frames to be 4

Member Function Documentation 153


MPI Application Programming Interface
Example:
This example sets number of frames to be 4
Plot.SetNumberOfAnimationFrames 4

Boolean SaveXYPlotCurveData ( String aFileName )


Saves XYPlot curve data in a text file

Parameters:
aFilename text file name

Example:
This example saves results in "c:\mpi
project\xycurves.txt".
Plot.SaveXYPlotCurveData "c:\mpi project\xycurves.txt"

Boolean SaveWarpedShapeInSTL ( String aFileName,


double aScaleFactor,
Boolean aBinary
)
Saves warped mesh in STL format

Parameters:
aFilename text file name
aScaleFactor scale factor. If aScaleFactor < 0, the deflection will be applied
in the opposite direction.
aBinary TRUE for binary format and FALSE for ASCII format

Example:
This example saves warped mesh in "c:\mpi project\wm.stl" with scale factor
1.0 in ASCII format and in the opposite direction.
Plot.SaveWarpedShapeInSTL "c:\mpi project\wm.stl", -1.0, False

Boolean SaveWarpedShapeInUDM ( String aFileName,


double aScaleFactor
)
Saves warped mesh in UDM format

Parameters:
aFilename text file name
aScaleFactor scale factor

Example:
This example saves warped mesh in "c:\mpi
project\wm.udm".
Plot.SaveWarpedShapeInUDM "c:\mpi project\wm.udm"

Boolean SaveWarpedShapeInSTL2 ( String aFileName,


double aScaleFactor,
Boolean aBinary,
String aUnitSysName

Member Function Documentation 154


MPI Application Programming Interface

)
Saves warped mesh in STL format

Parameters:
aFilename text file name
aScaleFactor scale factor. If aScaleFactor < 0, the deflection will be
applied in the opposite direction.
aBinary TRUE for binary format and FALSE for ASCII format
aUnitSysName Unit system name as "English" or "Metric", the default is "SI"

Example:
This example saves warped mesh in "c:\mpi project\wm.stl" with scale factor
1.0 in ASCII format, in the opposite direction and In English unit.
Plot.SaveWarpedShapeInSTL2 "c:\mpi project\wm.stl", -1.0, False, "English"

Boolean SetUseSingleColor ( Boolean aSingleColor )


Sets whether single color is used

Parameters:
aSingleColor use single color option This example set to use single
color.

Example:
Plot.SetUseSingleColor True

Boolean GetUseSingleColor ( )
Gets using single color option

Returns:
using single color option

See also:
SetUseSingleColor

Example:
This example gets using single color
option.
usingSingleColor = Plot.GetUseSingleColor

Member Function Documentation 155


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

PlotMgr Class Reference


This class is used to create, enumerate and fetch plots. More...

List of all members.

Public Methods
Object GetFirstPlot ()
Object GetNextPlot (Object aPlot)
Object CreatePlotByDsID (long aDsID, Boolean aIsXYPlot)
Object CreatePlotByName (String aPlotName, Boolean aIsXYPlot)
Object CreateXYPlotByName (String aPlotName)
DeletePlotByName (String aPlotName)
DeletePlotByDsID (long aDsID)
DeletePlot (Object aPlot)
Boolean DataHasXYPlotByDsID (long aDsID)
Boolean DataHasXYPlotByName (String aName)
Boolean GetScalarData (long aDsId, Object aIndpValues, Object aEntIDs, Object
aScalarData)
Boolean GetVectorData (long aDsId, Object aIndpValues, Object aEntIDs, Object aVa,
Object aVb, Object aVc)
Boolean GetTensorData (long aDsId, Object aIndpValues, Object aEntIDs, Object
aT11, Object aT22, Object aT33, Object aT12, Object aT13, Object aT23)
Boolean GetNonmeshData (long aDsId, Object aIndpValues, Object aNmData)
Object CreateUserPlot ()
long FindDatasetIdByName (String aName)
Object FindPlotByName (String aName)
long GetIndpVarCount (long aDsID)
Boolean GetIndpValues (long aDsID, Object aValues)
long GetDataNbComponents (long aDataID)
String GetDataType (long aDataID)
long FindDatasetIdsByName (String aName, Object aDsIDs)
long CreateAnchorPlane (long aNodeID1, long aNodeID2, long aNodeID3, String
aName)
Boolean ApplyAnchorPlane (long aAnchorIndex, Object aPlot)
Boolean SetAnchorPlaneNodes (long aAnchorIndex, long aNodeID1, long aNodeID2,
long aNodeID3)
long GetAnchorPlaneNode (long aAnchorIndex, long aNodeIndex)
Boolean SetAnchorPlaneName (long aAnchorIndex, String aName)
long GetNumberOfAnchorPlanes ()
Boolean DeleteAnchorPlaneByIndex (long aAnchorIndex)
Boolean SaveResultDataInXML (long aDataID, String aFileName)
Boolean DeleteAnchorPlaneByName (String aAnchorName)
String GetDataDisplayFormat (long aDsID)
Boolean SetDataDisplayFormat (long aDsID, String aFormatStr)

PlotMgr Class Reference 156


MPI Application Programming Interface
WarpQueryEnd ()
Boolean WarpQueryNode (long aNodeID, long aAnchorIndex, Object aRetValues)
Boolean WarpQueryBegin (long aDsID, Object aIndpValues)
Boolean SaveResultDataInXML2 (long aDataID, String aFileName, String
aUnitSysName)
long GetAnchorPlaneIndex (String aName)
Boolean MarkResultForExport (String aRltName, Boolean aExport)
Boolean MarkAllResultsForExport (Boolean aExport)
Boolean AddDefaultPlots ()
Boolean SaveResultDataInPatran (long aDataID, String aFileName, String
aUnitSysName)
long GetNumberOfResultsFiles ()
String GetResultsFileName (long aResultsFileIndex)
Object FindPlotByName2 (String aPlotName, String aDataName)

Detailed Description
You can use this class to create plots, delete plots, fetch plots in the study and query
plot "type" information

See also:
Synergy::PlotManager

Member Function Documentation

Object GetFirstPlot ( )
Gets the first plot in the study

Returns:
Plot object that corresponds to the first
plot

Example:
This example displays the first plot
Set Viewer = Synergy.Viewer()
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.GetFirstPlot()
Viewer.ShowPlot Plot

Object GetNextPlot ( Object aPlot )


Gets the next plot in the study

Parameters:
aPlot Plot object

Returns:
Plot object that corresponds to the next plot in the

Public Methods 157


MPI Application Programming Interface
study

Example:
This example displays the second plot
Set Viewer = Synergy.Viewer()
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.GetFirstPlot()
Set Plot1= PlotMgr.GetNextPlot( Plot )
Viewer.ShowPlot Plot1

Object CreatePlotByDsID ( long aDsID,


Boolean aIsXYPlot
)
Creates a plot from a dataset ID

Parameters:
aDsID dataset ID
aIsXYPlot whether an XY plot needs to be created (only if this dataset
supports XY plots)

Returns:
Plot object that corresponds to the created plot

Example:
This example creates a Fill Time (1610) plot
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set Plot = PlotMgr.CreatePlotByDsID(1610, 0)
Viewer.ShowPlot Plot

Object CreatePlotByName ( String aPlotName,


Boolean aIsXYPlot
)
Creates a new plot by name

Parameters:
aPlotName plot name
aIsXYPlot whether an XY plot needs to be created (only if this dataset
supports XY plots)

Example:
This example creates a pressure plot
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set Plot = PlotMgr.CreatePlotByName("Pressure", 0)
Viewer.ShowPlot Plot

Object CreateXYPlotByName ( String aPlotName )


Creates a XY plot by name

Member Function Documentation 158


MPI Application Programming Interface
Parameters:
aPlotName XY plot name

Returns:
Plot object that corresponds to the created
plot

Example:
This example creates a pressure XY plot
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set Plot = PlotMgr.CreateXYPlotByName("Pressure")
Viewer.ShowPlot Plot

DeletePlotByName ( String aPlotName )


Deletes a plot by name

Parameters:
aPlotName name of the plot to be
deleted

See also:
DeletePlotByDsID

Example:
This example deletes first plot.
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.GetFirstPlot()
PlotName = Plot.GetName()
PlotMgr.DeletePlotByName PlotName

DeletePlotByDsID ( long aDsID )


Deletes a plot by dataset ID

Parameters:
aDSID dataset ID of the plot to be
deleted

See also:
DeletePlotByName

Example:
This example deletes first plot.
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.GetFirstPlot()
PlotMgr.DeletePlotByDsID PlotName

DeletePlot ( Object aPlot )


Deletes a plot

Parameters:

Member Function Documentation 159


MPI Application Programming Interface
aPlot Plot object that corresponds to the plot to be deleted

Note:
You cannot use the plot object after it has been deleted, e.g., as a parameter
in the GetNextPlot function

See also:
DeletePlotByDsID , DeletePlotByName

Example:
This example deletes first plot.
Set PlotMgr = Synergy.PlotManager()
Set Plot = PlotMgr.GetFirstPlot()
PlotMgr.DeletePlot Plot

Boolean DataHasXYPlotByDsID ( long aDsID )


Returns whether a given dataset can be used to create XY plots

Parameters:
aDsID dataset ID

See also:
DataHasXYPlotByName

Boolean DataHasXYPlotByName ( String aName )


Returns whether a given dataset can be used to create XY plots

Parameters:
aName dataset name

Returns:
True if XY plot is available for the data

See also:
DataHasXYPlotByName

Boolean GetScalarData ( long aDsId,


Object aIndpValues,
Object aEntIDs,
Object aScalarData
)
Retrieves scalar data from given data set

Parameters:
aDsId DataSet ID
aIndpValue Independ value
aEntIDs IntegerArray of elements ID
aScalarData DoubleArray of data

Returns:

Member Function Documentation 160


MPI Application Programming Interface

True if successful

Example:
This example gets result data 1190 (Pressure (end of
filling))
Set IndpValues = Synergy.CreateDoubleArray()
Set node_1 = Synergy.CreateIntegerArray()
Set p_1 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1190, IndpValues, node_1, p_1

Boolean GetVectorData ( long aDsId,


Object aIndpValues,
Object aEntIDs,
Object aVa,
Object aVb,
Object aVc
)
Retrieves vector data from given data set

Parameters:
aDsId DataSet ID
aIndpValue Independ value
aEntIDs IntegerArray of elements ID
aVa DoubleArray of first data
aVb DoubleArray of second data
aVc DoubleArray of third data

Returns:
True if successful

Example:
This example gets average velocity result
data
Set IndpValues = Synergy.CreateDoubleArray()
PlotMgr.GetIndpValues 1420, IndpValues
Set Ind = Synergy.CreateDoubleArray()
Ind.AddDouble IndpValues.Val( IndpValues.Size - 1 )
Set node_1 = Synergy.CreateIntegerArray()
Set P1 = Synergy.CreateDoubleArray()
Set P2 = Synergy.CreateDoubleArray()
Set P3 = Synergy.CreateDoubleArray()
PlotMgr.GetVectorData 1420, Ind, node_1, P1, P2, P3

Boolean GetTensorData ( long aDsId,


Object aIndpValues,
Object aEntIDs,
Object aT11,
Object aT22,
Object aT33,
Object aT12,
Object aT13,
Object aT23

Member Function Documentation 161


MPI Application Programming Interface

)
Retrieves tensor data from given data set

Parameters:
aDsId DataSet ID
aIndpValue Independ value
aEntIDs IntegerArray of elements ID
aT11 11 component values
aT22 22 component values
aT33 33 component values
aT33 12 component values
aT33 13 component values
aT33 23 component values

Returns:
True if successful

Example:
This example gets tensor result data 4000 (Average fiber
orientation)
Set IndpValues = Synergy.CreateDoubleArray()
PlotMgr.GetIndpValues 4000, IndpValues
Set Ind = Synergy.CreateDoubleArray()
Ind.AddDouble IndpValues.Val( IndpValues.Size - 1 )
Set node_1 = Synergy.CreateIntegerArray()
Set P11 = Synergy.CreateDoubleArray()
Set P22 = Synergy.CreateDoubleArray()
Set P33 = Synergy.CreateDoubleArray()
Set P12 = Synergy.CreateDoubleArray()
Set P13 = Synergy.CreateDoubleArray()
Set P23 = Synergy.CreateDoubleArray()
PlotMgr.GetTensorData 4000, Ind, node_1, P11, P22, P33, P12, P13, P23

Boolean GetNonmeshData ( long aDsId,


Object aIndpValues,
Object aNmData
)
Gets non-mesh data

Parameters:
aDsId DataSet ID
aIndpValue Independ value
aNmData Non-mesh data

Returns:
True if successful

Example:
This example gets non-mesh data from 1150
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set IndpValues = Synergy.CreateDoubleArray()

Member Function Documentation 162


MPI Application Programming Interface
IndpValues.AddDouble(0.164757)
Set values = Synergy.CreateDoubleArray()
PlotMgr.GetNonmeshData 1150, IndpValues, values

Object CreateUserPlot ( )
Creates user plot

Returns:
Plot object

Example:
See
UserPlot::SetScalarData

long FindDatasetIdByName ( String aName )


Finds dataset ID by name

Parameters:
aName Dataset
name

Returns:
Dataset ID

Example:
See
DataTransform::Func

Object FindPlotByName ( String aName )


Finds plot by name

Parameters:
aName Plot name

Returns:
Plot object

Example:
This example changes plot value range and recreate,
Set Plot = PlotMgr.FindPlotByName( "Pressure (end of filling)")
Plot.SetScaleOption 2
Plot.SetMinValue 400
Plot.SetMaxValue 2e+007
Plot.Regenerate

long GetIndpVarCount ( long aDsID )


Returns independent variable count

Parameters:
aDsID Dataset ID

Member Function Documentation 163


MPI Application Programming Interface
Returns:
Independent variable count

Example:
See UserPlot::AddVectorData

Boolean GetIndpValues ( long aDsID,


Object aValues
)
Gets independent variable values

Parameters:
aDsID Dataset ID
aValues DoubleArray to hold independent variable values

Returns:
True if successful

Example:
This example gets independent variable values from dataset
1420.
Set IndpValues = Synergy.CreateDoubleArray()
PlotMgr.GetIndpValues 1420, IndpValues

long GetDataNbComponents ( long aDataID )


Gets number of components of given data set

Parameters:
aDataID Data set ID

Returns:
number of components, which could be 1, 3
or 6

Example:
This example displays 3
Num = PlotMgr.GetDataNbComponents( 1420 )
MsgBox Num

String GetDataType ( long aDataID )


Gets data type of given data set

Parameters:
aDataID Data set ID

Returns:
Data type string, which can be one of the
following
• LBDT
• LYDT

Member Function Documentation 164


MPI Application Programming Interface
• NDDT
• ELDT
• NMDT
• TXDT
• HLDT

Example:
See UserPlot::AddVectorData

long FindDatasetIdsByName ( String aName,


Object aDsIDs
)
Finds all data set IDs by name

Parameters:
aName Plot name

Returns:
Number of data set IDs found

Example:
This example finds the number of data set ID with name "Bulk temperature
(end of filling)"
Set lIds = Synergy.CreateIntegerArray()
lCount = PlotMgr.FindDataSetIDsByName("Bulk temperature (end of filling)", lIds)
If lCount > 1 then
MsgBox "There are " & lCount & "data set ID with this name"
End If

long CreateAnchorPlane ( long aNodeID1,


long aNodeID2,
long aNodeID3,
String aName
)
Creates anchor plane at given nodes

Parameters:
aNodeID1 First node ID
aNodeID2 Second node ID
aNodeID3 Third node ID
aName Anchor plane name

Returns:
Total number of anchor plane, -1 if failed

Example:
This example creates anchor plane at node 12, 14, 15 named "First Anchor
Plane"
PlotMgr.CreateAnchorPlane 12, 14, 15, "First Anchor Plane"

Member Function Documentation 165


MPI Application Programming Interface

Boolean ApplyAnchorPlane ( long aAnchorIndex,


Object aPlot
)
Applies a anchor plane on a given plot

Parameters:
aAnchorIndex anchor plane index
aPlot Plot object

Returns:
True if successful

Example:
This example applies anchor plane 1 to plot "Deflection, all
effects"
PlotMgr.ApplyAnchorPlane 1, Plot

Boolean SetAnchorPlaneNodes ( long aAnchorIndex,


long aNodeID1,
long aNodeID2,
long aNodeID3
)
Sets anchor plane nodes

Parameters:
aAnchorIndex anchor plane index
aNodeID1 first node
aNodeID2 second node
aNodeID3 third node

Returns:
True if successful

Example:
This example sets anchor plane 1 to use node 145,
13, 45
PlotMgr.SetAnchorPlaneNode 1, 145, 13, 45

long GetAnchorPlaneNode ( long aAnchorIndex,


long aNodeIndex
)
Gets anchor plane node ID at given index

Parameters:
aAnchorIndex anchor plane index
aNodeIndex node index

Returns:
Node ID

Member Function Documentation 166


MPI Application Programming Interface
Example:
This example gets first node ID of anchor
plane 1
id = PlotMgr.GetAnchorPlaneNode 1, 1

Boolean SetAnchorPlaneName ( long aAnchorIndex,


String aName
)
Sets anchor plane name

Parameters:
aAnchorIndex anchor plane index
aName anchor plane name

Returns:
True if successful

Example:
This example names anchor plane 1 as "Test
Plane"
PlotMgr.SetAnchorPlaneName 1, "Test Plane"

long GetNumberOfAnchorPlanes ( )
Gets number of anchor plane

Returns:
number of anchor plane

Example:
This example gets number of anchor
plane
count = PlotMgr.GetNumberOfAnchorPlanes()
MsgBox count

Boolean DeleteAnchorPlaneByIndex ( long aAnchorIndex )


Deletes a given anchor plane by index

Parameters:
aAnchorIndex index of anchor
plane

Returns:
True if successful

Example:
This example deletes anchor
plane 1
PlotMgr.DeleteAnchorPlaneByIndex 1

Member Function Documentation 167


MPI Application Programming Interface

Boolean SaveResultDataInXML ( long aDataID,


String aFileName
)
Saves result data in XML file

Parameters:
aDataID result data ID
aFileName XML file name

Returns:
True if successful

Example:
This example saves result 1465 into
"C:\temp\Test.xml"
Set PlotMgr=Synergy.PlotManager()
PlotMgr.SaveResultDataInXML 1465, "C:\temp\Test.xml"

Boolean DeleteAnchorPlaneByName ( String aAnchorName )


Deletes a given anchor plane by name

Parameters:
aAnchorName name of anchor plane

Returns:
True if successful

Example:
This example deletes anchor plane "My anchor
plane"
PlotMgr.DeleteAnchorPlaneByName "My anchor plane"

String GetDataDisplayFormat ( long aDsID )


Gets the display format on the legend bar

Parameters:
aDsID dataset ID

Returns:
String the format string (C-Style format string)

Example:
This example gets display format for the dataset in the active
plot
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot
Set PlotMgr = Synergy.PlotManager()
sFormat = PlotMgr.GetDataDisplayFormat(Plot.GetDataID())
MsgBox sFormat

Member Function Documentation 168


MPI Application Programming Interface

Boolean SetDataDisplayFormat ( long aDsID,


String aFormatStr
)
Sets the display format on the legend bar

Parameters:
aDsID dataset ID
aFormatStr the format string(C-style format string)

Returns:
True if successful

Example:
This example sets display format for the dataset in the active
plot
Set Synergy = CreateObject("synergy.Synergy")
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot
Set PlotMgr = Synergy.PlotManager()
PlotMgr.SetDataDisplayFormat Plot.GetDataID(), "%.10G"

WarpQueryEnd ( )
Ends query on a warp dataset

Example:
This example queries displacement values in the first anchor plane on node
100
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set queryValues = Synergy.CreateDoubleArray()
PlotMgr.WarpQueryBegin 6250, Nothing
PlotMgr.WarpQueryNode 100, 1, queryValues
PlotMgr.WarpQueryEnd

Boolean WarpQueryNode ( long aNodeID,


long aAnchorIndex,
Object aRetValues
)
Queries on a node

Parameters:
aNodeID data set id
aAnchorIndex anchor plane index. If the index is invalid, only the
displacement components in global coordinate system are
returned
aRetValues returned query values (node coordinates and displacements in
global and local coordinate systems)

Note: If anchor plane is specified, the return array contains 18 values which are the
following values:
Index 0, 1, 2: X, Y, Z coordinates in global coordinate system before deflection

Member Function Documentation 169


MPI Application Programming Interface
Index 3, 4, 5: X, Y, Z coordinates in global coordinate system after deflection
Index 6, 7, 8: X, Y, Z coordinates in local coordinate system before deflection
Index 9, 10, 11: X, Y, Z coordinates in local coordinate system after deflection
Index 12, 13, 14: X, Y, Z displacement components in global coordinate system
Index 15, 16, 17: X, Y, Z displacement components in local coordinate system
otherwise, the return array contains 9 values which are the following values:
Index 0, 1, 2: X, Y, Z coordinates in global coordinate system before deflection
Index 3, 4, 5: X, Y, Z coordinates in global coordinate system after deflection
Index 6, 7, 8: X, Y, Z displacement components in global coordinate system

Returns:
True if successful

Example:
This example queries displacement values in the first anchor plane on node
100
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set queryValues = Synergy.CreateDoubleArray()
PlotMgr.WarpQueryBegin 6250, Nothing
PlotMgr.WarpQueryNode 100, 1, queryValues
PlotMgr.WarpQueryEnd

Boolean WarpQueryBegin ( long aDsID,


Object aIndpValues
)
Start queries on a specified warp dataset

Parameters:
aDsID data set id
aIndpValues independent variable values

Returns:
TRUE is successful

Example:
This example queries displacement values in the first anchor plane on node
100
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set queryValues = Synergy.CreateDoubleArray()
PlotMgr.WarpQueryBegin 6250, Nothing
PlotMgr.WarpQueryNode 100, 1, queryValues
PlotMgr.WarpQueryEnd

Boolean SaveResultDataInXML2 ( long aDataID,


String aFileName,
String aUnitSysName
)
Saves result data in XML file with given unit

Parameters:

Member Function Documentation 170


MPI Application Programming Interface
aDataID result data ID
aFileName XML file name
aUnitSysName Unit name, Metric or English

Returns:
True if successful

Example:
This example saves result 1465 into "C:\temp\Test.xml"
Set PlotMgr=Synergy.PlotManager()
PlotMgr.SaveResultDataInXML 1465, "C:\temp\Test.xml", "English"

long GetAnchorPlaneIndex ( String aName )


Finds anchor plane index from the given anchor plane name

Parameters:
aName anchor plane name

Returns:
anchor index if successful, otherwise return -1

Example:
This example gets the index of anchor plane "My
Anchor"
index = PlotMgr.GetAnchorPlaneIndex("My Anchor")

Boolean MarkResultForExport ( String aRltName,


Boolean aExport
)
Marks a result for export

Parameters:
aRltName result name
aExport True for marking and False for
unmarking

Returns:
True for successful setting

Example:
This example marks Fill time result for export
PlotManager.MarkResultForExport "Fill time", True

Boolean MarkAllResultsForExport ( Boolean aExport )


Marks all results for export (up to the limit of allowable results)

Parameters:
aExport True for marking and False for unmarking

Returns:

Member Function Documentation 171


MPI Application Programming Interface
True for successful setting

Example:
This example unmarks all results for export
PlotManager.MarkAllResultsForExport True

Boolean AddDefaultPlots ( )
Add all default plots in the study

Example:
This example add all of the default
plots
PlotMgr.AddDefaultPlots()

Boolean SaveResultDataInPatran ( long aDataID,


String aFileName,
String aUnitSysName
)
Save result data in Patran file with given unit

Parameters:
aDataID result data ID
aFileName Patran file name
aUnitSysName Unit name, Metric or English

Returns:
True if successful

Example:
This example save result 1180 into "d:\temp\pressure"
Set PlotMgr=Synergy.PlotManager()
PlotMgr.SaveResultDataInPatran 1180, "d:\temp\pressure", "Metric"

long GetNumberOfResultsFiles ( )
Gets number of results files

Returns:
number of results files

Example:
This example gets number of results
files
count = PlotMgr.GetNumberOfRdbFiles()
MsgBox count

String GetResultsFileName ( long aResultsFileIndex )


Gets results file name

Parameters:
aResultsFileIndex results file index

Member Function Documentation 172


MPI Application Programming Interface
Returns:
results file name

Example:
This example gets the file name at the given index
rdbFileName = PlotMgr.GetResultsFileName(aResultsFileIndex)

Object FindPlotByName2 ( String aPlotName,


String aDataName
)
Finds plot by name, including the visible name and the name of the data source for the
plot

Parameters:
aPlotName Displayed Plot name
aDataName Data source name

Returns:
Plot object

Example:
This example displays a plot which is externally named "Time to reach ejection
temperature" and is generated from the internal data "Time to freeze"
Set Plot = PlotMgr.FindPlotByName2("Time to reach ejection temperature", "Time to freez
Viewer.ShowPlot Plot

Member Function Documentation 173


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Predicate Class Reference


This class is used to specify predicates to populate entity lists. More...

List of all members.

Detailed Description
You can use objects of this class as inclusion criteria to populate EntList objects.
Predicates can be created using the PredicateManager class

Predicate Class Reference 174


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

PredicateManager Class Reference


This class is used to create Predicate objects. More...

List of all members.

Public Methods
Object CreateLabelPredicate (String aStr)
Object CreatePropertyPredicate (long aTsetID, long aSubID)
Object CreatePropTypePredicate (long aTsetID)
Object CreateThicknessPredicate (double aMin, double aMax)
Object CreateBoolAndPredicate (Object aLeft, Object aRight)
Object CreateBoolOrPredicate (Object aLeft, Object aRight)
Object CreateBoolNotPredicate (Object aPred)
Object CreateBoolXorPredicate (Object aLeft, Object aRight)
Object CreateXSectionPredicate (String aType, Object aMin, Object aMax)

Detailed Description
You can use this class and its member function to create predicates for selecting
entities by label ranges, thickness ranges, cross sections, etc., and combine them with
boolean operations to create advanced predicates

See also:
Synergy::PredicateManager

Member Function Documentation

Object CreateLabelPredicate ( String aStr )


Creates a predicate for a label range

Parameters:
aStr label range of the form prefix[lower limit]:[upper limit]; entity prefixes
are:
• Nodes: N
• Beams: B
• Triangles: T
• Tetrahedral elements: TE
• Curves: C
• Surfaces: S
• Regions: R

PredicateManager Class Reference 175


MPI Application Programming Interface
• STL envelopes: STL
• Nodal boundary conditions: NBC
• Surface/element boundary conditions: SBC
• Local coordinate systems: LCS

Returns:
Predicate object

See also:
EntList::SelectFromPredicate

Example:
This example selects nodes N23 to N100 and assigns them to layer L5.

' Select nodes using a predicate


Set PredicateManager = Synergy.PredicateManager()
Set Predicate1 = PredicateManager.CreateLabelPredicate("N23:N100")
Set LayerManager = Synergy.LayerManager()
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromPredicate Predicate1
' Get layer
Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L5 "
' Assign
LayerManager.AssignToLayer EntList_1, EntList

Object CreatePropertyPredicate ( long aType,


long aID
)
Creates a predicate for a property

Parameters:
aType property type
aID property ID

Returns:
Predicate object

See also:
CreatePropTypePredicate , EntList::SelectFromPredicate

Example:
This example selects entities that have been assigned the property of the type
40800 (part surface - midplane) and ID 1.

Set PredicateManager = Synergy.PredicateManager()


Set Predicate1 = PredicateManager.CreatePropertyPredicate(40800, 1)
EntList_1.SelectFromPredicate Predicate1

Object CreatePropTypePredicate ( long aType )


Creates a predicate for a property type

Member Function Documentation 176


MPI Application Programming Interface
Parameters:
aType property type

Returns:
Predicate object

See also:
CreatePropertyPredicate , EntList::SelectFromPredicate

Example:
This example selects entities that have be assigned a property type of 40800
(part surface - midplane).

Set PredicateManager = Synergy.PredicateManager()


Set Predicate1 = PredicateManager.CreatePropTypePredicate(40800)
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromPredicate Predicate1

Object CreateThicknessPredicate ( double aMin,


double aMax
)
Creates a predicate for a thickness range

Parameters:
aMin minimum thickness
aMax maximum thickness

Returns:
Predicate object

See also:
EntList::SelectFromPredicate

Example:
This examples selects entities with thickness between 1
and 5.

Set PredicateManager = Synergy.PredicateManager()


Set Predicate1 = PredicateManager.CreateThicknessPredicate(1, 5)
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromPredicate Predicate1

Object CreateBoolAndPredicate ( Object aLeft,


Object aRight
)
Creates a predicate from two predicates using a boolean AND operation An entity
satisfies the AND predicate if it satisfies both its "child" predicates

Parameters:
aLeft Predicate object
aRight Predicate object

Member Function Documentation 177


MPI Application Programming Interface
Returns:
Predicate object that corresponds to the AND predicate

See also:
EntList::SelectFromPredicate

Example:
This example selects triangles with labels ranging from T1 to T35 and
thicknesses ranging from 1 and 5.

Set Predicate1 = PredicateManager.CreateThicknessPredicate(1, 5)


Set Predicate2 = PredicateManager.CreateLabelPredicate("T1:35")
Set Predicate = PredicateManager.CreateBoolAndPredicate( Predicate1, Predicate2 )

Object CreateBoolOrPredicate ( Object aLeft,


Object aRight
)
Creates a predicate from two predicates using a boolean OR operation An entity
satisfies the OR predicate if it satisfies either one of its "child" predicates

Parameters:
aLeft Predicate object
aRight Predicate object

Returns:
Predicate object that corresponds to the OR predicate

See also:
EntList::SelectFromPredicate

Example:
This example select entities that either have thicknesses from 1 to 5 or labels
ranging from T1 to T35.

Set Predicate1 = PredicateManager.CreateThicknessPredicate(1, 5)


Set Predicate2 = PredicateManager.CreateLabelPredicate("T1:35")
Set Predicate = PredicateManager.CreateBoolOrPredicate( Predicate1, Predicate2 )

Object CreateBoolNotPredicate ( Object aPred )


Creates a predicate from a given predicate using a boolean NOT operation An entity
satisfies the NOT predicate if it does not satisfy the "child" predicate

Parameters:
aPred Predicate object

Returns:
Predicate object

See also:
EntList::SelectFromPredicate

Member Function Documentation 178


MPI Application Programming Interface
Example:
This examples selects entities with thicknesses < 1 or > 5.

Set Predicate1 = PredicateManager.CreateThicknessPredicate(1, 5)


Set Predicate = PredicateManager.CreateBoolNotPredicate( Predicate1)

Object CreateBoolXorPredicate ( Object aLeft,


Object aRight
)
Creates a predicate from two predicates using a boolean XOR operation An entity
satisfies the XOR predicate if it satisfies exactly one of its "child" predicates

Parameters:
aLeft Predicate object
aRight Predicate object

Returns:
Predicate object that corresponds to the XOR predicate

See also:
EntList::SelectFromPredicate

Example:
This example selects entities with thickness between 1 and 5 or labels ranging
from T1 to T35, excluding those entities that satisfy both conditions or do not
satisfy either condition
Set Predicate1 = PredicateManager.CreateThicknessPredicate(1, 5)
Set Predicate2 = PredicateManager.CreateLabelPredicate("T1:35")
Set Predicate = PredicateManager.CreateBoolXorPredicate( Predicate1, Predicate2 )

Object CreateXSectionPredicate ( String aType,


Object aMin,
Object aMax
)
Creates a predicate for a specified cross section

Parameters:
aType cross-section type
aMin DoubleVector that specifies minimum values for parameters defining the
cross section
aMax DoubleVector that specifies maximum values for parameters defining the
cross section
Please refer to the following table for required parameters:
Cross Section Type Parameters Required
Circular Diameter
Rectangular Width, Height
Annular Outer diameter, Inner diameter
Half-Circular Diameter, Height

Member Function Documentation 179


MPI Application Programming Interface

U-shape Width, Height


Trapezoidal Top width, Bottom width, Height

Returns:
Predicate object

Example
This example select entities with a trapezoidal cross-section with top width
between 0.01 and 0.1, bottom width between 0.01 and 0.1 and height between
0.01 and 0.02.

Set PredicateManager = Synergy.PredicateManager()


Set MinArray = Synergy.CreateDoubleArray()
MinArray.AddDouble(0.01)
MinArray.AddDouble(0.01)
MinArray.AddDouble(0.01)
Set MaxArray = Synergy.CreateDoubleArray()
MaxArray.AddDouble(0.1)
MaxArray.AddDouble(0.1)
MaxArray.AddDouble(0.02)
Set Predicate = PredicateManager.CreateXSectionPredicate("Trapezoidal", MinArray, MaxAr
Set EntList_1 = LayerManager.CreateEntityList()
EntList_1.SelectFromPredicate Predicate

Member Function Documentation 180


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Project Class Reference


This class is used to manipulate MPI projects. More...

List of all members.

Public Methods
Boolean Close ()
Boolean SaveAll ()
Boolean NewStudy (String aName)
Boolean NewFolder (String aName)
Boolean Compact ()
Boolean Export (String aFile, Boolean aSelected, Boolean aResults)
Boolean Export2 (String aFile, Boolean aSelected, Boolean aResults, String
aCriteriaFile, Boolean aRestrict)
Boolean ExportModel (String aFile)
Boolean DuplicateStudyByName (String aName)
Boolean DeleteItemByName (String aName, String aType)
Boolean RenameItemByName (String aName, String aType, String aNewName)
Boolean OpenItemByName (String aName, String aType)
Boolean OpenItemByIndex (long aIndex)
Boolean OpenItemCompareMode (PROJITEM aItem)
Boolean RenameItemByIndex (long aIndex, String aNewName)
Boolean DeleteItemByIndex (long aIndex)
Boolean DuplicateStudyByIndex (long aIndex)
String GetFirstStudyName ()
String GetNextStudyName (String aName)
String GetFirstReportName ()
String GetNextReportName (String aName)
Boolean DuplicateStudyByName2 (String aName, Boolean aSave)
Boolean DuplicateStudyByIndex2 (long aIndex, Boolean aSave)
Boolean ScheduleCheckOnStudy (String aServer, String aStudy, long aJobType,
Boolean aRunNow, Boolean aPrompts)
Boolean ScheduleAnalysisOnStudy (String aServer, String aStudy, long aJobType,
Boolean aRunNow, Boolean aPrompts)
Boolean ExportModel2 (String aFile, long aUnitID)
Boolean ScheduleMeshOnStudy (String aServer, String aStudy, long aJobType,
Boolean aRunNow, Boolean aPrompts)

Public Attributes
String Path
Path of the current project.

Project Class Reference 181


MPI Application Programming Interface

Detailed Description
You can use this class to open and close studies, export studies or the project, delete
and rename project items, etc.

See also:
Synergy::Project

Member Function Documentation

Boolean Close ( )
Closes current project

Returns:
True if successful; False otherwise

Example:
This example closes the current
project.

Set Project = Synergy.Project()


Project.Close

Boolean SaveAll ( )
Saves all open documents

Returns:
True if successful; False otherwise

Example:
This example saves all the open documents in the
project.

Set Project = Synergy.Project()


Project.SaveAll

Boolean NewStudy ( String aName )


Creates a new study in the current project

Parameters:
aName study name

Returns:
True if successful; False otherwise

Example

Public Attributes 182


MPI Application Programming Interface
This example creates a new study called "My Study" in
the current project.

Set Project = Synergy.Project()


Project.NewStudy "My Study"

Boolean NewFolder ( String aName )


Creates a new folder in the current project

Parameters:
aName folder name

Returns:
True if successful; False otherwise

Example
This example creates a new folder called "My Folder" in the current
project.

Set Project = Synergy.Project()


Project.NewFolder "My Folder"

Boolean Compact ( )
Compacts current project by removing redundant restart files

Returns:
True if successful; False otherwise

Example:
This example compacts the current project.

Set Project = Synergy.Project()


Project.Compact

Boolean Export ( String aFile,


Boolean aSelected,
Boolean aResults
)
Exports current project into a file

Parameters:
aFile name of file
aSelected specify True to export selected items only; False to export all
items
aResult specify True to export results too

Returns:
True if successful; False otherwise

Example

Member Function Documentation 183


MPI Application Programming Interface
This example exports the entire project along with results.

Set Project = Synergy.Project()


Project.Export "C:\My MPI 4.0 Projects\scripts\exp.zip", False, True

Boolean Export2 ( String aFile,


Boolean aSelected,
Boolean aResults,
String aCriteriaFile,
Boolean aRestrict
)
Exports current project into a file

Parameters:
aFile name of file
aSelected specify True to export selected items only; False to export all items
aResult specify True to export results too
aCriteriaFile name of criteria file to include
aRestrict specify True to restrict the exported file based on criteria contents (onl
export)

Returns:
True if successful; False otherwise

Example
This example exports the entire project along with results.

Set Project = Synergy.Project()


Project.Export2 "C:\My MPI 6.2 Projects\scripts\exp.zip", False, True, "C:\My MPI 6.2 P

Boolean ExportModel ( String aFile )


Exports current study into a file

Parameters:
aFile name of file

Returns:
True if successful; False otherwise

Note:
The format of the exported file is automatically determined from the file
extension

Example:
This example exports the current model into an mfl file.

Set Project = Synergy.Project()


Project.ExportModel "C:\My MPI 4.0 Projects\export.mfl"

Boolean DuplicateStudyByName ( String aName )

Member Function Documentation 184


MPI Application Programming Interface
Duplicates a study by its name, it duplicates unsaved study

Parameters:
aName name of the study to duplicate

Returns:
True if successful; False otherwise

Note:
MPI tries to prevent you from duplicating study names in the project; however
if you have duplicated study or report names in your project, this function will
duplicate the first item that matches the name

Example
This example duplicates the study named "My Study".

Set Project = Synergy.Project()


Project.DuplicateStudyByName "My Study"

Boolean DeleteItemByName ( String aName,


String aType
)
Deletes an item by its name

Parameters:
aName name of the item to be deleted
aType specify:
• Study to open a study, and
• Report to open a report

Returns:
True if successful; False otherwise

Note:
MPI tries to prevent you from duplicating study names in the project; however
if you have duplicated study or report names in your project, this function will
delete the first item that matches the name

Example:
This example deletes project the study named "My Study".

Set Project = Synergy.Project()


Project.DeleteItemByName "My Study", "Study"

Boolean RenameItemByName ( String aName,


String aType,
String aNewName
)
Renames an item by its name

Parameters:

Member Function Documentation 185


MPI Application Programming Interface

aName name of the item


aType specify:
• Study to open a study, and
• Report to open a report
aNewName new name of the item

Returns:
True if successful; False otherwise

Note:
MPI tries to prevent you from duplicating study names in the project; however
if you have duplicated study or report names in your project, this function will
rename the first item that matches the name

Example:
This example renames the study "My Study" to be "My New Study".

Set Project = Synergy.Project()


Project.RenameItemByName "My Study", "Study", "My New Study"

Boolean OpenItemByName ( String aName,


String aType
)
Opens an item in the project by its name

Parameters:
aName the name of the study or the report
aType specify:
• Study to open a study, and
• Report to open a report

Returns:
True if successful; False otherwise

Note:
MPI tries to prevent you from duplicating study names in the project; however
if you have duplicated study or report names in your project, this function will
open the first item that matches the name

Example
This example opens a study named "My Study".

Set Project = Synergy.Project()


Project.OpenItemByName "My Study", "Study"

Boolean OpenItemByIndex ( long aIndex )


Opens an item in the project by its index

Parameters:
aIndex index of the item to open

Member Function Documentation 186


MPI Application Programming Interface
Returns:
True if successful; False otherwise

Note:
This function is mainly used during macro recording only when you have
duplicate item names in the project. The index associated with an item can
change when a project is re-opened after an item is deleted, etc. It is
recommended that you use OpenItemByName instead

Example
This example opens the item in the project at index 4.

Set Project = Synergy.Project()


Project.OpenItemByIndex 4

Boolean OpenItemCompareMode ( PROJITEM aItem )


Opens an item in the project in model compare mode

Parameters:
aItem the item to open

Note:
Only available in Enterprise mode.

Returns:
True if successful; False otherwise

Boolean RenameItemByIndex ( long aIndex,


String aNewName
)
Renames an item by its index

Parameters:
aIndex index of the item to be renamed
aNewName The new name of the item

Returns:
True if successful; False otherwise

Note:
This function is mainly used during macro recording only when you have
duplicate item names in the project. The index associated with an item can
change when a project is re-opened after an item is deleted, etc. It is
recommended that you use RenameItemByName instead

Example:
This example renames the item at index 4 to "New Study".

Set Project = Synergy.Project()


Project.RenameItemByIndex 4, "New Study"

Member Function Documentation 187


MPI Application Programming Interface

Boolean DeleteItemByIndex ( long aIndex )


Deletes an item by its index

Parameters:
aIndex index of the item to be deleted

Returns:
True if successful; False otherwise

Note:
This function is mainly used during macro recording only when you have
duplicate item names in the project. The index associated with an item can
change when a project is re-opened after an item is deleted, etc. It is
recommended that you use DeleteItemByName instead

Example:
This example deletes the item in project at index 4.

Set Project = Synergy.Project()


Project.DeleteItemByIndex 4

Boolean DuplicateStudyByIndex ( long aIndex )


Duplicates a study by its index, it duplicates unsaved study.

Parameters:
aIndex index of the study to duplicate

Returns:
True if successful; False otherwise

Note:
This function is mainly used during macro recording when you have duplicate
item names in the project. The index associated with an item can change
when a project is re-opened after an item is deleted, etc. It is recommended
that you use DuplicateStudyByName instead

Example
This example duplicates the study at index 1.

Set Project = Synergy.Project()


Project.DuplicateStudyByIndex 1

String GetFirstStudyName ( )
Gets the name of the first study

Returns:
name of the first study

Example:
This example displays first study

Member Function Documentation 188


MPI Application Programming Interface
name.
Set Project = Synergy.Project()
Str = Project.GetFirstStudyName()
MsgBox Str

String GetNextStudyName ( String aName )


Gets the name of the next study

Returns:
study name

Example:
This example displays the name of each
study.

Set Project = Synergy.Project()


Str = Project.GetFirstStudyName()
While Str <> ""
MsgBox Str
Str = Project.GetNextStudyName( Str )
WEnd

String GetFirstReportName ( )
Gets the name of the first report

Returns:
name of the first report

Example:
This example gets the name of the first
report.
Set Project = Synergy.Project()
Str = Project.GetFirstReportName()

String GetNextReportName ( String aName )


Gets the name of the next report

Returns:
next report name

Example:
This example displays the name of each
report.

Set Project = Synergy.Project()


Str = Project.GetFirstReportName()
While Not IsEmpty(Str)
MsgBox Str
Str = Project.GetNextReportName( Str )
WEnd

Member Function Documentation 189


MPI Application Programming Interface

Boolean DuplicateStudyByName2 ( String aName,


Boolean aSave
)
Duplicates a study by its name, whether to save study before duplicate

Parameters:
aName name of the study to duplicate
aSave whether to save study before duplicate

Returns:
True if successful; False otherwise

Note:
MPI tries to prevent you from duplicating study names in the project; however
if you have duplicated study or report names in your project, this function will
duplicate the first item that matches the name

Example
This example duplicates the unsaved study named "My Study".

Set Project = Synergy.Project()


Project.DuplicateStudyByName2 "My Study",FALSE

Boolean DuplicateStudyByIndex2 ( long aIndex,


Boolean aSave
)
Duplicates a study by its index, whether to save before duplicate

Parameters:
aIndex index of the study to duplicate
aSave whether to save study before duplicate

Returns:
True if successful; False otherwise

Note:
This function is mainly used during macro recording when you have duplicate
item names in the project. The index associated with an item can change
when a project is re-opened after an item is deleted, etc. It is recommended
that you use DuplicateStudyByName instead

Example
This example duplicates the saved study at index 1.

Set Project = Synergy.Project()


Project.DuplicateStudyByIndex2 1,TRUE

Member Function Documentation 190


MPI Application Programming Interface

Boolean ScheduleCheckOnStudy ( String aServer,


String aStudy,
long aJobType,
Boolean aRunNow,
Boolean aPrompts
)
Schedule checking on a study

Parameters:
aServer Server address
aStudy Study name
aJobType Job type
aRunNow True if run now
aPrompts True if show prompts

Returns:
true if successful

Example:
This example schedules an analysis check on study "Cup_Study" on server
"127.0.0.1".
Set Project = Synergy.Project()
Project.ScheduleCheckOnStudy "127.0.0.1", "Cup_Study", 0, False, True

Boolean ScheduleAnalysisOnStudy ( String aServer,


String aStudy,
long aJobType,
Boolean aRunNow,
Boolean aPrompts
)
Schedule analysis on a study

Parameters:
aServer Server address
aStudy Study name
aJobType Job type
aRunNow True if run now
aPrompts True if show prompte

Returns:
True if successful

Example:
This example schedules an analysis on study "Cup_Study" on server
"127.0.0.1".
Set Project = Synergy.Project()
Project.ScheduleAnalysisOnStudy "127.0.0.1", "Cup_Study", 0, False, True

Member Function Documentation 191


MPI Application Programming Interface

Boolean ExportModel2 ( String aFile,


long aUnits
)
Exports current study into a file

Parameters:
aFile name of file
aUnit unit index
0 - Millimeter
1 - Centimeter
2 - Meter
3 - Inch

Returns:
True if successful; False otherwise

Note:
The format of the exported file is automatically determined from the file
extension

Example:
This example exports the current model into an mfl file.

Set Project = Synergy.Project()


Project.ExportModel2 "C:\My MPI 4.0 Projects\export.mfl", 1

Boolean ScheduleMeshOnStudy ( String aServer,


String aStudy,
long aJobType,
Boolean aRunNow,
Boolean aPrompts
)
Schedule mesh on a study

Parameters:
aServer Server address
aStudy Study name
aJobType Job type
aRunNow True if run now
aPrompts True if show prompte

Returns:
True if successful

Example:
This example schedules an mesh on study "Cup_Study" on server
"127.0.0.1".
Set Project = Synergy.Project()
Project.ScheduleMeshOnStudy "127.0.0.1", "Cup_Study", 0, False, True

Member Function Documentation 192


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

Property Class Reference


This class is used to access property information. More...

List of all members.

Public Methods
Boolean DeleteField (long aID)
long GetFirstField ()
long GetNextField (long aField)

Public Attributes
long Type
Property type (read-only).

long ID
Property ID (read-only).

String Name
Name of the property.

String FieldDescription
Object FieldValues

Detailed Description
You can use this class to query property information and modify properties.

Note:
Properties can be edited only when they are created or fetched from
PropertyEditor objects. Properties obtained from other class objects can only be
used for queries

See also:
PropertyEditor::CreateProperty , PropertyEditor::FindProperty , PropertyEditor

Member Function Documentation

Boolean DeleteField ( long aID )


Deletes a property field

Property Class Reference 193


MPI Application Programming Interface
Parameters:
aID field ID

Returns:
True if the field was deleted successfully;
False otherwise

long GetFirstField ( )
Gets the first field in the property

Returns:
field ID

long GetNextField ( long aField )


Get the next field in the property

Parameters:
aField field ID

Returns:
next field ID

Member Data Documentation

String FieldDescription
Field description

Parameters:
aID field
ID

Object FieldValues
Field values as a DoubleArray object

Parameters:
aID field ID

Member Function Documentation 194


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

PropertyEditor Class Reference


This class is used to create and edit properties. More...

List of all members.

Public Methods
Boolean DeleteProperty (long aType, long aID)
Object CreateProperty (long aType, long aID, Boolean aDefaults)
Object FindProperty (long aType, long aID)
Boolean CommitChanges (String aAction)
Boolean SetProperty (Object aList, Object aProp)
Object CreateEntityList ()
long RemoveUnusedProperties ()
Object FetchProperty (long aType, long aID, String aFile, String aFileType, long
aFileID)
Object GetFirstProperty (long aType)
Object GetNextProperty (Object aProp)
Object GetNextPropertyOfType (Object aProp)
Object GetEntityProperty (Object aEnt)

Detailed Description
You can use this class to create properties, find properties given their type and ID,
assign properties to entities and enumerate properties in a study

Note:
The property editor creates a copy of the properties in the model when you
create it. All changes made to properties will not be committed to the study
unless you call the function CommitChanges

See also:
Synergy::PropertyEditor

Member Function Documentation

Boolean DeleteProperty ( long aType,


long aID
)
Deletes a property

PropertyEditor Class Reference 195


MPI Application Programming Interface
Parameters:
aType property type
aID property ID

Returns:
True if successful; False
otherwise

Object CreateProperty ( long aType,


long aID,
Boolean aDefaults
)
Creates an empty or default property

Parameters:
aType property type
aID property ID
aDefaults specify True to use default values for property fields; False to
create an empty property

Returns:
Property that is created

Object FindProperty ( long aType,


long aID
)
Finds a property

Parameters:
aType property type
aID property ID

Returns:
Property that is found

Example:
This example finds property Tset 40800 with
subID 5.
Set Prop = PropEd.FindProperty(40800, 5)

Boolean CommitChanges ( String aAction )


Commits changes that have been effected through the property editor

Parameters:
aAction can be one of:
• Assign: to record property assignments
• Edit: to record property edits
• Process Conditions: to record process condition changes
• Remove Unused: to record removal of unused properties

Member Function Documentation 196


MPI Application Programming Interface
• any other string: to record custom actions This parameter is only
used to identify the string used to record the action for Undo/Redo,
etc.

Returns:
True if successful; False otherwise

Example:
This example commits changes.
PropEd.CommitChanges "Edit"

Boolean SetProperty ( Object aList,


Object aProp
)
Assigns a property to a list of entities

Parameters:
aList EntList object containing entities to which the property is to be
assigned
aProp Property object

Returns:
True if successful; False otherwise

Example:
This example sets property to element "T1".
Set Prop = PropEd.FindProperty(40800, 5)
EntList.SelectFromString "T1"
PropEd.SetProperty EntList, Prop
PropEd.CommitChanges "Edit"

Object CreateEntityList ( )
Creates an empty EntList object

Returns:
EntList object

long RemoveUnusedProperties ( )
Removes unused properties in the study. Unused properties are those that have not
been assigned to any entities

Returns:
number of properties removed

Object FetchProperty ( long aType,


long aID,
String aFile,
String aFileType,
long aFileID
)

Member Function Documentation 197


MPI Application Programming Interface
Fetches a property from a system or a user database

Parameters:
aType property type
aID ID that is to be assigned to the fetched property; specify 0 to let MPI
use the next available ID @aFile database file name @aFileType
specify:
• System: if the database is a system database,
• User: if the database is a user database, and
• empty string: if the file is not located in any of the standard database
locations; in this case, aFile must be a full path specification
aIndex index of the property in the database; the most convenient way to
determine this index is to record a macro that selects this property
from the database

Returns:
Property that is fetched

Object GetFirstProperty ( long aType )


Gets the first property in the study of a given type

Parameters:
aType property type; specify 0 to get the first property in the
study

Returns:
Property object; Nothing if there are no properties in the study

Object GetNextProperty ( Object aProp )


Gets next property

Parameters:
aProp Property object

Returns:
Property object that corresponds to the next property; Nothing if this is the
last property

Object GetNextPropertyOfType ( Object aProp )


Gets next property of the same type of the given property

Parameters:
aProp Property object

Returns:
Property object that corresponds to the next property of the same type;
Nothing if there are no more properties of this type

Object GetEntityProperty ( Object aEnt )

Member Function Documentation 198


MPI Application Programming Interface
Gets the property that is assigned to an entity

Parameters:
aEnt EntList object containing the entity whose property needs to be
obtained

Returns:
Property object

Member Function Documentation 199


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

RunnerGenerator Class Reference


This class provides access to the runner system wizard functionality. More...

List of all members.

Public Methods
Boolean Generate ()
Generates a runner system. More...

Public Attributes
double SprueX
X coordinate of the sprue.

double SprueY
Y coordinate of the sprue.

double SprueLength
Length of the sprue.

double PartingZ
Parting plane Z location.

double TopRunnerZ
Top runner plane Z location of hot runner systems.

double SprueDiameter
Sprue diameter.

double SprueTaperAngle
Included angle of the sprue.

double RunnerDiameter
Runner diameter.

Boolean Trapezoidal
Specify True to generate runners with trapezoidal cross sections; False for circular.

double TrapezoidAngle
Included angle for trapezoidal runners.

double DropDiameter

RunnerGenerator Class Reference 200


MPI Application Programming Interface

Drop diameter.

double DropTaperAngle
Included angle of drops.

Boolean GatesByLength
Specify True to specify length of side gates; False to specify angles.

double GateDiameter
Orifice diameter of side gates.

double GateTaperAngle
Included angle of side gates.

double GateLength
Length of side gates.

double GateAngle
Angle of side gates.

double TopGateStartDiameter
Start diameter of top gates.

double TopGateEndDiameter
End diameter of top gates.

double TopGateLength
Length of top gates.

Boolean DeleteOld
Specify True to delete the existing runner system; False to retain it.

Boolean HotRunners
Specifies whether hot runners will be used in your runner system.

double PartCenterX
Query X value of the part center.

double PartCenterY
Query Y value of the part center.

double GatesCenterX
Query X value of the gates center.

double GatesCenterY
Query Y value of gates center.

double Top
Query top of part surface.

double Bottom

Public Attributes 201


MPI Application Programming Interface
Query bottom of part surface.

double GatePlaneZ
Query gate plane Z value.

Detailed Description
You can use this class to generate a runner system for your model

See also:
Synergy::RunnerGenerator

Member Function Documentation

Boolean Generate ( )

Returns:
True if the operation succeeded; False otherwise

Example:
This example generates a runner system using default
parameters.

Set Synergy = CreateObject("synergy.Synergy")


Set RunnerGen = Synergy.RunnerGenerator()
RunnerGen.Generate

Detailed Description 202


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Server Class Reference


This class is used to define a Server Object. More...

List of all members.

Public
Attributes
String Address
Address.

String Name
Name.

String Status
Status.

Detailed Description
You can use this class to define a Server and query server information(name, status
and address).

See also:
SAJobMgr, SAJob

Server Class Reference 203


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

StudyDoc Class Reference


This class is used to query and manipulate studies. More...

List of all members.

Public Methods
String AnalysisStatus (long aIndex)
String MeshStatus ()
String AnalysisName (long aIndex)
Object CreateEntityList ()
Boolean Save ()
Boolean SaveAs (String aName)
Boolean Close ()
Boolean Undo (long aNum)
Boolean Redo (long aNum)
Boolean AddFile (String aName, Object aOpts, Boolean aShowLog)
Boolean AnalyzeNow (Boolean aCheck, Boolean aSolve)
Object GetFirstNode ()
Object GetNextNode (Object aNode)
Object GetNodeCoord (Object aNode)
Object GetFirstTri ()
Object GetNextTri (Object aTri)
Object GetFirstBeam ()
Object GetNextBeam (Object aBeam)
Object GetFirstTet ()
Object GetNextTet (Object aTet)
Object GetElemNodes (Object aElem)
Object GetEntityLayer (Object aEnt)
long GetEntityID (Object aEnt)
Boolean AnalyzeNow2 (Boolean aCheck, Boolean aSolve, Boolean aPrompts)
Boolean DeleteResults (long aStartIndex)
Boolean MeshNow (Boolean aPrompts)
String GetResultPrefix (String aName)
Boolean ImportProcessVariation (String aUdmFile, Boolean aDOE, Boolean aPrompt)
Boolean ImportProcessCondition (String aUdmFile, Boolean aPrompt)
Boolean ImportMachineData (String aUdmFile, Boolean aPrompt)
Boolean ExportAnalysisLog (String aFileName)
Boolean ExportMeshLog (String aFileName)

Public Attributes
String MoldingProcess
Molding process.

StudyDoc Class Reference 204


MPI Application Programming Interface
String AnalysisSequence
Analysis sequence.

String MeshType
Mesh type.

Object Selection
Selection as a EntList object.

long NumberOfAnalyses
Number of analysis.

StudyName
Study Name.

Detailed Description
You can use the StudyDoc class to query and set the molding process, analysis
sequence and mesh type. In addition, you can also save and close studies, invoke one
or more undo/redo actions, add files, launch analyses and enumerate entities in your
study

See also:
Synergy::StudyDoc

Member Function Documentation

String AnalysisStatus ( long aIndex )


Gets the status of the i-th analysis

Parameters:
aIndex index of analysis

Returns:
Status of the i-th analysis, which can be one of the
following.
• New
• Pending
• Running
• Completed
• Failed

String MeshStatus ( )
Get the status of mesh

Returns:

Public Attributes 205


MPI Application Programming Interface
Status of mesh, same as
AnalysisStatus

Example:
This example displays mesh
status.
Set StudyDoc = Synergy.StudyDoc()
MsgBox StudyDoc.MeshStatus

See also:
AnalysisStatus

String AnalysisName ( long aIndex )


Gets the analysis name of the i-th analysis

Parameters:
aIndex index of analysis

Returns:
Analysis name

Object CreateEntityList ( )
Creates an empty entity list

Returns:
EntList object

Boolean Save ( )
Saves the study

Returns:
True if successful; False
otherwise

Example:
This example saves study.
Set StudyDoc = Synergy.StudyDoc()
StudyDoc.Save

Boolean SaveAs ( String aName )


Saves the study under a new name

Parameters:
aName new name

Returns:
True if successful; False otherwise

Example:

Member Function Documentation 206


MPI Application Programming Interface
This example saves the study under the new name "Saved
Study".

Set StudyDoc = Synergy.StudyDoc()


StudyDoc.SaveAs "Saved Study"

Boolean Close ( )
Closes the study

Returns:
True if successful; False
otherwise

Example:
This example closes the
studyDoc.
Set StudyDoc = Synergy.StudyDoc()
StudyDoc.Close

Boolean Undo ( long aNum )


Undoes a number of model edit

Parameters:
aNum number of edits to undo

Returns:
True if successful; False otherwise

Example:
This example undoes the latest model
edit.

Set StudyDoc = Synergy.StudyDoc()


StudyDoc.Undo 1

Boolean Redo ( long aNum )


Redoes a number of model editing

Parameters:
aNum number of edits to redo

Returns:
True if successful; False otherwise

Example:
This example redoes the latest model edit that was
undone.

Set StudyDoc = Synergy.StudyDoc()


StudyDoc.Redo 1

Member Function Documentation 207


MPI Application Programming Interface

Boolean AddFile ( String aName,


Object aOpts,
Boolean aShowLog
)
Adds a CAD model file to the current study

Parameters:
aName name of the file to be added
aOpts ImportOptions object that specifies
import options
aShowLog specify True to display the import log

Returns:
True if successful; False otherwise

Example:
This example adds an STL model to the current
study.

Set ImpOpts = Synergy.ImportOptions()


Set StudyDoc = Synergy.StudyDoc()
ImpOpts.MeshType "Fusion"
...
StudyDoc.AddFile "D:\\STL\fork.stl", ImpOpts, False

Boolean AnalyzeNow ( Boolean aCheck,


Boolean aSolve
)
Runs analysis immediately

Parameters:
aCheck whether model checking is to be performed
aSolve whether the model solution needs to generated by the
analysis

Returns:
True if successful; False otherwise

Example:
This example runs analysis on the studyDoc.
Set StudyDoc = Synergy.StudyDoc()
StudyDoc.AnalyzeNow False, True

Object GetFirstNode ( )
Gets the first node in the study

Returns:
EntList object containing the first
node

Example:

Member Function Documentation 208


MPI Application Programming Interface
This example gets first node.
Set StudyDoc = Synergy.StudyDoc()
Set Node = StudyDoc.GetFirstNode()

Object GetNextNode ( Object aNode )


Gets the next node in the study

Parameters:
EntList object containing a node

Returns:
EntList object containing the next node

Example:
This example displays ID of each node in the
study.
Set StudyDoc = Synergy.StudyDoc()
Set Node = StudyDoc.GetFirstNode()
While Not Node Is Nothing
MsgBox Node.ConvertToString()
Set Node = StudyDoc.GetNextNode(Node)
WEnd

Object GetNodeCoord ( Object aNode )


Gets node coordinates

Parameters:
EntList object containing the node

Returns:
Vector object containing the node coordinates

Example:
This example gets the coordinates of the first node in the
study.

Set StudyDoc = Synergy.StudyDoc()


Set Node = StudyDoc.GetFirstNode()
Set Coord = StudyDoc.GetNodeCoord(Node)

Object GetFirstTri ( )
Gets the first triangle in the study

Returns:
EntList object containing the first
triangle

Example:
Set StudyDoc = Synergy.StudyDoc()
Set Tri = StudyDoc.GetFirstTri()

Object GetNextTri ( Object aTri )

Member Function Documentation 209


MPI Application Programming Interface
Gets the next triangle in the study

Parameters:
aTri EntList object containing a triangle

Returns:
EntList object containing the next triangle

Example:
This example displays all triangle ID in the
study
Set StudyDoc = Synergy.StudyDoc()
Set Tri = StudyDoc.GetFirstTri()
While Not Tri Is Nothing
Str = Str + Tri.ConvertToString() + " "
Set Tri = StudyDoc.GetNextTri( Tri )
WEnd
MsgBox Str

Object GetFirstBeam ( )
Gets the first beam in the study

Returns:
EntList object containing the first
beam

Example:
This example display ID of first
beam.
Set StudyDoc = Synergy.StudyDoc()
Set B1 = StudyDoc.GetFirstBeam()
MsgBox B1.ConvertToString()

Object GetNextBeam ( Object aBeam )


Gets the next beam in the study

Parameters:
EntList object containing a beam

Returns:
EntList object containing the next
beam

Example:
This example displays all beam ID.
Set StudyDoc = Synergy.StudyDoc()
Set Beam = StudyDoc.GetFirstBeam()
While Not Beam Is Nothing
Str = Str + Beam.ConvertToString() + " "
Set Beam = StudyDoc.GetNextBeam(Beam)
WEnd
MsgBox Str

Member Function Documentation 210


MPI Application Programming Interface

Object GetFirstTet ( )
Gets the first tetrahedral element in the study

Returns:
EntList object containing the first tetrahedral
element

Example:
This examples gets first tetrahedral ID.
Set StudyDoc = Synergy.StudyDoc()
Set T1 = StudyDoc.GetFirstTet()
MsgBox T1.ConvertToString()

Object GetNextTet ( Object aTet )


Gets the next tetrahedral element in the study

Parameters:
aTet EntList object containing a
tetrahedron

Returns:
EntList object containing the next
tetrahedron

Example:
This example displays all tetrahedral ID.
Set StudyDoc = Synergy.StudyDoc()
Set Tets = StudyDoc.GetFirstTet()
While Not Tets Is Nothing
Str = Str + Tets.ConvertToString() + " "
Set Tets = StudyDoc.GetNextTet(Tets)
WEnd
MsgBox Str

Object GetElemNodes ( Object aElem )


Gets the nodes of an element

Parameters:
aTet EntList object containing an element

Returns:
EntList object containing the nodes

Example:
This example displays triangle "T1" node coordinates.
Set StudyDoc = Synergy.StudyDoc()
Set Tri = StudyDoc.GetFirstTri()
Set Nodes = StudyDoc.GetElemNodes( Tri )
For i = 0 to 2
Set Vec = StudyDoc.GetNodeCoord( Nodes.Entity( i ) )
MsgBox CStr(Vec.x) + " " + CStr(Vec.y) + " " + CStr(Vec.z)
Next

Member Function Documentation 211


MPI Application Programming Interface

Object GetEntityLayer ( Object aEnt )


Gets the layer that the entity is assigned to

Parameters:
aEnt EntList object containing the
entity

Returns:
EntList object containing the layer

Example:
This example display layer of first
node
Set StudyDoc = Synergy.StudyDoc()
Set Node = StudyDoc.GetFirstNode()
Set Layer = StudyDoc.GetEntityLayer(Node)
MsgBox Layer.ConvertToString()

long GetEntityID ( Object aEnt )


Gets entity ID

Parameters:
aEnt EntList containing the entity

Returns:
entity ID

Example
This example displays layer ID of first
node
Set StudyDoc = Synergy.StudyDoc()
Set Node = StudyDoc.GetFirstNode()
Set Layer = StudyDoc.GetEntityLayer(Node)
MsgBox StudyDoc.GetEntityID( Layer )

Boolean AnalyzeNow2 ( Boolean aCheck,


Boolean aSolve,
Boolean aPrompts
)
Runs analysis immediately (allows prompt control)

Parameters:
aCheck whether model checking is to be performed
aSolve whether the model solution needs to generated by the
analysis
aPrompts set False will prevent showing prompt on GUI

Returns:
True if successful; False otherwise

Example:

Member Function Documentation 212


MPI Application Programming Interface
This example runs analysis job without showing user prompt.
Set StudyDoc = Synergy.StudyDoc()
StudyDoc.AnalyzeNow2 False, True, False

Boolean DeleteResults ( long aStartIndex )


Deletes results starting from the given index

Parameters:
aStartIndex Start index of results to be
deleted

Returns:
True if successful

Example:
This example deletes all results
Set SD = Syn.StudyDoc
SD.DeleteResults(0)

Boolean MeshNow ( Boolean aPrompts )


Runs mesh immediately (allows prompt control)

Parameters:
aPrompts set False will prevent showing prompt on
GUI

Returns:
True if successful; False otherwise

Example:
This example runs mesh job without showing user
prompt.
Set StudyDoc = Synergy.StudyDoc()
StudyDoc.MeshNow False

String GetResultPrefix ( String aName )


Gets result prefix string of a given process

Parameters:
aName process name such as "Flow", "Warp"

Note: In synergy project view, select a study and click Right-Mouse-Button to open
properties dialog, the available process name are listed there.

Returns:
Result prefix name

Example:
This example displays result prefix of "Fill" process.
Set StudyDoc = Synergy.StudyDoc
MsgBox StudyDoc.GetResultPrefix("Fill")

Member Function Documentation 213


MPI Application Programming Interface

Boolean ImportProcessVariation ( String aUdmFile,


Boolean aDOE,
Boolean aPrompt
)
Import process variation from MPX/Shotscope

Parameters:
aUdmFile File from MPX/Shotscope output in udm format
aDOE Whether to set up as DOE analysis
aPrompt Whether to show UI prompt

Returns:
True if successful

Example:
This example imports process variation from MPX/Shotscope and setup as
DOE analysis
Set SD = Syn.StudyDoc
SD.ImportProcessVariation "C:\My MPI 6.0 Projects\abc.udm", True, True

Boolean ImportProcessCondition ( String aUdmFile,


Boolean aPrompt
)
Import process condition from MPX

Parameters:
aUdmFile File from MPX output in udm format
aPrompt Whether to show UI prompt

Returns:
True if successful

Example:
This example imports process condition from MPX
Set SD = Syn.StudyDoc
SD.ImportProcessCondition "C:\My MPI 6.0 Projects\abc.udm", True

Boolean ImportMachineData ( String aUdmFile,


Boolean aPrompt
)
Import machine data from MPX/Shotscope

Parameters:
aUdmFile File from MPX output in udm format
aPrompt Whether to show UI prompt

Returns:
True if successful

Example:

Member Function Documentation 214


MPI Application Programming Interface
This example imports machine data from MPX
Set SD = Syn.StudyDoc
SD.ImportMachineData "C:\My MPI 6.0 Projects\abc.udm", True

Boolean ExportAnalysisLog ( String aFileName )


Export analysis log to text file

Parameters:
aFileName file name of the output file

Returns:
True if successful

Example:
This example exports analysis log into "c:\my
project\analysis.log"
Set StudyDoc = Synergy.StudyDoc
StudyDoc.ExportAnalysisLog "C:\\my project\\analysis.log"

Boolean ExportMeshLog ( String aFileName )


Export mesh log to text file

Parameters:
aFileName file name of the output file

Returns:
True if successful

Example:
This example exports mesh log into "c:\my
project\mesh.log"
Set StudyDoc = Synergy.StudyDoc
StudyDoc.ExportMeshLog "C:\\my project\\mesh.log"

Member Function Documentation 215


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Synergy Class Reference


This class is used as the "top-level" object in MPI. More...

List of all members.

Public Methods
Boolean NewProject (String aName, String aDir)
Boolean OpenProject (String aPath)
Boolean OpenRecentProject (long aIndex)
Boolean ImportFile (String aFile, Object aOpts, Boolean aShowLog)
Object CreateVector ()
Object CreateVectorArray ()
Object CreateDoubleArray ()
Object CreateIntegerArray ()
SetUnits (String aUnit)
String GetUnits ()
Boolean SetApplicationWindowPos (long aX, long aY, long aSizeX, long aSizeY)

Public Attributes
Object Project
Project.

Object ImportOptions
Import options.

Object StudyDoc
Study.

Object Modeler
Modeler.

Object MeshEditor
Mesh editor.

Object MeshGenerator
Mesh generator.

Object PredicateManager
Predicate manager.

Object BoundaryConditions
Boundary conditions editor.

Synergy Class Reference 216


MPI Application Programming Interface

Object ModelDuplicator
Model duplicator.

Object MoldSurfaceGenerator
Mold surface generator.

Object CircuitGenerator
Coolant circuit generator.

Object RunnerGenerator
Runner system generator.

Object MaterialSelector
Molding material selector.

Object LayerManager
Layer manager.

Object PlotManager
Plot manager.

Object Viewer
Viewer.

Object DiagnosisManager
Diagnostics generator.

Object PropertyEditor
Property editor.

Object Version
Product version string.

Object Build
Product build ID string.

Object DataTransform
Data Transform.

Object JobManager
Job manager.

Detailed Description
This class serves as the starting point of the API. You can use this class to retrieve the
current Project, StudyDoc, Modeler, MeshEditor, PropertyEditor, the wizard objects,
Viewer, and other objects. This is the only OLE-creatable object in MPI. All other
objects are either created using the Synergy object or those objects that are derived

Public Attributes 217


MPI Application Programming Interface
from the Synergy object

Member Function Documentation

Boolean NewProject ( String aName,


String aDir
)
Creates a new project

Parameters:
aName project name
aDir project location

Returns:
True if successful; False otherwise

Example:
This example creates a new project called
"P1"
Set Synergy = CreateObject("synergy.Synergy")
Synergy.NewProject "P1", "C:\My MPI 4.0 Projects\P1"

Boolean OpenProject ( String aPath )


Opens a project

Parameters:
aPath full path name of the project to open

Returns:
True if successful; False otherwise

Example:
This example opens project "C:\My MPI 4.0
Projects\MyTest.mpi".
Synergy.OpenProject "C:\My MPI 4.0 Projects\MyTest.mpi"

Boolean OpenRecentProject ( long aIndex )


Opens a recently opened project

Parameters:
aIndex index from 0 to 3, where 0 corresponds to the most recent project that
was opened and 3 corresponds to the oldest project that was opened

Returns:
True if successful; False otherwise

Example:
This example opens most recent project.
Synergy.OpenRecentProject 0

Detailed Description 218


MPI Application Programming Interface

Boolean ImportFile ( String aFile,


Object aOpts,
Boolean aShowLog
)
Imports a file into MPI

Parameters:
aFile name of the file to open
aOpts ImportOptions object that specifies
import options
aShowLog specify True to display an import log

Returns:
True if successful; False otherwise

Example:
This example imports "D:\STL\test.stl" into MPI
project.
Set ImpOpts = Synergy.ImportOptions()
ImpOpts.MeshType "Fusion"
...
Synergy.ImportFile "D:\STL\test.stl", ImpOpts, False

Object CreateVector ( )
Creates a Vector object

Returns:
Vector object

Object CreateVectorArray ( )
Creates a VectorArray object

Returns:
VectorArray object

Object CreateDoubleArray ( )
Creates a DoubleArray object

Returns:
DoubleArray object

Object CreateIntegerArray ( )
Creates a IntegerArray object

Returns:
IntegerArray object

SetUnits ( String aUnit )


Set system units

Member Function Documentation 219


MPI Application Programming Interface

Parameters:
aUnit Units name, "English" or
"Metric"

Example:
This example sets system units to
"Metric"
Set Synergy = CreateObject("synergy.Synergy")
Synergy.SetUnits "Metric"

String GetUnits ( )
Get system units

Example:
This example displays current system
unit.
Set Synergy = CreateObject("synergy.Synergy")
MsgBox Synergy.GetUnits

Boolean SetApplicationWindowPos ( long aX,


long aY,
long aSizeX,
long aSizeY
)
Change the aplication window size and position

Parameters:
aX X position
aY Y position
aSizeX X size in pixel
aSizeY Y size in pixel

Example
This example moves the window to (100, 100) and change the size to
400x300
Synergy.SetApplicationWindowPos 100, 100, 400, 300

Member Function Documentation 220


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

UserPlot Class Reference


This class is used to create user-defined plot. More...

List of all members.

Public Methods
Boolean SetDeptName (String aName)
Boolean SetIndpName (String aName)
Boolean SetDataType (String aType)
Boolean SetDeptUnitName (String aName)
Boolean SetIndpUnitName (String aName)
Boolean AddScalarData (double aIndpValue, Object aEntIDs, Object aDataValues)
Object Build ()
Boolean SetName (String aName)
Boolean AddTensorData (double aIndpValue, Object aEntIDs, Object aT11, Object
aT22, Object aT33, Object aT12, Object aT13, Object aT23)
SetVectorAsDisplacement (Boolean aVasD)
Boolean SetScalarData (Object aEntIDs, Object aDataValues)
Boolean SetVectorData (Object aEntIDs, Object aVxValues, Object aVyValues, Object
aVzValues)
Boolean AddXYPlotData (double aIndpValue, Object aXValues, Object aYValues)
Boolean SetXYPlotData (Object aXValues, Object aYValues)
Boolean SetXYPlotXUnitName (String aName)
Boolean SetXYPlotYUnitName (String aName)
Boolean SetXYPlotXTitle (String aTitle)
Boolean SetHighlightData (Object aDataValues)
Object BuildWeldlinePlot (String aPlotName, double aMaxAngle, Boolean
aForOverMolding)
Object BuildClampForcePlot (String aPlotName, long aDirection, long aLCS, Boolean
aForOverMolding)
Object BuildBirefringencePlot (String aPlotName, long aRltType, double
aLightWaveLength, double aLightDirX, double aLightDirY, double
aLightDirZ)
Object BuildModulusPlot (String aPlotName, long aDirection, long aLCS)
Object BuildDeflectionPlot (String aPlotName, String aType, String aParameters)

Detailed Description
This class can be used to create user-defined plot by providing plot data

UserPlot Class Reference 221


MPI Application Programming Interface

Member Function Documentation

Boolean SetDeptName ( String aName )


Sets dependent name

Parameters:
aName dependent variable name

Returns:
True if successful

Example:
This example sets dependent
name.

Set UserPlot1 = PlotMgr.CreateUserPlot()


UserPlot1.SetDeptName( "ABC")

Boolean SetIndpName ( String aName )


Sets independent name

Parameters:
aName independent variable
name

Returns:
True if successful

Example:
Set UserPlot1 = PlotMgr.CreateUserPlot()
UserPlot1.SetIndpName("ABC")

Boolean SetDataType ( String aType )


Sets data type

Parameters:
aType data type (ELDT for element data, NDDT node data and NMDT
non-mesh data)

Returns:
True if successful

Example:
See UserPlot::AddScalarData

Boolean SetDeptUnitName ( String aName )


Sets dependent variable unit name

Parameters:

Member Function Documentation 222


MPI Application Programming Interface
aName dependent variable unit
name

Returns:
True if successful

Example:
See UserPlot::AddVectorData

Boolean SetIndpUnitName ( String aName )


Sets independent variable unit name

Parameters:
aName independent variable unit name

Returns:
True if successful

Example:
This example sets user plot independent variable unit name as
meter
Set UserPlot1 = PlotMgr.CreateUserPlot()
UserPlot1.SetIndpUnitName("m")

Boolean AddScalarData ( double aIndpValue,


Object aEntIDs,
Object aDataValues
)
Adds a frame of scalar data to the plot (used to create a frame animation plot, each
set of data is corresponding to one animation frame)

Parameters:
aIndpValue independent variable value
aEntID element IDs (for element data) or node IDs (node data)
aDataValues dependent variable values

Returns:
True if successful

Example:
This example creates plot with two frames, first frame is Pressure(end of
filling) second frame is Pressure At V/P Switchover
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set IndpValues = Synergy.CreateDoubleArray()
Set node_1 = Synergy.CreateIntegerArray()
Set p_1 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1190, IndpValues, node_1, p_1
Set node_2 = Synergy.CreateIntegerArray()
Set p_2 = Synergy.CreateDoubleArray()
PlotMgr.GetScalarData 1760, IndpValues, node_2, p_2
Set UserPlot = PlotMgr.CreateUserPlot()

Member Function Documentation 223


MPI Application Programming Interface
UserPlot.SetName("Test Plot")
UserPlot.SetDataType("NDDT")
UserPlot.SetDeptUnitName("MPa")
UserPlot.AddScalarData 1.0, node_1, p_1
UserPlot.AddScalarData 2.0, node_2, p_2
UserPlot.Build()

Object Build ( )
Builds plot and show it in the view. All required data must be set before this function
can be called

Returns:
plot if successful, otherwise return NULL

Example:
See UserPlot::SetScalarData

Boolean SetName ( String aName )


Sets plot name

Parameters:
aName plot name

Returns:
True if successful

Example:
See
UserPlot::SetVectorData

Boolean AddTensorData ( double aIndpValue,


Object aEntIDs,
Object aT11,
Object aT22,
Object aT33,
Object aT12,
Object aT13,
Object aT23
)
Adds a frame of tensor data to the plot (used to create a frame animation plot, each
set of data is corresponding to one animation frame)

Parameters:
aIndpValue independent variable value
aEntID element IDs (for element data) or node IDs (node data)
aT11 11 component values
aT22 22 component values
aT33 33 component values
aT33 12 component values
aT33 13 component values

Member Function Documentation 224


MPI Application Programming Interface
aT33 23 component values

Returns:
True if successful

Example:
This example does some manipulation on Average Fiber Orientation result to
create a new user plot with multiple frames.
Set IndpValues = Synergy.CreateDoubleArray()
PlotMgr.GetIndpValues 4000, IndpValues
Set Ind = Synergy.CreateDoubleArray()
Ind.AddDouble IndpValues.Val( IndpValues.Size - 1 )
Set node_1 = Synergy.CreateIntegerArray()
Set P11 = Synergy.CreateDoubleArray()
Set P22 = Synergy.CreateDoubleArray()
Set P33 = Synergy.CreateDoubleArray()
Set P12 = Synergy.CreateDoubleArray()
Set P13 = Synergy.CreateDoubleArray()
Set P23 = Synergy.CreateDoubleArray()
PlotMgr.GetTensorData 4000, Ind, node_1, P11, P22, P33, P12, P13, P23
Set DataTrans = Synergy.DataTransform()
DataTrans.Func "cos", node_1, P33, node_1, P33
Set UserPlot = PlotMgr.CreateUserPlot()
UserPlot.SetName("A new tensor plot")
UserPlot.SetDataType("ELDT")
UserPlot.SetDeptUnitName("s")
UserPlot.SetTensorData node_1, P11, P22, P33, P12, P13, P23
UserPlot.AddTensorData 1.0, node_1, P11, P22, P33, P12, P13, P23
DataTrans.Scalar node_1, P11, "*", 3.0, node_1, P11
UserPlot.AddTensorData 2.0, node_1, P11, P22, P33, P12, P13, P23
UserPlot.Build()

SetVectorAsDisplacement ( Boolean aVasD )


Sets vector plot type

Parameters:
aVasD If true vector will be considered as displacement. It is
false by default

Boolean SetScalarData ( Object aEntIDs,


Object aDataValues
)
Sets a frame of scalar data to the plot (Used to create a min/max animation plot)

Parameters:
aEntID element IDs (for element data) or node IDs (node data)
aDataValues dependent variable values

Returns:
True if successful

Example:
This example create a plot to show mesh thickness distribution
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()

Member Function Documentation 225


MPI Application Programming Interface
Set DiagMgr = Synergy.DiagnosisManager
Set UserPlot = PlotMgr.CreateUserPlot()
Set node_O = Synergy.CreateIntegerArray()
Set p_O = Synergy.CreateDoubleArray()
DiagMgr.GetThicknessDiagnosis 1, 3, node_O, p_O
UserPlot.SetName("Mesh Thickness")
UserPlot.SetDataType("NDDT")
UserPlot.SetDeptUnitName("in") 'unit name depends on unit system, here English unit sys
UserPlot.SetScalarData node_O, p_O
UserPlot.Build()

Boolean SetVectorData ( Object aEntIDs,


Object aVxValues,
Object aVyValues,
Object aVzValues
)
Sets a frame of vector data to the plot (Used to create a min/max animation plot)

Parameters:
aIndpValue independent variable value
aEntID element IDs (for element data) or node IDs (node data)
aVxValues x component values
aVxValues y component values
aVxValues z component values

Returns:
True if successful

Example:
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()
Set IndpValues = Synergy.CreateDoubleArray()
PlotMgr.GetIndpValues 1420, IndpValues
Set Ind = Synergy.CreateDoubleArray()
Ind.AddDouble IndpValues.Val( IndpValues.Size - 1 )
Set node_1 = Synergy.CreateIntegerArray()
Set P1 = Synergy.CreateDoubleArray()
Set P2 = Synergy.CreateDoubleArray()
Set P3 = Synergy.CreateDoubleArray()
PlotMgr.GetVectorData 1420, Ind, node_1, P1, P2, P3

Set DataTrans = Synergy.DataTransform()


DataTrans.Func "sin", node_1, P3, node_1, P3

Set UserPlot = PlotMgr.CreateUserPlot()


UserPlot.SetName("New Plot")
UserPlot.SetDataType("ELDT")
UserPlot.SetDeptUnitName("in/s") 'unit name depends on unit system, here English unit
UserPlot.SetVectorData node_1, P1, P2, P3
UserPlot.Build()

Boolean AddXYPlotData ( double aIndpValue,


Object aXValues,
Object aYValues
)

Member Function Documentation 226


MPI Application Programming Interface

Adds a frame of xy plot data to the plot (used to create a frame animation plot, each
set of data is corresponding to one animation frame)

Parameters:
aIndpValue independent variable value
aXValues x values
aYValues y values

Returns:
True if successful

Example:
This example creates a XY plot with two curves
Set UserPlot_XY = PlotMgr.CreateUserPlot()
UserPlot_XY.SetDataType("NMDT")
UserPlot_XY.SetName("Parabolic curve")

UserPlot_XY.AddXYPlotData 1.0, IndpValues, deptValues


UserPlot_XY.AddXYPlotData 2.0, IndpValues2, deptValues2

UserPlot_XY.Build()

Boolean SetXYPlotData ( Object aXValues,


Object aYValues
)
Sets xy plot data to the plot (used to create a xy plot with single frame)

Parameters:
aXValues x values
aYValues y values

Returns:
True if successful

Example
Set Synergy = CreateObject("synergy.Synergy")
Set PlotMgr = Synergy.PlotManager()

'X axis
Set IndpValues = Synergy.CreateDoubleArray()
IndpValues.AddDouble(1.0)
IndpValues.AddDouble(2.0)
IndpValues.AddDouble(3.0)
'Y axis
Set deptValues = Synergy.CreateDoubleArray()
deptValues.AddDouble(1.0)
deptValues.AddDouble(4.0)
deptValues.AddDouble(9.0)

'xyplot
Set UserPlot_XY = PlotMgr.CreateUserPlot()
UserPlot_XY.SetDataType("NMDT")
UserPlot_XY.SetName("Parabolic curve")

UserPlot_XY.SetXYPlotData IndpValues, deptValues

Member Function Documentation 227


MPI Application Programming Interface

UserPlot_XY.Build()

Boolean SetXYPlotXUnitName ( String aName )


Sets XYPlot X axis unit name

Parameters:
aName Unit name

Returns:
True if successful

Example:
This example sets X axis unit
name.

Set UserPlot1 = PlotMgr.CreateUserPlot()


UserPlot1.SetXYPlotXUnitName( "s")

Boolean SetXYPlotYUnitName ( String aName )


Sets XYPlot Y axis unit name

Parameters:
aName Unit name

Returns:
True if successful This example sets Y axis unit
name.

Example:
Set UserPlot1 = PlotMgr.CreateUserPlot()
UserPlot1.SetXYPlotYUnitName( "m")

Boolean SetXYPlotXTitle ( String aTitle )


Sets XYPlot X axis title

Parameters:
aName Title name

Returns:
True if successful

Example:
This example sets XY plot X axis
title.

Set UserPlot1 = PlotMgr.CreateUserPlot()


UserPlot1.SetXYPlotXTitle( "Temperature")

Boolean SetHighlightData ( Object aDataValues )

Member Function Documentation 228


MPI Application Programming Interface
Set data for a highlight data plot

Parameters:
aDataValues Data values (array of node coordinates)

Returns:
True if successful

Example:
This example creates a highligh plot and set its highlight data with two pairs
of node coordinates
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set userPlot = PlotManager.CreateUserPlot()
userPlot.SetName "Weld Lines(Meeting angle = 135.0[deg])"
userPlot.SetDataType "HLDT"
userPlot.SetDeptUnitName "mm"
Set DVec = Synergy.CreateDoubleArray()
DVec.AddDouble 12.5143
DVec.AddDouble 11.2268
DVec.AddDouble 36.3982
DVec.AddDouble 10.9537
DVec.AddDouble -1.5875
DVec.AddDouble 36.3982
Plot.SetHighlightData DVec
Set Plot = userPlot.Build()

Object BuildWeldlinePlot ( String aPlotName,


double aMaxAngle,
Boolean aForOverMolding
)
Create weldline plot

Parameters:
aPlotName plot name
aMaxAngle maximum meeting angle
aForOverMolding TRUE for overmolding

Returns:
plot if successful, otherwise return NULL

Example:
This example creates a weldline plot with 135 degree as the maximum
meeting angle
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set UserPlot = PlotManager.CreateUserPlot()
Set Plot = UserPlot.BuildWeldLinePlot("Weld Lines", 2.235, False)
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot

Member Function Documentation 229


MPI Application Programming Interface

Object BuildClampForcePlot ( String aPlotName,


long aDirection,
long aLCS,
Boolean aForOverMolding
)
Create clamp force plot

Parameters:
aPlotName plot name
aDirection direction. 0: X, 1: Y, 2: Z
aLCS LCS id. 0: global coordinate system, > 0: LCS id
aForOverMolding TRUE for overmolding

Returns:
plot if successful, otherwise return NULL

Example:
This example creates a clamp force plot in the x direction of the global
coordinate system
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set UserPlot = PlotManager.CreateUserPlot()
Set Plot = UserPlot.BuildClampForcePlot("Clamp force", 0, 0, False)
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot

Object BuildBirefringencePlot ( String aPlotName,


long aRltType,
double aLightWaveLength,
double aLightDirX,
double aLightDirY,
double aLightDirZ
)
Create birefringence plot

Parameters:
aPlotName plot name
aRltType result type, 0: Phase shift, 1: Retardation,
2:Retardance tensor
aLightWaveLengths,
wave length
light
aLightDirX x component of the direction vector
aLightDirY y component of the direction vector
aLightDirZ z component of the direction vector

Returns:
plot if successful, otherwise return NULL

Example:

Member Function Documentation 230


MPI Application Programming Interface

This example creates a phase shift plot with 546nm as the light wave length
and (1, 0, 0) as the light direction
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set UserPlot = PlotManager.CreateUserPlot()
Set Plot = UserPlot.BuildBirefringencePlot("Phase shift_+X", 0, 546, 1, 0, 0)
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot

Object BuildModulusPlot ( String aPlotName,


long aDirection,
long aLCS
)
Create modulus plot

Parameters:
aPlotName plot name
aDirection direction. 0: E11, 1: E22, 2: E33
aLCS LCS id. 0: global coordinate system, > 0: LCS id

Returns:
plot if successful, otherwise return NULL

Example:
This example creates a modulus plot in the x direction of the global
coordinate system
Set Synergy = CreateObject("synergy.Synergy")
Set PlotManager = Synergy.PlotManager()
Set UserPlot = PlotManager.CreateUserPlot()
Set Plot = UserPlot.BuildModulusPlot("Modulus (E11)", 0, 0)
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot

Object BuildDeflectionPlot ( String aPlotName,


String aType,
String aParams
)
Create deflection plot

Parameters:
aPlotName plot name
aType deflection plot type: "DEFL", "DEFL C", "DEFL W", "DEFL W2"
aParams parameters, different aType has different parameters. "DEFL": "",
"DEFL C": scale factor, node1 ID, node2 ID..., "DEFL W": scale factor,
node1 ID, node2 ID, "DEFL W2": scale factor, shrinkage

Returns:
plot if successful, otherwise return NULL

Example:
This example creates a DEFL W deflection plot with 10 as the scale factor
Set Synergy = CreateObject("synergy.Synergy")

Member Function Documentation 231


MPI Application Programming Interface
Set PlotManager = Synergy.PlotManager()
Set UserPlot = PlotManager.CreateUserPlot()
Set Plot = UserPlot.BuildDeflectionPlot("Deflection plot", "DEFL W", "10 677 151
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot

Member Function Documentation 232


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Vector Class Reference


This class is used to create and manipulate vector objects (3-tuples). All coordinates
and vector quantities in the API use Vector objects. More...

List of all members.

Public Methods
SetXYZ (double aX, double aY, double aZ)

Public Attributes
double X
X component.

double Y
Y component.

double Z
Z component.

Detailed Description
See also:
Synergy::CreateVector

Member Function Documentation

SetXYZ ( double aX,


double aY,
double aZ
)
Sets component values of a vector

Parameters:
aX X component
aY Y component
aZ Z component

Example:

Vector Class Reference 233


MPI Application Programming Interface

This example creates a vector and sets it to (1, 1,


0).

Set Vector = Synergy.CreateVector()


Vector.SetXYZ 1, 1, 0

Member Function Documentation 234


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

VectorArray Class Reference


This class is used to create and manipulate an array of vectors. More...

List of all members.

Public Methods
Clear ()
AddXYZ (double aX, double aY, double aZ)

Public Attributes
long Size
Number of vectors in the array (read-only).

double X
double Y
double Z

Detailed Description
See also:
Synergy::CreateVectorArray

Member Function Documentation

Clear ( )
Resets a vector array - the size of the array is 0 subsequent to this call

Example:
This example clears a VectorArray.

Set VectorArray = Synergy.CreateVectorArray()


VectorArray.AddXYZ 10, 100, 0
VectorArray.AddXYZ 45, 55, 0
...
VectorArray.Clear

AddXYZ ( double aX,


double aY,
double aZ
)

VectorArray Class Reference 235


MPI Application Programming Interface
Adds a vector to the end of the array

Parameters:
aX X component
aY Y component
aZ Z component

Example:
This example shows how to create a VectorArray and set its
values.

Set VectorArray = Synergy.CreateVectorArray()


Set Modeler = Synergy.Modeler()
Modeler.FindProperty 0, 0
VectorArray.Clear
VectorArray.AddXYZ 10, 100, 0
VectorArray.AddXYZ 45, 55, 0
VectorArray.AddXYZ 100, 10, 0
VectorArray.AddXYZ 95, 55, 0
Set EntList = Modeler.CreateSpline(VectorArray, Nothing, True)

Member Data Documentation

double X
Returns X component at a given index

Parameters:
i index between 0 and
VectorArray.Size-1

Returns:
X component at the offset i

double Y
Returns Y component at a given index

Parameters:
i index between 0 and
VectorArray.Size-1

Returns:
Y component at the offset i

double Z
Returns Z component at a given index

Parameters:
i index between 0 and
VectorArray.Size-1

Member Function Documentation 236


MPI Application Programming Interface

Returns:
Z component at the offset i

Member Data Documentation 237


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

Viewer Class Reference


This class is used to manipulate the graphics window (view). More...

List of all members.

Public Methods
Reset ()
ResetView (Object aViewNormal, Object aViewUp)
Rotate (double aAngleX, double aAngleY, double aAngleZ)
RotateBy (double aAngleX, double aAngleY, double aAngleZ)
RotateXBy (double aAngle)
RotateYBy (double aAngle)
RotateZBy (double aAngle)
SetViewMode (long aPerspective)
Fit ()
Pan (double aXInctFactor, double aYInctFactor)
Zoom (double aFactor)
GoToStandardView (String aName)
CreateBookmark (String aName)
DeleteBookmark (String aName)
GoToBookmark (String aName)
Print ()
SaveImage (String aFileName)
SaveAnimation (String aFileName)
EnableClippingPlaneByID (long aPlaneID, Boolean aEnable)
DeleteClippingPlaneByID (long aPlaneID)
AddBookmark (String aName, Object aViewPlaneNormal, Object aViewUp,
Object aFocalPoint, Object eyePosition, double clippingRangeMin, double
clippingRangeMax, double viewAngle, double aParallelScale)
Object GetActivePlot ()
ShowPlot (Object aPlot)
HidePlot (Object aPlot)
OverlayPlot (Object aPlot)
Object GetPlot (long aId)
Center (double aCenterX, double aCenterY)
Object WorldToDisplay (Object aWorldXyz)
Object CreateClippingPlane (Object aNormal, double aD)
Object CreateDefaultClippingPlane ()
DeleteClippingPlane (Object aPlane)
Object GetFirstClippingPlane ()
Object GetNextClippingPlane (Object aPlane)
EnableClippingPlane (Object aPlane, Boolean aEnable)
Object GetActiveClippingPlane ()
SetActiveClippingPlane (Object aPlane)

Viewer Class Reference 238


MPI Application Programming Interface
ShowPlotFrame (Object aPlot, long aFrame)
Boolean SaveImage2 (String aFileName, long aSizeX, long aSizeY)
Boolean SetViewSize (long aSizeX, long aSizeY)
double GetRotationX ()
double GetRotationY ()
double GetRotationZ ()

Detailed Description
You can use this class to rotate, translate, pan the model and perform other view
manipulation functions. Additionally, you can create, edit, and delete clipping planes,
create and delete bookmarks, show or hide plots, etc.

Member Function Documentation

Reset ( )
Resets the view

Example
This example resets
view.
Viewer.Reset

ResetView ( Object aViewNormal,


Object aViewUp
)
Resets the view with given normal and "up" directions

Parameters:
aViewNormal Vector object that specifies the normal direction
aViewUp Vector object that specifies the "up" direction

Example
This example resets view with normal (0 0 1) and up direction(1
0 0)
Vector1 = Synergy.CreateVector()
Vector2 = Synergy.CreateVector()
Vector1.SetXYZ 0, 0, 1
Vector2.SetXYZ 1, 0, 0
Viewer.ResetView Vector1, Vector2

Rotate ( double aAngleX,


double aAngleY,
double aAngleZ
)
Rotates the view to the given set of angles

Public Methods 239


MPI Application Programming Interface
Parameters:
aAngleX rotation angle about the X axis
aAngleY rotation angle about the Y axis
aAngleZ rotation angle about the Z axis

Example
This example rotates view to angle (25
25 30)
Viewer.Rotate 25, 25, 30

RotateBy ( double aAngleX,


double aAngleY,
double aAngleZ
)
Rotates by the given angles

Parameters:
aAngleX rotation angle about the X axis
aAngleY rotation angle about the Y axis
aAngleX rotation angle about the Z axis

Example
This example rotates the view by (90 180 45) about (X Y Z)
axis.
Viewer.RotateBy 90, 180, 45

RotateXBy ( double aAngle )


Rotates the view about the X axis by a specified angle

Parameters:
aAngle rotation angle about the X axis

Example
This example rotates the view about the X axis by 45
degree.
Viewer.RotateXBy 45

RotateYBy ( double aAngle )


Rotates the view about the Y axis by a specified angle

Parameters:
aAngle rotation angle about the Y axis

Example
This example rotates the view about Y axis by 45
degree.
Viewer.RotateYBy 45

RotateZBy ( double aAngle )


Rotates the view about the Z axis by a specified angle

Member Function Documentation 240


MPI Application Programming Interface
Parameters:
aAngle rotation angle about the Z axis

Example
This example rotates the view about the Z axis by 45
degree.
Viewer.RotateZBy 45

SetViewMode ( long aPerspective )


Enables parallel or perspective projection

Parameters:
aPerspective ; specify:
• 0 for parallel projection and
• 1 for perspective projection

Example
Thix example set view mode to be parallel
project.
Viewer.SetViewMode 0

Fit ( )
Fits the model display to the window

Example
This example fits the model display to the
window.
Viewer.Fit

Pan ( double aXFactor,


double aYFactor
)
Pans the view

Parameters:
aXFactor pan factor along the X axis; specify values < 0 to move to the left
and values > 0 to move to the right; factors are normalized to the
screen width, i.e., a factor of 1 moves the model by one
screen-width to the right
aYFactor pan factor along the Y axis; specify values < 0 to move to the
bottom and values > 0 to move to the top; factors are normalized to
the screen height, i.e., a factor of 1 moves the model by one
screen-height to the top

Example
This example pans view by (0.2 0.3).
Viewer.Pan 0.2, 0.3

Zoom ( double aFactor )


Zooms the view by a specified factor

Member Function Documentation 241


MPI Application Programming Interface
Parameters:
aFactor zoom factor

Example
This example zooms the view by 2.5
times.
Viewer.Zoom 2.5

GoToStandardView ( String aName )


Displays the model in one of the standard viewing positions

Parameters:
aName standard view name; can be one of
• Front
• Back
• Right
• Left
• Top
• Bottom
• FrontLeft
• FrontRight
• BackLeft
• BackRight
• Isometric

Example
This example shows standard view "BackRight".
Viewer.GoToStandardView "BackRight"

CreateBookmark ( String aName )


Bookmarks the view with a given name

Parameters:
aName bookmark name

Example
This example creates bookmark
Viewer.CreateBookmark "SouthEast"

DeleteBookmark ( String aName )


Deletes a view bookmark

Parameters:
aName bookmark name

Example
This example deletes view bookmark
"SouthEast"
Viewer.DeleteBookmark "SouthEast"

Member Function Documentation 242


MPI Application Programming Interface

GoToBookmark ( String aName )


Displays the model according to a bookmarked view

Parameters:
aName bookmark name

Example
This example displays the model with bookmarked view
"SouthEast".
Viewer.GoToBookmark "SouthEast"

Print ( )
Prints the view to the standard printer

Example
This example prints current view to standard
printer.
Viewer.Print

SaveImage ( String aFileName )


Saves the view image to a file

Parameters:
aFileName file name

Note:
The file format will be automatically determined from the file
extension

Example
This example saves view image to "c:\temp\myImage.jpg"
Viewer.SaveImage "c:\temp\myImage.jpg"

SaveAnimation ( String aFileName )


Saves the animation frames to a file

Parameters:
aFileName file name

Note:
The file format will be automatically determined from the file
extension

Example
This example saves the animation to "c:\temp\myAnimation.avi"
Viewer.SaveAnimation "c:\temp\myAnimation.avi"

EnableClippingPlaneByID ( long aPlaneID,


Boolean aEnable
)

Member Function Documentation 243


MPI Application Programming Interface

Enables a clipping plane that is specified by ID

Parameters:
aPlaneID clipping plane ID
aEnable True to enable; False to disable

See also:
EnableClippingPlane

Example
This example enables clipping plane with
ID 4.
Viewer.EnableClippingPlaneByID 4, True

DeleteClippingPlaneByID ( long aPlaneID )


Deletes a clipping plane that is specified by ID

Parameters:
aPlaneID clipping plane ID

See also:
DeleteClippingPlane

Example
This example deletes clipping plane with
ID 5.
Viewer.DeleteClippingPlaneByID 5

AddBookmark ( String aName,


Object aViewPlaneNormal,
Object aViewUp,
Object aFocalPoint,
Object aEyePosition,
double aClippingRangeMin,
double aClippingRangeMax,
double aViewAngle,
double aParallelScale
)
Add a view bookmark

Parameters:
aName bookmark name
aViewPlaneNormal view plane normal
aViewUp view up vector
aFocalPoint focal point coordinates
aEyePosition eye position cooridinates
aClippingRangeMin minimum of the clipping range
aClippingRangeMax maximum of the clipping range
aViewAngle view angle

Member Function Documentation 244


MPI Application Programming Interface
aParallelScale parallel scale

Example
This example adds a book mark.
Set Syn = CreateObject("synergy.Synergy")
Set Viewer = Syn.Viewer()
Set ViewNormal = Syn.CreateVector()
ViewNOrmal.SetXYZ 0.0, 0.0, 1.0
Set ViewUp = Syn.CreateVector()
ViewUp.SetXYZ 0.0, 1.0, 0.0
Set FocalPoint = Syn.CreateVector()
FocalPoint.SetXYZ 40, 50, 8
Set EyePosition = Syn.CreateVector()
EyePosition.SetXYZ 40, 50, 6500
Viewer.AddBookmark "MyBookmark", ViewNormal, ViewUp, FocalPoint, EyePosition, 60

Object GetActivePlot ( )
Gets the active plot, if any

Returns:
Plot object

ShowPlot ( Object aPlot )


Shows a plot in the viewer

Parameters:
aPlot Plot object

Example:
This example shows plot with
ID 14.
Set Plot = Viewer.GetPlot(14)
Viewer.ShowPlot Plot

HidePlot ( Object aPlot )


Hides a plot object that is being shown in the viewer

Parameters:
aPlot Plot object

Example:
This example hides plot 14.
Set Plot = Viewer.GetPlot(14)
Viewer.HidePlot Plot

OverlayPlot ( Object aPlot )


Overlays a plot on another plot in the viewer

Parameters:
aPlot Plot object that is to be overlaid

Example

Member Function Documentation 245


MPI Application Programming Interface
This example overlays plot 3 with current
plot.
Set Viewer = Synergy.Viewer()
Set Plot_2 = Viewer.GetPlot(3)
Viewer.OverlayPlot Plot_2

Object GetPlot ( long aId )


Gets a plot in the viewer based on an ID

Parameters:
aId plot ID

Returns:
Plot object

Example:
This example gets plot with ID 3.
Set Plot = Viewer.GetPlot( 3 )

Center ( double aCenterX,


double aCenterY
)
Centers the view about a point directly under the specified screen location

Parameters:
aCenterX specify values between 0 (left) to 1 (right)
aCenterY specify values between 0 (bottom) to 1 (top)

Example:
This example centers the view at (0.1 0.4)
Viewer.Center 0.1, 0.4

Object WorldToDisplay ( Object aWorldXyz )


Convert world (3D) coordinates to normalized screen (display) coordinates

Parameters:
aWorldXyz Vector object that specifies a world coordinate

Returns:
Vector object that corresponds to the screen coordinate; screen coordinates
are normalized between 0 and 1 as described in Center

Example:
This example converts world coordinate (10 10 10) to screen coordinates.
Vec = Synergy.CreateVector()
Vec.AddXYZ 10, 10, 10
Vec1 = Viewer.WorldToDisplay Vec

Object CreateClippingPlane ( Object aNormal,


double aD
)

Member Function Documentation 246


MPI Application Programming Interface
Creates a new clipping plane

Parameters:
aNormal Vector object that specifies the clipping plane normal
aD distance from the origin to the clipping plane

Returns:
EntList object containing the clipping plane that was created

Example
This example creates a new clipping plane with given vector and
ID 5.
Vec = Synergy.CreateVector()
Vec.AddXYZ 10, 20, 14
Viewer.CreateClippingPlane Vec, 5

Object CreateDefaultClippingPlane ( )
Creates a "default" clipping plane

Returns:
EntList object containing the clipping plane that was
created

Example
This example creates a "default" clipping plane.
Viewer.CreateDefaultClippingPlane

DeleteClippingPlane ( Object aPlane )


Deletes a clipping plane

Parameters:
aPlane EntList object containing the clipping plane to be
deleted

See also:
DeleteClippingPlaneByID

Example:
This example deletes first clipping plane.
ClipPlane = Viewer.GetFirstClippingPlane
Viewer.DeleteClippingPlane ClipPlane

Object GetFirstClippingPlane ( )
Gets the first clipping plane in the view

Returns:
EntList object containing the first clipping
plane

Example:
This example enables first clipping plane.

Member Function Documentation 247


MPI Application Programming Interface
ClipPlane = Viewer.GetFirstClippingPlane
Viewer.EnableClippingPlane ClipPlane False

Object GetNextClippingPlane ( Object aPlane )


Gets the next clipping plane in the view

Parameters:
aPlane EntList object containing a clipping
plane

Returns:
EntList object containing the next clipping
plane

Example:
This example enables second clipping plane.
ClipPlane = Viewer.GetFirstClippingPlane
ClipPlane2 = Viewer.GetNextClippingPlane( ClipPlane )
Viewer.EnableClippingPlane ClipPlane2 False

EnableClippingPlane ( Object aPlane,


Boolean aEnable
)
Enables a clipping plane

Parameters:
aPlane EntList object containing a clipping
plane
aEnable True to enable; False to disable

See also:
EnableClippingPlaneByID

Example:
This example disable first clipping plane.
ClipPlane = Viewer.GetFirstClippingPlane
Viewer.EnableClippingPlane ClipPlane False

Object GetActiveClippingPlane ( )
Gets the active clipping plane

Returns:
EntList object containing the active clipping
plane

Example:
This example gets active clipping plane.
Plane = Viewer.GetActiveClippingPlane

SetActiveClippingPlane ( Object aPlane )


Sets the active clipping plane in the view

Member Function Documentation 248


MPI Application Programming Interface
Parameters:
aPlane EntList object containing a clipping
plane

Example:
This example sets first clipping plane active.
Plane = Viewer.GetFirstClippingPlane()
Viewer.SetActiveClippingPlane Plane

ShowPlotFrame ( Object aPlot,


long aFrame
)
Shows a specified animation frame in a plot

Parameters:
aPlot plot
aFrame index of the frame to be shown

Example:
This example shows animation frame 7 of first
plot.
Plot = Viewer.GetFirstPlot
Viewer.ShowPlotFrame Plot 7

Boolean SaveImage2 ( String aFileName,


long aSizeX,
long aSizeY
)
Saves the view image to a file with given x and y sizes

Parameters:
aFileName file name

Note:
The file format will be automatically determined from the file extension

Parameters:
aX X size
aY Y size

Example
This example saves view image to "c:\temp\myImage.jpg" wize X size 400 and
Y size 300
Viewer.SaveImage2 "c:\temp\myImage.jpg", 400, 300

Boolean SetViewSize ( long aSizeX,


long aSizeY
)
Change the active view size

Member Function Documentation 249


MPI Application Programming Interface
Parameters:
aSizeX X size in pixel
aSizeY Y size in pixel

Example
This example changes the view size to 400x300
pixels
Viewer.SetViewSize 400, 300

double GetRotationX ( )
Shows the current rotation angle in X axis

Example:
This example shows X rotation angle.
MsgBox "Rotation X: " & Viewer.GetRotationX

double GetRotationY ( )
Shows the current rotation angle in Y axis

Example:
This example shows Y rotation angle.
MsgBox "Rotation Y: " & Viewer.GetRotationY

double GetRotationZ ( )
Shows the current rotation angle in Z axis

Example:
This example shows Z rotation angle.
MsgBox "Rotation Z: " & Viewer.GetRotationZ

Member Function Documentation 250


MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MPI Application Programming Interface Compound


Members
a|b|c|d|e|f|g|h|i|j|l|m|n|o|p|r|s|t|u|v|w|x|y|z

Here is a list of all documented class members with links to the classes they belong to:

-a-
• AbortJob() : JobMgr
• AbortJobByID() : JobMgr
• AbortJobByIndex() : JobMgr
• AbortMyJobsOnServer() : JobMgr
• AbortMyJobsOnServerByAddress() : JobMgr
• AbortMyJobsOnServerByName() : JobMgr
• ActivateLayer() : LayerManager
• ActivateLCS() : Modeler
• AddBookmark() : Viewer
• AddDefaultPlots() : PlotMgr
• AddDouble() : DoubleArray
• AddFile() : StudyDoc
• AddInteger() : IntegerArray
• AddProbePlotProbeLine() : Plot
• Address : Server
• AddScalarData() : UserPlot
• AddServer() : JobMgr
• AddTensorData() : UserPlot
• AddXYPlotCurve() : Plot
• AddXYPlotData() : UserPlot
• AddXYZ() : VectorArray
• AlignGates : ModelDuplicator
• AlignNodes() : MeshEditor
• AlignNormals() : MeshEditor
• AnalysisName : StudyDoc, Job
• AnalysisSequence : StudyDoc
• AnalysisStatus() : StudyDoc
• AnalyzeNow() : StudyDoc
• AnalyzeNow2() : StudyDoc
• ApplyAnchorPlane() : PlotMgr
• ApplyBestFit() : Plot
• AssignToLayer() : LayerManager
• AutoFix() : MeshEditor
• AutomaticTetraOptimization : MeshGenerator
• AveAspectRatio : MeshSummary

MPI Application Programming Interface Compound Members 251


MPI Application Programming Interface

-b-
• BeamsCount : MeshSummary
• Bottom : RunnerGenerator
• BoundaryConditions : Synergy
• BreakCurves() : Modeler
• Build : UserPlot, Synergy
• BuildBirefringencePlot() : UserPlot
• BuildClampForcePlot() : UserPlot
• BuildDeflectionPlot() : UserPlot
• BuildModulusPlot() : UserPlot
• BuildWeldlinePlot() : UserPlot
• ByColumns : ModelDuplicator

-c-
• Center() : Viewer
• Centered : MoldSurfaceGenerator
• ChordHeight : MeshGenerator
• ChordHeightControl : MeshGenerator
• ChordHtProximity : MeshGenerator
• CircuitGenerator : Synergy
• Clear() : VectorArray
• ClientAddress : Job
• ClientPort : Job
• Close() : StudyDoc, Project
• CommandLine : Job
• CommitChanges() : PropertyEditor
• Compact() : Project
• ConnectivityRegions : MeshSummary
• ConvertToBeams() : MeshEditor
• ConvertToString() : EntList, BoundaryList
• ConvertWedgesToTetras() : MeshEditor
• CreateAnchorPlane() : PlotMgr
• CreateArcByAngle() : Modeler
• CreateArcByPoints() : Modeler
• CreateBeams() : MeshEditor
• CreateBeamsByPoints() : MeshEditor
• CreateBookmark() : Viewer
• CreateBoolAndPredicate() : PredicateManager
• CreateBoolNotPredicate() : PredicateManager
• CreateBoolOrPredicate() : PredicateManager
• CreateBoolXorPredicate() : PredicateManager
• CreateBoundaryList() : Modeler
• CreateClippingPlane() : Viewer
• CreateCriticalDimension() : BoundaryConditions
• CreateCurveByConnect() : Modeler
• CreateDefaultClippingPlane() : Viewer
• CreateDoubleArray() : Synergy

-b- 252
MPI Application Programming Interface
• CreateEdgeLoads() : BoundaryConditions
• CreateElementalLoads() : BoundaryConditions
• CreateEntityList() : StudyDoc, PropertyEditor, Modeler, MeshEditor,
LayerManager, DiagnosisManager, BoundaryConditions
• CreateFixedConstraints() : BoundaryConditions
• CreateGeneralConstraints() : BoundaryConditions
• CreateHoleByBoundary() : Modeler
• CreateHoleByNodes() : Modeler
• CreateIntegerArray() : Synergy
• CreateLabelPredicate() : PredicateManager
• CreateLayer() : LayerManager
• CreateLayerByName() : LayerManager
• CreateLCSByPoints() : Modeler
• CreateLine() : Modeler
• CreateNDBC() : BoundaryConditions
• CreateNDBCAtXYZ() : BoundaryConditions
• CreateNodalLoads() : BoundaryConditions
• CreateNodeByIntersect() : Modeler
• CreateNodeByXYZ() : Modeler
• CreateNodesBetween() : Modeler
• CreateNodesByDivide() : Modeler
• CreateNodesByOffset() : Modeler
• CreatePinConstraints() : BoundaryConditions
• CreatePlotByDsID() : PlotMgr
• CreatePlotByName() : PlotMgr
• CreatePressureLoads() : BoundaryConditions
• CreateProperty() : PropertyEditor
• CreatePropertyPredicate() : PredicateManager
• CreatePropTypePredicate() : PredicateManager
• CreateRegionByBoundary() : Modeler
• CreateRegionByExtrusion() : Modeler
• CreateRegionByNodes() : Modeler
• CreateRegionByRuling() : Modeler
• CreateSpline() : Modeler
• CreateSpringConstraints() : BoundaryConditions
• CreateTemperatureLoads() : BoundaryConditions
• CreateTet() : MeshEditor
• CreateThicknessPredicate() : PredicateManager
• CreateTri() : MeshEditor
• CreateUserPlot() : PlotMgr
• CreateVector() : Synergy
• CreateVectorArray() : Synergy
• CreateVolumeLoads() : BoundaryConditions
• CreateWedge() : MeshEditor
• CreateXSectionPredicate() : PredicateManager
• CreateXYPlotByName() : PlotMgr

-c- 253
MPI Application Programming Interface

-d-
• DataHasXYPlotByDsID() : PlotMgr
• DataHasXYPlotByName() : PlotMgr
• DataTransform : Synergy
• DefaultServer : JobMgr
• Delete() : MeshEditor
• DeleteAnchorPlaneByIndex() : PlotMgr
• DeleteAnchorPlaneByName() : PlotMgr
• DeleteBookmark() : Viewer
• DeleteClippingPlane() : Viewer
• DeleteClippingPlaneByID() : Viewer
• DeleteField() : Property
• DeleteItemByIndex() : Project
• DeleteItemByName() : Project
• DeleteLayer() : LayerManager
• DeleteOld : RunnerGenerator, CircuitGenerator
• DeletePlot() : PlotMgr
• DeletePlotByDsID() : PlotMgr
• DeletePlotByName() : PlotMgr
• DeleteProperty() : PropertyEditor
• DeleteResults() : StudyDoc
• DeleteServer() : JobMgr
• DeleteServerByAddress() : JobMgr
• DeleteServerByName() : JobMgr
• DeleteXYPlotCurve() : Plot
• DiagnosisManager : Synergy
• Diameter : CircuitGenerator
• Dimensions : MoldSurfaceGenerator
• Distance : CircuitGenerator
• DropDiameter : RunnerGenerator
• DropTaperAngle : RunnerGenerator
• DuplicatedBeams : MeshSummary
• DuplicateStudyByIndex() : Project
• DuplicateStudyByIndex2() : Project
• DuplicateStudyByName() : Project
• DuplicateStudyByName2() : Project

-e-
• EdgeLength : MeshGenerator
• ElementReduction : MeshGenerator
• EnableClippingPlane() : Viewer
• EnableClippingPlaneByID() : Viewer
• Entity() : EntList, BoundaryList
• ExpandLayer() : LayerManager
• Export() : Project
• Export2() : Project
• ExportAnalysisLog() : StudyDoc

-d- 254
MPI Application Programming Interface
• ExportMeshLog() : StudyDoc
• ExportModel() : Project
• ExportModel2() : Project

-f-
• FetchProperty() : PropertyEditor
• FieldDescription : Property
• FieldValues : Property
• FillHole() : MeshEditor
• FindDatasetIdByName() : PlotMgr
• FindDatasetIdsByName() : PlotMgr
• FindJobByID() : JobMgr
• FindLayerByName() : LayerManager
• FindPlotByName() : PlotMgr
• FindPlotByName2() : PlotMgr
• FindProperty() : PropertyEditor, Modeler
• FindServer() : Job
• FinishTime : Job
• Fit() : Viewer
• FlipNormals() : MeshEditor
• FreeEdgeCount : MeshSummary
• FromVBSArray() : IntegerArray, DoubleArray
• Func() : DataTransform
• FusionArea : MeshSummary

-g-
• GateAngle : RunnerGenerator
• GateDiameter : RunnerGenerator
• GateLength : RunnerGenerator
• GatePlaneZ : RunnerGenerator
• GatesByLength : RunnerGenerator
• GatesCenterX : RunnerGenerator
• GatesCenterY : RunnerGenerator
• GateTaperAngle : RunnerGenerator
• Generate() : RunnerGenerator, MoldSurfaceGenerator, ModelDuplicator,
CircuitGenerator, MeshGenerator
• GetActiveClippingPlane() : Viewer
• GetActiveIndpVar() : Plot
• GetActivePlot() : Viewer
• GetAnchorPlaneIndex() : PlotMgr
• GetAnchorPlaneNode() : PlotMgr
• GetAnimationType() : Plot
• GetAspectRatioDiagnosis() : DiagnosisManager
• GetAspectRatioDiagnosis2() : DiagnosisManager
• GetCapping() : Plot
• GetColorBands() : Plot

-e- 255
MPI Application Programming Interface
• GetColorScale() : Plot
• GetComponent() : Plot
• GetConnectivityDiagnosis() : DiagnosisManager
• GetConnectivityDiagnosis2() : DiagnosisManager
• GetDataDisplayFormat() : PlotMgr
• GetDataID() : Plot
• GetDataNbComponents() : PlotMgr, Plot
• GetDataType() : PlotMgr, Plot
• GetDeflectionOverlayWithMesh() : Plot
• GetDeflectionScaleDirection() : Plot
• GetDeflectionScaleFactor() : Plot
• GetDeflectionShowAnchorPlane() : Plot
• GetEdgeDisplay() : Plot
• GetEdgesDiagnosis() : DiagnosisManager
• GetEdgesDiagnosis2() : DiagnosisManager
• GetElemNodes() : StudyDoc
• GetEntityID() : StudyDoc
• GetEntityLayer() : StudyDoc
• GetEntityProperty() : PropertyEditor
• GetExtendedColor() : Plot
• GetFirst() : LayerManager
• GetFirstAnimationFrameIndex() : Plot
• GetFirstBeam() : StudyDoc
• GetFirstClippingPlane() : Viewer
• GetFirstField() : Property
• GetFirstNode() : StudyDoc
• GetFirstPlot() : PlotMgr
• GetFirstProperty() : PropertyEditor
• GetFirstReportName() : Project
• GetFirstStudyName() : Project
• GetFirstTet() : StudyDoc
• GetFirstTri() : StudyDoc
• GetIndpValues() : PlotMgr
• GetIndpVarCount() : PlotMgr
• GetJob() : JobMgr
• GetLastAnimationFrameIndex() : Plot
• GetMatchInfoDiagnosis() : DiagnosisManager
• GetMaxValue() : Plot
• GetMeshFill() : Plot
• GetMeshSummary() : DiagnosisManager
• GetMinValue() : Plot
• GetName() : Plot, LayerManager
• GetNext() : LayerManager
• GetNextBeam() : StudyDoc
• GetNextClippingPlane() : Viewer
• GetNextField() : Property
• GetNextNode() : StudyDoc
• GetNextPlot() : PlotMgr
• GetNextProperty() : PropertyEditor
• GetNextPropertyOfType() : PropertyEditor
• GetNextReportName() : Project

-g- 256
MPI Application Programming Interface
• GetNextStudyName() : Project
• GetNextTet() : StudyDoc
• GetNextTri() : StudyDoc
• GetNodalAveraging() : Plot
• GetNodeCoord() : StudyDoc
• GetNonmeshData() : PlotMgr
• GetNotes() : Plot
• GetNumberOfAnchorPlanes() : PlotMgr
• GetNumberOfAnimationFrames() : Plot
• GetNumberOfContours() : Plot
• GetNumberOfFrames() : Plot
• GetNumberOfIndpVars() : Plot
• GetNumberOfResultsFiles() : PlotMgr
• GetOccurrenceDiagnosis() : DiagnosisManager
• GetOccurrenceDiagnosis2() : DiagnosisManager
• GetOrientationDiagnosis() : DiagnosisManager
• GetOrientationDiagnosis2() : DiagnosisManager
• GetOverlapDiagnosis() : DiagnosisManager
• GetOverlapDiagnosis2() : DiagnosisManager
• GetPlot() : Viewer
• GetPlotMethod() : Plot
• GetPlotType() : Plot
• GetProbePlotNumberOfProbeLines() : Plot
• GetProbePlotProbeLine() : Plot
• GetResultPrefix() : StudyDoc
• GetResultsFileName() : PlotMgr
• GetRotationX() : Viewer
• GetRotationY() : Viewer
• GetRotationZ() : Viewer
• GetScalarData() : PlotMgr
• GetScaleOption() : Plot
• GetServer() : JobMgr
• GetSmoothShading() : Plot
• GetSurfWithBadTrimCurv() : DiagnosisManager
• GetSurfWithFreeTrimCurv() : DiagnosisManager
• GetTensorData() : PlotMgr
• GetThicknessDiagnosis() : DiagnosisManager
• GetThicknessDiagnosis2() : DiagnosisManager
• GetUnits() : Synergy
• GetUseSingleColor() : Plot
• GetVectorData() : PlotMgr
• GetXYPlotAutoRangeX() : Plot
• GetXYPlotAutoRangeY() : Plot
• GetXYPlotLegendRectBottom() : Plot
• GetXYPlotLegendRectHeight() : Plot
• GetXYPlotLegendRectLeft() : Plot
• GetXYPlotLegendRectWidth() : Plot
• GetXYPlotMaxNumberOfCurves() : Plot
• GetXYPlotMaxX() : Plot
• GetXYPlotMaxY() : Plot
• GetXYPlotMinX() : Plot

-g- 257
MPI Application Programming Interface
• GetXYPlotMinY() : Plot
• GetXYPlotNumberOfCurves() : Plot
• GetXYPlotOverlayWithMesh() : Plot
• GetXYPlotShowLegend() : Plot
• GetXYPlotShowPoints() : Plot
• GetXYPlotTitleX() : Plot
• GetXYPlotTitleY() : Plot
• GetZeroAreaElementsDiagnosis() : DiagnosisManager
• GetZeroAreaElementsDiagnosis2() : DiagnosisManager
• GlobalMerge() : MeshEditor
• GoToBookmark() : Viewer
• GoToStandardView() : Viewer

-h-
• HaltBatchQueue() : JobMgr
• HideAllOtherLayers() : LayerManager
• HidePlot() : Viewer
• HotRunners : RunnerGenerator

-i-
• ID : Property
• ImportFile() : Synergy
• ImportMachineData() : StudyDoc
• ImportOptions : Synergy
• ImportProcessCondition() : StudyDoc
• ImportProcessVariation() : StudyDoc
• InsertNode() : MeshEditor
• InsertNodeInTet() : MeshEditor
• InsertNodeInTetByNodes() : MeshEditor
• InsertNodeInTri() : MeshEditor
• IntersectionElements : MeshSummary
• IsCheckAnalysis() : Job

-j-
• JobID : Job
• JobManager : Synergy
• JobType : Job

-l-
• LayerManager : Synergy

-h- 258
MPI Application Programming Interface

-m-
• MakeRegion() : MeshEditor
• MakeRegion2() : MeshEditor
• ManifoldEdgeCount : MeshSummary
• MarkAllResultsForExport() : PlotMgr
• MarkResultForExport() : PlotMgr
• Match : MeshGenerator
• MatchNodes() : MeshEditor
• MatchRatio : MeshSummary
• MaterialSelector : Synergy
• MaxAspectRatio : MeshSummary
• MaximumMatchDistance : MeshGenerator
• MaximumMatchDistanceOption : MeshGenerator
• MDLAutoEdgeSelect : ImportOptions
• MDLChordAngle : ImportOptions
• MDLChordAngleSelect : ImportOptions
• MDLContactMeshType : ImportOptions
• MDLEdgeLength : ImportOptions
• MDLKernel : ImportOptions
• MDLMesh : ImportOptions
• MDLSliverRemoval : ImportOptions
• MDLSurfaces : ImportOptions
• MDLTetraLayers : ImportOptions
• MergeCavityRunner : MeshGenerator
• MergeNodes() : MeshEditor
• MergeTolerance : MeshGenerator
• MeshEditor : Synergy
• MeshGenerator : Synergy
• MeshNow() : StudyDoc
• MeshStatus() : StudyDoc
• MeshType : StudyDoc, ImportOptions
• MeshVolume : MeshSummary
• MinAspectRatio : MeshSummary
• ModelDuplicator : Synergy
• Modeler : Synergy
• ModelName : Job
• MoldingProcess : StudyDoc
• MoldSurfaceGenerator : Synergy
• MoveBeamNode() : MeshEditor
• MoveNDBC() : BoundaryConditions
• MoveNDBCToXYZ() : BoundaryConditions
• MoveNodes() : MeshEditor
• MoveNodeToEdge() : MeshEditor

-n-
• Name : Server, Property
• NewFolder() : Project

-m- 259
MPI Application Programming Interface
• NewProject() : Synergy
• NewStudy() : Project
• NodesCount : MeshSummary
• NonManifoldEdgeCount : MeshSummary
• NumberOfAnalyses : StudyDoc
• NumberOfJobs : JobMgr
• NumberOfServers : JobMgr
• NumCavities : ModelDuplicator
• NumChannels : CircuitGenerator
• NumCols : ModelDuplicator
• NumRows : ModelDuplicator
• NurbsMesher : MeshGenerator

-o-
• Op() : DataTransform
• OpenItemByIndex() : Project
• OpenItemByName() : Project
• OpenItemCompareMode() : Project
• OpenProject() : Synergy
• OpenRecentProject() : Synergy
• Orient() : MeshEditor
• Origin : MoldSurfaceGenerator
• Overhang : CircuitGenerator
• OverlapElements : MeshSummary
• OverlayPlot() : Viewer

-p-
• Pan() : Viewer
• PartCenterX : RunnerGenerator
• PartCenterY : RunnerGenerator
• PartingZ : RunnerGenerator
• Path : Project
• PlotManager : Synergy
• PostMeshActions : MeshGenerator
• PredicateManager : Synergy
• Print() : Viewer
• Priority : Job
• Project : Synergy
• ProjectMesh() : MeshEditor
• PropertyEditor : Synergy
• PurgeNodes() : MeshEditor

-n- 260
MPI Application Programming Interface

-r-
• Redo() : StudyDoc
• RefineTetras() : MeshEditor
• Reflect() : Modeler
• Regenerate() : Plot
• RemeshAll : MeshGenerator
• RemeshArea() : MeshEditor
• RemeshArea2() : MeshEditor
• RemoveEmptyLayers() : LayerManager
• RemoveUnusedProperties() : PropertyEditor
• RenameItemByIndex() : Project
• RenameItemByName() : Project
• Reset() : Viewer
• ResetView() : Viewer
• RestartFile : Job
• RestoreOriginalPosition() : Plot
• ResultName : Job
• Rotate() : Viewer, Modeler
• Rotate3Pts() : Modeler
• RotateBy() : Viewer
• RotateXBy() : Viewer
• RotateYBy() : Viewer
• RotateZBy() : Viewer
• RunnerDiameter : RunnerGenerator
• RunnerGenerator : Synergy
• RunnerVolume : MeshSummary

-s-
• Save() : StudyDoc
• SaveAll() : Project
• SaveAnimation() : Viewer
• SaveAs() : StudyDoc
• SaveImage() : Viewer
• SaveImage2() : Viewer
• SaveOptions() : MeshGenerator
• SaveResultDataInPatran() : PlotMgr
• SaveResultDataInXML() : PlotMgr
• SaveResultDataInXML2() : PlotMgr
• SaveResultInPatran() : Plot
• SaveResultInPatran2() : Plot
• SaveResultInXML() : Plot
• SaveResultInXML2() : Plot
• SaveWarpedShapeInSTL() : Plot
• SaveWarpedShapeInSTL2() : Plot
• SaveWarpedShapeInUDM() : Plot
• SaveXYPlotCurveData() : Plot
• Scalar() : DataTransform

-r- 261
MPI Application Programming Interface
• Scale() : Modeler
• ScaleMeshDensity() : Modeler
• ScheduleAnalysisOnStudy() : Project
• ScheduleCheckOnStudy() : Project
• ScheduleMeshOnStudy() : Project
• ScheduleTime : Job
• Select() : MaterialSelector
• SelectFromPredicate() : EntList
• SelectFromSavedList() : EntList
• SelectFromString() : EntList, BoundaryList
• Selection : StudyDoc
• SetActiveClippingPlane() : Viewer
• SetActiveIndpVar() : Plot
• SetAnchorPlaneName() : PlotMgr
• SetAnchorPlaneNodes() : PlotMgr
• SetAnimationType() : Plot
• SetApplicationWindowPos() : Synergy
• SetCapping() : Plot
• SetColorBands() : Plot
• SetColorScale() : Plot
• SetComponent() : Plot
• SetDataDisplayFormat() : PlotMgr
• SetDataType() : UserPlot
• SetDeflectionOverlayWithMesh() : Plot
• SetDeflectionScaleDirection() : Plot
• SetDeflectionScaleFactor() : Plot
• SetDeflectionShowAnchorPlane() : Plot
• SetDeptName() : UserPlot
• SetDeptUnitName() : UserPlot
• SetEdgeDisplay() : Plot
• SetExtendedColor() : Plot
• SetFirstAnimationFrameIndex() : Plot
• SetFixedIndpVarValue() : Plot
• SetHighlightData() : UserPlot
• SetIndpName() : UserPlot
• SetIndpUnitName() : UserPlot
• SetLastAnimationFrameIndex() : Plot
• SetLayerName() : LayerManager
• SetMaxValue() : Plot
• SetMeshFill() : Plot
• SetMeshSize() : Modeler
• SetMinValue() : Plot
• SetName() : UserPlot, Plot
• SetNodalAveraging() : Plot
• SetNotes() : Plot
• SetNumberOfAnimationFrames() : Plot
• SetNumberOfContours() : Plot
• SetNumberOfFrames() : Plot
• SetPlotMethod() : Plot
• SetProbePlotProbeLine() : Plot
• SetProhibitedGateNodes() : BoundaryConditions

-s- 262
MPI Application Programming Interface
• SetProperty() : PropertyEditor
• SetScalarData() : UserPlot
• SetScaleOption() : Plot
• SetSmoothShading() : Plot
• SetTypeColor() : LayerManager
• SetTypeDisplayOption() : LayerManager
• SetTypeShowLabels() : LayerManager
• SetTypeVisible() : LayerManager
• SetUnits() : Synergy
• SetUseSingleColor() : Plot
• SetVectorAsDisplacement() : UserPlot
• SetVectorData() : UserPlot
• SetViewMode() : Viewer
• SetViewSize() : Viewer
• SetXYPlotAutoRangeX() : Plot
• SetXYPlotAutoRangeY() : Plot
• SetXYPlotData() : UserPlot
• SetXYPlotLegendRectBottom() : Plot
• SetXYPlotLegendRectHeight() : Plot
• SetXYPlotLegendRectLeft() : Plot
• SetXYPlotLegendRectWidth() : Plot
• SetXYPlotMaxNumberOfCurves() : Plot
• SetXYPlotMaxX() : Plot
• SetXYPlotMaxY() : Plot
• SetXYPlotMinX() : Plot
• SetXYPlotMinY() : Plot
• SetXYPlotOverlayWithMesh() : Plot
• SetXYPlotShowLegend() : Plot
• SetXYPlotShowPoints() : Plot
• SetXYPlotTitle() : Plot
• SetXYPlotTitleX() : Plot
• SetXYPlotTitleY() : Plot
• SetXYPlotXTitle() : UserPlot
• SetXYPlotXUnitName() : UserPlot
• SetXYPlotYUnitName() : UserPlot
• SetXYZ() : Vector
• ShowAllLayers() : LayerManager
• ShowAspectRatio() : DiagnosisManager
• ShowAspectRatio2() : DiagnosisManager
• ShowBeamElementCount() : DiagnosisManager
• ShowBubblerBaffleCheck() : DiagnosisManager
• ShowCentroidCloseness() : DiagnosisManager
• ShowConnect() : DiagnosisManager
• ShowConnect2() : DiagnosisManager
• ShowCoolingCircuitValidity() : DiagnosisManager
• ShowDimensions() : DiagnosisManager
• ShowEdges() : DiagnosisManager
• ShowEdges2() : DiagnosisManager
• ShowLabels() : LayerManager
• ShowLDRatio() : DiagnosisManager
• ShowMatchInfo() : DiagnosisManager

-s- 263
MPI Application Programming Interface
• ShowMatchInfo2() : DiagnosisManager
• ShowOccurrence() : DiagnosisManager
• ShowOccurrence2() : DiagnosisManager
• ShowOrient() : DiagnosisManager
• ShowOrient2() : DiagnosisManager
• ShowOverlapping() : DiagnosisManager
• ShowOverlapping2() : DiagnosisManager
• ShowOverlapping3() : DiagnosisManager
• ShowPlot() : Viewer
• ShowPlotFrame() : Viewer
• ShowSummary() : DiagnosisManager
• ShowSurfWithBadTrimCurv() : DiagnosisManager
• ShowSurfWithFreeTrimCurv() : DiagnosisManager
• ShowThickness() : DiagnosisManager
• ShowThickness2() : DiagnosisManager
• ShowTrappedBeam() : DiagnosisManager
• ShowZeroAreaElements() : DiagnosisManager
• ShowZeroAreaElements2() : DiagnosisManager
• Size : VectorArray, IntegerArray, EntList, DoubleArray, BoundaryList
• Smoothing : MeshGenerator
• SmoothNodes() : MeshEditor
• SourceGeomType : MeshGenerator
• Spacing : CircuitGenerator
• SprueDiameter : RunnerGenerator
• SprueLength : RunnerGenerator
• SprueTaperAngle : RunnerGenerator
• SprueX : RunnerGenerator
• SprueY : RunnerGenerator
• StartBatchQueue() : JobMgr
• StartTime : Job
• Status : Server, Job
• StitchFreeEdges2() : MeshEditor
• StudyDoc : Synergy
• StudyName : StudyDoc
• SwapEdge() : MeshEditor

-t-
• TetraLayers : MeshGenerator
• TetraMaxAR : MeshGenerator
• TetraRefine : MeshGenerator
• TetrasCount : MeshSummary
• ToggleLayer() : LayerManager
• Top : RunnerGenerator
• TopGateEndDiameter : RunnerGenerator
• TopGateLength : RunnerGenerator
• TopGateStartDiameter : RunnerGenerator
• TopRunnerZ : RunnerGenerator
• ToVBSArray() : IntegerArray, DoubleArray

-t- 264
MPI Application Programming Interface
• Translate() : Modeler
• Trapezoidal : RunnerGenerator
• TrapezoidAngle : RunnerGenerator
• TrianglesCount : MeshSummary
• Type : Property

-u-
• Undo() : StudyDoc
• Units : ImportOptions
• Unoriented : MeshSummary
• UpdateDimensionalDisplay() : DiagnosisManager
• UpdateThicknessDisplay() : DiagnosisManager
• UseActiveLayer : MeshGenerator
• UseHoses : CircuitGenerator
• UseMDL : ImportOptions
• User : Job
• UseTetrasOnEdge : MeshGenerator

-v-
• Val() : IntegerArray, DoubleArray
• Version : Synergy
• Viewer : Synergy

-w-
• WarpQueryBegin() : PlotMgr, Plot
• WarpQueryEnd() : PlotMgr, Plot
• WarpQueryNode() : PlotMgr, Plot
• WorkingFolder : Job
• WorldToDisplay() : Viewer

-x-
• X : VectorArray, Vector
• XAlign : CircuitGenerator
• XSpacing : ModelDuplicator

-y-
• Y : VectorArray, Vector
• YSpacing : ModelDuplicator

-u- 265
MPI Application Programming Interface

-z-
• Z : VectorArray, Vector
• ZeroBeams : MeshSummary
• ZeroTriangles : MeshSummary
• Zoom() : Viewer

-z- 266
MPI Application Programming Interface

Main Page Alphabetical List Compound List Compound Members Related Pages

MPI Application Programming Interface Related


Pages
Here is a list of all related documentation pages:

• VBScript Data Subtypes Used in the API

MPI Application Programming Interface Related Pages 267


MPI Application Programming Interface
Main Page Alphabetical List Compound List Compound Members Related Pages

VBScript Data Subtypes Used in the API


VBS uses a single type to represent data in scripts: the Variant type. This type is
capable of holding various subtypes that are useful for different programming tasks.
The following VBS data subtypes are used in the API: Double, Long, Boolean, String,
and Object.

Boolean
The Boolean subtype is used to for logical values that can have one of the two values:
True or False

Example:
Set LayerManager = Synergy.LayerManager()
Set EntList = LayerManager.CreateEntityList()
EntList.SelectFromString "L3 "
LayerManager.SetTypeVisible EntList, 7, False

Double
The Double subtype is used for floating point numbers that can range from
-1.798E308 to 1.798E308

Example
Vector.AddXYZ 10.89, 3.456, 9.22

Long
The Long subtype is used for signed integer values that can range from -2^32 to 2^32

Example
Plot.SetNumberOfFrames 10

String
The String subtype is used for character strings. String lengths are essentially
unlimited of characters.

Example
Plot.SetPlotName "XY Plot"

VBScript Data Subtypes Used in the API 268


MPI Application Programming Interface

Object
The Object subtype is used for all automation objects

Example
Both Syn and SD below are objects.
Set Syn = CreateObject("synergy.Synergy")
Set SD = Syn.StudyDoc

Object 269

You might also like