CAE Operations

xSetCAEResult

Sets specified CAE result, instance and derived result.

bool xSetCAEResult (String sModel, String sResult, String sInstance, String sDerived)

return

Returns True, if successful.

sModel

Specified model to apply the result.

Note 1: This specified model will become the current CAE model.

Note 2: Sets Model as an empty String to set the result for the current model.

sResult

Result name.

sInstance

Instance name of the result.

sDerived

Derived result name. Can be an empty String for the scalar result.

xHasCAEResult

Gets state of CAE model there in the current scene.

bool xHasCAEResult()

return

Returns True if there is a model with CAE results in the scene.

xGetCAEResultsList

Gets all CAE result names of a model.

String xGetCAEResultsList (const String sModel)

return

Returns all CAE result names for the model in a String that is needed to get parsed.

sModel

Get results list of this specified model.

Note: Model as an empty String will return the current model’s results.

xGetCAEInstanceList

Gets all instances names for a result.

String xGetCAEInstanceList (String sModel, String sResult)

return

Returns all the instance names in a String that to get parsed.

sModel

Reserved for future use. Can be ignored now by passing an empty String.

sResult

CAE result name.

xCAEGetDefaultDerivedResult

Gets Default derived result for a result.

String xCAEGetDefaultDerivedResult(String sModel, String sResult)

return

Returns default derived result name.

sModel

Reserved for future use. Ignore now and pass an empty String.

sResult

Result Name for which derived result is required.

xGetCAEResultType

Gets the type of results like scalar, vector or tensor.

short xGetCAEResultType(String sModel, String sResult)

return

Returns result type index. The following table indicates results types.

case 0  - NODAL_SCALAR
case 1  - NODAL_VECTOR
case 2  - NODAL_SIXDOF
case 3  - NODAL_TENSOR
case 4  - ELEMENTAL_SCALAR
case 5  - ELEMENTAL_VECTOR
case 6  - ELEMENTAL_SIXDOF
case 7  - ELEMENTAL_TENSOR
case 8  - ELEMENT_NODAL_SCALAR
case 9  - ELEMENT_NODAL_VECTOR
case 10 - ELEMENT_NODAL_SIXDOF
case 11 - ELEMENT_NODAL_TENSOR

sModel

Reserved for future use. Ignore now and pass an empty String.

sResult

Result Name for which type is required.

pxGetCAECurrentResult

Gets CAE result,instance,derived names currently applied for a model.

List<String> pxGetCAECurrentResult(const String sModel)

return

Returns array of size 3 that contains Result, Instance and derivedResult

sModel

Reserved for future use. Can be ignored now by passing an empty String.

xSetCAEColorPlot

Sets CAE color plot.

bool xSetCAEColorPlot (const String sModel, bool bColorPlot)

return

Returns True, if successful.

sModel

Reserved for future use. Can be ignored now by passing an empty String.

bColorPlot

Set True to apply color plot.

pxGetCAEVisiblePartsMinMax

Gets current results min and max values for the parts displayed.

List<float> pxGetCAEVisiblePartsMinMax(const String sModel)

return

Returns value array of size 4.

value[0] = minimum value
value[1] = maximum value
value[2] = minimum value ID
value[3] = maximum value ID

sModel

Model Name. Current CAE model will be considered if sModel is empty.

pxGetCAEVisiblePartsMinMaxEx

Gets min and max values of the specific CAE result for the parts displayed.

List<float> pxGetCAEVisiblePartsMinMaxEx(const String sModel, const String sResult, const String sInstance, const String sDerived)

return

Returns value array of size 4.

value[0] = minimum value
value[1] = maximum value
value[2] = minimum value ID
value[3] = maximum value ID

sModel

Model Name. Current CAE model will be considered if sModel is empty.

sResult

CAE result name.

sInstance

Instance name.

sDerived

Derived scalar result name.

pxGetPartMinMax

Gets minimum and maximum value of a result for a part.

List<float> pxGetPartMinMax(const String sModel, const String sResult, const String sInstance, const String sDerived, const String sPart)

return

Returns value array of size 4.

value[0] = minimum value
value[1] = maximum value
value[2] = minimum value ID
value[3] = maximum value ID

sModel

Model Name. Current CAE model will be considered if sModel is empty.

sResult

Result Name.

sInstance

Instance Name.

sDerived

Derived Result Name.

sPart

Part Name.

pxGetResultMinMax

Gets minimum and maximum values of a CAE result for the model.

List<float> pxGetResultMinMax(const String sModel, const String sResult, const String sInstance, const String sDerived)

return

Returns value array of size 4.

value[0] = minimum value
value[1] = maximum value
value[2] = minimum value ID
value[3] = maximum value ID

sModel

Model Name. Empty String sets current model

sResult

Result Name.

sInstance

Instance Name.

sDerived

Derived Result Name.

xFilterCAEParts

Hide parts for which the result is not within the legend range.

bool xFilterCAEParts (String sModel)

return

Returns True, if successful.

sModel

For future use.

xShowCAEContourLines

Sets display state of contour lines.

void xShowCAEContourLines (String sModel, bool bShowContourLines)

sModel

Reserved for future use. Can be ignored now by passing an empty String.

bShowContourLines

Set True to display contour lines.

xIsCAEContourLinesVisible

Gets contour line display mode.

bool xIsCAEContourLinesVisible (String sModel)

return

Returns True, if contour lines are displayed.

sModel

Reserved for future use. Can be ignored now by passing an empty String.

xCAERefresh

Refreshes CAE model display for applied constraints.

bool xCAERefresh(String sModel)

return

Returns True, if the model is refreshed.

sModel

CAE model name that to be refreshed.

Note: To refresh all CAE models then set sModel as “” empty.

xSetColorPlot

Applies colorplot on CAE parts.

void xSetColorPlot(bool bColorPlot)

bColorPlot

Set True to apply color plot on parts.

xSetColorPlotEx

Sets color plot state for parts.

bool xSetColorPlotEx(String sModel, StringsPart, int iType, bool bColorPlot)

return

Returns True if sucessful.

sModel

Model name. Empty String sets current model.

sPart

Part or Assembly name.

iType

Set 0 for Assembly/subgroup of parts. Set 1 for the part.

bColorPlot

Set True to enable color plot for the part/assembly.

xGetCAEDerivedResults

Gets derived results for a result.

String xGetCAEDerivedResults(String sModel, String sResultName)

return

Returns all valid derived result names in a String that to get parsed.

Can be empty if the result is of scalar type.

sModel

Reserved for future use. Can be ignored now by passing an empty String.

sResultName

Result name for the derived results required.

xShowCAEUndeformedMesh

Sets visibility for the undeformed mesh of a model.

bool xShowCAEUnDeformedMesh(String sModel, bool bUndeformedMesh)

return

Returns True, if successful.

sModel

Model Name. If an empty String is set, then it applies to all models.

bUndeformedMesh

Set True to show undeformed mesh.

xGetCAEAnalysisType

Gets analysis type of the result.

int xGetCAEAnalysisType(String sModel, String sResult)

return

Returns the Analysis type.

Returns 0, if the result is of Structural: Non-Transient
Returns 1, if the result is of Transient
Returns 2, if the result is of Mode Case analysis
Returns 3, if the result is of Complex Analysis type

sModel

CAE Model name. Can be passed empty String “” for current model.

sResult

CAE Result name. Can be passed empty String “” for the current result.

pxGetCAEAttributeKeyList

Gets attribute key list for a result instance.

StringArray pxGetCAEAttributeKeyList (String sModel, String sResultName, String sInstanceName)

return

Returns all attribute key strings in an array.

sModel

CAE Model name.

sResultName

CAE Result name.

sInstanceName

CAE Instance name.

xGetCAEAttributeValue

Gets attribute value associated with the specified key of a particular result and instance of a CAE model.

String xGetCAEAttributeValue(String sModel, String sResult, String sInstance, String sKey)

return

Returns Attribute value.

sModel

CAE model name.

sResult

Result Name.

sInstance

Instance Name.

sKey

AttribKey name.

pxGetCAEEnvelopeAttribKeyList

Gets attrubute key list for an Envelope Result.

List<String> pxGetCAEEnvelopeAttribKeyList (String sModel, String sResultName)

return

Returns empty String array, if Fails.

Returns all key Strings, if Success.

sModel

CAE Model name.

sResultName

CAE Result name.

pxGetCAEEnvelopeAttribValues

Gets attribute values for the given key String and given NodeEl.

List<String> pxGetCAEEnvelopeAttribValues (String sModel, String sResultName, String sKey, List<int> IDList)

return

Returns an empty string array, if Fails.

Returns all value strings, if Success.

sModel

CAE Model name.

sResultName

CAE Result name.

sKey

Key string.

IDList

Node or Element ID array.

pxGetCAEResultsList

Gets all results that are available for a model.

List<String> pxGetCAEResultsList(String sModel)

return

Result results names in an array.

sModel

Model name.

pxGetCAEInstanceList

Gets all result instances(time steps) that are available for a result.

List<String> pxGetCAEInstanceList(String sModel, String sResult)

return

Result instances name(time step) names in an array.

sModel

Model Name.

sResult

Result name.

pxGetCAEDerivedResults

Gets valid derived result names for a result in an array.

List<String> pxGetCAEDerivedResults(String sModel, String sResultName)

return

Reurns valid derived result names in an array.

sModel

Model name.

sResultName

Result name.

xGetCAEDefaultDerivedResult

Gets current default derived result name that was set for a result.

String xGetCAEDefaultDerivedResult(String sModel, String sResult)

return

Returns currrent default derived result name.

sModel

Model name.

sResult

Result name.

xSetCAEDefaultDerivedResult

Sets default derived type for a result.

bool xSetCAEDefaultDerivedResult(String sModel, String sResult, String sDefaultDerivedResult)

return

Returns True, if successful.

sModel

Model name.

sResult

Result name.

sDefaultDerivedResult

Derived type result name that to be set as default derived type.

xSetCAEAsDistinctResult

Marks a result as distinct legend range result for a model.

When a result is marked as distinct the legend values are based on exact values in that result.

Eg. Material, Thickness results.

Note : Constraints - It has to be an element result. - A maximum number of unique values in the result is 32. - Otherwise marking that result as distinct will be ignored.

bool xSetCAEAsDistinctResult(String sModel, const String sResultName, bool bDistinct)

return

Returns True, if the result is set as distinct legend range.

sModel

Model Name.

sResultName

Result name which has to be marked as to have distinct legend range

bDistinct

Set True, to make that result to have a distinct legend.

xIsCAESetAsDistinctResult

Gets result’s distinct legend state.

bool xIsCAESetAsDistinctResult(String sModel, String sResultName)

return

Returns True, if the given result is marked as a distinct result.

sModel

Model name.

sResultName

Result Name. If passed as an empty String, it returns marked state for current result applied.

xIsCAEVaildDistinctResult

Checks result’s validity for distinct legend range.

Note: This version checks element result type or not. Only.

bool xIsCAEVaildDistinctResult(String sModel, String sResultName)

return

Returns True, if the result is of the element type.

sModel

Model name.

sResultName

Result name. Passing empty String checks for the applied current result.

xSetCAEResultUnit

Sets unit text field that to be displayed in the legend for a result.

bool xSetCAEResultUnit(String sModel, String sResult, String sUnit)

return

Returns True, if successful.

sModel

Model name.

sResult

Result name.

sUnit

Unit text for a result. This will be appended in legend display.

xGetCAEResultUnit

Gets unit text entry that was set for a result.

String xGetCAEResultUnit(String sModel, String sResult)

return

Returns units text field.

sModel

Model Name.

sResult

Result Name.

xIsCAEEnvelopeResult

Checks if the given result is of the envelope result type.

bool xIsCAEEnvelopeResult (String sModel, String sResultName)

return

Returns True if the given result is of Envelope result.

sModel

CAE Model name.

sResultName

CAE Result name.

xSetCAEResultComplexType

Sets CAE result complex type.

bool xSetCAEResultComplexType(String sModel, int iComplexType, float fAngle)

return

Returns True if successful.

Returns False, if iComplexType value is out of range [0,4]

sModel

CAE model name

iComplexType

Specifies complex type in the range of [0,4]

0 - Real
1 - Imaginary
2 - Magnitude
3 - Phase
4 - Angle

fAngle

Specifies complex angle which is the modulus of 360.

pxGetModelAttribKeys

Gets all available CAE model attribute keys as String array for the particular given CAE model.

List<String> pxGetModelAttribKeys (String sModel)

return

Returns all model attribute keys in a String array.

Returns empty array, if not successful.

sModel

CAE Model Name

xGetModelAttribValue

Gets CAE model attribute value as a String for the particular given CAE model.

String xGetModelAttribValue (String sModel, String sKey)

return

Returns model attribute as a String.

Returns empty String, if not successful.

sModel

CAE Model Name.

sKey

Viewpoint index, where to be inserted.

xSetCAEAttributeValue

Sets CAE result instance attribute value. It edits if it exists or appends.

bool xSetCAEAttributeValue(String sModel, String sResult, String sInstance, String sKey, String sVal, int iType)

return

Returns False, if it fails.

Returns True, when succeeds.

sModel

CAE model name.

sResult

CAE Result.

sInstance

CAE result instance.

sKey

Key String.

sVal

Value as String.

iType

Type of value String:

1 - Integer
2 - Float
3 - String(character array)
4 - Double

xSetImageCropAttributes

Sets viewport position and dimension of viewport portion to be exported as image. xRef and yRef values should be in the ranges [0, width] and [0, height] respectively.

bool xSetImageCropAttributes(int xRef, int yRef, int width, int height)

return

Returns False, if failed.

Returns True, if succeed.

xRef

X coordinate value of reference position.

This value should be positive and less than or equal to the width of the viewport.

yRef

Y coordinate value of reference position.

This value should be positive and less than or equal to the height of the viewport.

width

Width of the image portion.

xRef + width should not exceed the width.

height

Height of the image portion.

yRef + height should not exceed height.

pxGetImageCropAttributes

Gets position and dimentsion of image portion.

List<int> pxGetImageCropAttributes()

return

Returns empty array, if failed.

Returns integer array of size 4.

retArray[0] = x coordinate position in viewport
retArray[1] = y coordinate position in viewport
retArray[2] = width of image portion
retArray[3] = height of image portion

xSetAsCAEDeformationResult

Sets a given valid vector result as deformation result for the given CAE model.

bool xSetAsCAEDeformationResult(String sModel, String sResultName)

return

Returns True if valid vector result is set.

Returns False if failed.

sModel

CAE model name.

sResultName

Result name.

xGetCAEDeformationResult

Gets current deformation result for the given CAE model.

String xGetCAEDeformationResult(String sModel)

return

Returns empty String if failed.

Returns deformation result name if succeed.

sModel

CAE Model.

xGetACAENode

Gets a CAE node, associated with part and vertex index in the part geometry.

int xGetACAENode (String sModel, String sPart, int iVertexIndex)

return

Returns NodeID for the given part and vertex index.

Returns -1 if no NodeID is associated with part and vertex index.

sModel

CAE model Name.

sPart

Part Name.

iVertexIndex

Vertex index in the part geometry.

xIsOfComplexResult

Checks if the given input result is a complex type or not.

bool xIsOfComplexResult(String sModel, String sResult)

return

Returns True if given input result is of complex type.

Returns False otherwise.

sModel

CAE Model name.

sResult

CAE Result Name.

pxGetCAEIDResults

Queries the result values for the given ids and result data, and returns the array.

vector<float> pxGetCAEIDResults(String sModel, vector<int> id_list, String sResult, String sInstance, String sDerived)

return

Returns array of values. Sizes of the array and input id_list are equal.

sModel

CAE Model Name.

id_list

List of IDs (nodal or elemental based on the result type).

sResult

CAE Result Name.

sInstance

Result Instance Name.

sDerived

Result Derived type Name.

pxGetCAEResultNearPoints

Identifies node or element ids near the given set of points.

Queries the result values for the ids found

Interpolates the result data, and returns the array.

vector<float> pxGetCAEResultNearPoints (String sModel, vector<float> pos_list, String sResult, String sInstance, String sDerived)

return

Returns array of values.

sModel

CAE Model Name.

pos_list

List of points.

sResult

CAE Result Name.

sInstance

Result Instance Name.

sDerived

Result Derived type Name.

pxGetIdsNearPoints

Identifies node or element ids near the given set of points.

Queries the result values for the ids found.

Interpolates the result data, and returns the array.

vector<int> pxGetIdsNearPoints(String sModel, vector<float> pos_list, bool bElement)

return

Returns array of Nodal or Elemental IDs based on the flag bElemet.

sModel

CAE Model Name.

pos_list

List of points.

bElement

True – Returns elemental IDs.

False – Returns nodal IDs.

pxGetInstanceAttributeList

Gets the instance attribute values for the given key and instance lists.

vector<float> pxGetInstanceAttributeList(String sModel, String sResult, String sKey, vector<String> sInstanceList)

return

Returns array of values for the given instance list.

sModel

CAE Model Name.

pos_list

List of points.

sResult

CAE Result Name.

sInstance

Result Instance Name.

sDerived

Result Derived type Name.

xSetCAEDeformScaleFactorEx

Sets CAE deformation scale factor to a specific CAE model.

bool xSetCAEDeformScaleFactorEx(String sModel, bool bUniform, float fXScale, float fYScale, float fZScale)

return

Returns True if succeeds.

Returns False otherwise.

sModel

CAE model name.

bUniform

Uniform scale along all axes or not. True or False.

fXScale

Scale factor along X-axis.

fYScale

Scale factor along Y-axis.

fZScale

Scale factor along Z-axis.

xGetAreaWeightedResult

Gets a single area weighted result for the given part.

Area Weighted Result = Summation ( each element area * averaged result)

float xGetAreaWeightedResult(String sModel, String sPart, String sResult, String sInstance, String sDerived)

return

Returns a single weighted result value.

sModel

Name of the CAE model

sPart

Name of the part

sResult

Name of the CAE Result

sInstance

Name of the CAE Result Instance

sDerived

Name of the derived type name

pxGetCAEResultDerivedTypes

Gets all derived type name list for the given CAE model and CAE result.

List<String> pxGetCAEResultDerivedTypes(String sModel, String sResult)

return

Returns an array of names with different sizes but not less than 3 if succeeds.

Returns an empty array otherwise.

sModel

CAE Model Name.

sResult

CAE Result Name.

xSetCAESeletedInstances

Storing user given list of instances for creating envelope result. And the list can be used for other functions in future.

bool xSetCAESeletedInstances(String sModel, List<String> instanceList)

return

Returns True if successfully sets the instance list.

Returns False otherwise.

sModel

CAE Model Name

instanceList

List of instance names(input)

pxGetCAESeletedInstances

Gets the list of instances stored by user.

List<String> pxGetCAESeletedInstances(String sModel)

return

Returns the list of the stored instance names if succeeds.

Returns empty list otherwise.

sModel

CAE Model Name

xClearCAESelectedInstances

Clears instance list set by user.

bool xClearCAESelectedInstances(String sModel);

return

Returns True if succeeds

Returns False otherwise.

sModel

CAE Model Name

pxGetElementNodeIDsEx

Gets nodal connectivity for the given CAE element ID.

List< List <size_t>> pxGetElementNodeIDsEx(String sModel, String sPart, size_t iElementID)

return

Returns an array of arrays. Each array gives a node id list. VCollab CAE model can have the same element IDs as VCollab extracts skin data from the solid element.

For example, If there are two elements with the same ID, then this function returns like this,[ [1,2,3,4], [3,4,5,6] ].

sModel

Name of the model.

sPart

Name of the Part

iElementID

Input Element ID.

xGetNoOfNodes

Gets numeber of nodes of a CAE model for a given parts list.

int xGetNoOfNodes(String sModel,List<String> sPartList,bool bVisible)

return

Returns number of nodes in the model.

sModel

Model name. If it is an empty string, it considers current CAE model.

sPartList

List of parts for which node count is needed.If it is an empty string,it gives nodes count from all the parts of the model.

bVisible

Set True to consider nodes count only from visible parts in the parts list. Set False to consider node count for all parts in the parts list.

xSetConstantResultValue

Sets a constant value to all the nodes or elements of list parts for list of instances.

bool xSetConstantResultValue(String sModel, float fValue, List<String> partList, List<String> resultList, List<String> instanceList)

return

Returns True if succeeds.

Returns False otherwise

sModel

CAE Model Name

fValue

Constant Value

partList

Part name list.

resultList

Result list

instanceList

Instance list.