CAE Legend

xShowCAELegend

Set CAE legend display.

void xShowCAELegend(const String sModel, bool sShowLegend)

sModel

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

sShowLegend

Set True to display CAE legend.

xIsCAELegendVisible

Gets legend display state.

bool xIsCAELegendVisible (String sModel)

return

Returns True, if CAE legend is displayed.

sModel

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

xSetCAEReverseLegend

Sets reverse legend state.

void xSetCAEReverseLegend (const String sModel, bool bReverseLegend)

returns

None.

sModel

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

bReverseLegend

Set True to reverse the legend.

xSetCAELegendColors

Sets CAE models legend colors.

bool xSetCAELegendColors(const String sModel, List<float> ColorArray, bool bIncludeAlpha=False)

sModel

Model name.

ColorArray

Legend colors array.

bIncludeAlpha

Set Ture, if ColorArray contains rgba value. Means size of color array is multiples of 4. Otherwise set False, if size of color array is multiples of 3.

xGetCAEReverseLegend

Gets reverse legend state.

bool xGetCAEReverseLegend (String sModel)

return

Returns True, if the legend is reversed.

sModel

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

xSetCAELegendNoResultColor

Sets No result color for a model.

bool xSetCAELegendNoResultColor(const String sModel, float r, float g, float b)

sModel

Model Name.

r, g, b

r, g, b color value for no result color. Range 0-1.

xSetCAELegendNumeric

Sets scientific notation and precision for numeric fields in the CAE model.

bool xSetCAELegendNumeric(const String sModel, bool bScientific, int iPrecision)

sModel

Required Model name.

Note: If Model not found, it set this model to current CAE model.

bScientific

Sets True to display scientific notation for the numbers.

iPrecision

Sets precision to display floating numbers.

xSetCAEDiscreteLegend

Sets color plot in discrete color mode.

bool xSetCAEDiscreteLegend(const String sModel, bool bDiscrete)

return

Returns True, if successful.

sModel

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

bDiscrete

If True, Sets discrete color plot.

If False, Sets continuous color plot.

xSetCAELegendRange

Sets current result range.

In GUI

../../_images/b10b445ce8f02bbc24d03c173ff1024a.png

bool xSetCAELegendRange(const String sModel, bool bEnableRangeMax, float fRangeMax, bool bEnableRangeMin, float fRangeMin, bool bEnableFilter)

return

Returns True, if successful.

sModel

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

bEnableRangeMax

Set True to enable maximum range value.

fRangeMax

Sets maximum range value.

bEnableRangeMin

Set True to enable minimum range value.

fRangeMin

Sets minimum range value.

bEnableFilter

Set True to enable filter.

xSetCAELegendBGColor

Sets legend background color.

bool xSetCAELegendBGColor(float r, float g, float b)

return

Returns True if success.

r

Value for Red from 0 to 1.

g

Value for Green from 0 to 1.

b

Value for Blue from 0 to 1.

pxGetCAELegendBGColor

Gets legend background color.

List<float> pxGetCAELegendBGColor()

return

Returns color factor array of size 3.

retArray[0] = value for Red from 0 to 1
retArray[1] = value for Green from 0 to 1
retArray[2] = value for Blue from 0 to 1

xGetCAELegendBGColorVisibility

Gets visibility flag of Legend background(show/hide).

bool xGetCAELegendBGColorVisibility()

return

Returns True, if the legend has a background.

Returns False, if legend does not have a background.

xSetCAELegendBGColorVisibility

Sets visibility flag to Legend background(show/hide).

bool xSetCAELegendBGColorVisibility(bool bShow)

return

Returns True, if successful.

bShow

True shows legend background.

False hides the legend background.

xSetCAELegendFontSize

Sets font size into either Small, Medium or Large font.

bool xSetCAELegendFontSize(int iSize)

return

Returns True, if successful.

iSize

iSize is the index for font sizes Small, Medium and Large.

Valid values 0, 1 and 2.

xGetCAELegendFontSize

Gets the Legend font size info.

int xGetCAELegendFontSize()

return

Returns value between 0 to 2. Valid return values are:

0 - Small
1 - Medium
2 - Large

xShowCAEFrameInfo

Displays or hides CAE legend frame info for the particular CAE model. An empty name applies the modification to all CAE model.

void xShowCAEFrameInfo (String sModel, bool bShow)

return

None.

sModel

CAE Model Name.

An empty String makes this modification to all CAE models.

bShow

True - to display

False - to hide.

xSetCAELegendFontName

Sets font face to CAE Legend.

bool xSetCAELegendFontName(String sFontName)

return

Returns True if successfully set.

sFontName

True type font name.

xGetCAELegendFontName

Gets CAE Legend font name.

String xGetCAELegendFontName()

return

Returns font face name.

xSetCAELegendRangeEx

Sets user defined range for legend.

Note : This is an extended function of xSetCAELegendRange. Added new parameter is bUpdateAllInstance.

bool xSetCAELegendRangeEx(String sModel, bool bUpdateAllInstance, bool bUserMax, float fUserMax, bool bUserMin, float fUserMin, bool bEnableFilter)

return

Returns True, if successful.

sModel

CAE Model Name.

bUpdateAllInstance

If True, the same range is applied to all the instance of the current result.

Else, the defined range will be set only to the current instance.

bUserMax

Flag to enable user range maximum.

fUserMax

User range maximum value.

bUserMin

Flag to enable user range minimum.

fUserMin

User range minimum value.

bEnableFilter

If True, sets no result color for the nodes/element that is out of provided range.

xUpdateCAELegendRange

Set current user range inputs to all the instances.

bool xUpdateCAELegendRange(String sModel, bool bUpdateAllInstance)

return

Returns True, if successful.

sModel

CAE model name.

bUpdateAllInstance

If True, it applies current legend range settings to all instances.

pxGetCAELegendRange

Gets currently applied legend range info.

List<float> pxGetCAELegendRange(String sModel)

return

Returns applied legend range info in an array of size 6.

retArray[0] = bUserMax (user range maximum flag
retArray[1] = fUserMax (user range maximum value)
retArray[2] = bUserMin (user range minimum flag)
retArray[3] = fUserMin (user range minimum value)
retArray[4] = bFilterFlag (out of range filter color flag)
retArray[5] = bUpdateAllInstance (All instances flag)

sModel

CAE Model name

xSetCAELegendDynamicRangeEx

Sets current CAE legend pre-min and pre-max values. In between pre-min and pre-max values are interpolated based on number of colors or divisions. Pre-Min is the value set to grid just above the Min value. Similarly, Pre-Max is the value set to grid just below the Max value. The following image gives us a better understanding.

../../_images/e87dffcfabbed34c9db19030f0de37dc.png

bool xSetCAELegendDynamicRangeEx(String sModel, float fPreMin , float fPreMax)

return

Returns True, if it succeeds.

Returns False, if it fails.

sModel

CAE model name

fPreMin

Value to be set to PreMin.

fPreMax

Value to be set to PreMax.

xGetCAELegendAutoFormatMode

Gets CAE Legend Auto Format Mode of given CAE model

bool xGetCAELegendAutoFormatMode (String sModel)

return

Returns True, if AutoFormat is ON.

Returns False, if AutoFormat is OFF.

sModel

CAE model name

xSetCAELegendAutoFormatMode

Sets Legend AutoFormat to the given CAE Model.

bool xSetCAELegendAutoFormatMode(String sModel, bool bAuto)

return

Returns True, if it succeeds.

Returns False, if it fails.

sModel

CAE model name.

bAuto

Legend Auto Format flag, True or False

pxGetCAELegendColors

Gets RGB color value array of current color plot legend of given CAE model.

List<float> pxGetCAELegendColors(String sModel, bool bIncludeAlpha=False)

return

Returns RGB color values array of size n<span style=“color: red”>3, where n is the number of colors whenbIncludeAlpha* is False. If *bIncludeAlpha* is True it returns, values array of size n*4.

sModel

CAE model name.

bIncludeAlpha

If True, adds alpha(transparent) value in return color value array as RGBA instead of RGB.

xSetCAELegendDefaultColors

Sets number of colors to current color plot legend of given CAE model. New colors are interpolated or extrapolated from current legend color values.

bool xSetCAELegendDefaultColors(String sModel, int iNoOfColors)

return

Returns True, if successful.

Returns false if failed.

Model

CAE model name.

iNoOfColors

The number of colors to be set.

pxGetCAEDynamicRange

Returns user customized CAE Legend range values in an array.

List<double> pxGetCAEDynamicRange(String sModel)

return

Returns an array of real values if successfully queried.

Returns empty array otherwise.

sModel

CAE Model name.

pxGetCAELegendNumeric

Gets legend numeric format attributes like scientific and precision values.

List<int> pxGetCAELegendNumeric(String sModel)

return

Returns integer array of size 2.

retArray[0] = scientific or not (0 or 1)
retArray[1] = precision value

sModel

CAE model name.

xSetCAELegendPosition

Sets CAE legend position for the given CAE model.

bool xSetCAELegendPosition(String sModel, float fX, float fY, int iOrientation)

return

Returns True if CAE legend position is set successfully.

Returns False if failed.

sModel

CAE Model Name

fX

Normalized x position of Legend position(Left).

fY

Normalized x position of Legend position(Bottom).

iOrientation

Orientation of Legend. Valid values 0-3.

0 – Left
1 – Right
2 – Top
3 – Bottom

pxGetCAELegendPosition

Gets current position and orientation of Legend of given model.

List<float> pxGetCAELegendPosition(String sModel)

return

Returns an real value array of size 3.

Returns an empty array if failed.

retArray[0] = X position (normalized left position in screen between 0 and 1)
retArray[1] = Y position (normalized bottom position in screen between 0 and 1)
retArray[2] = An integer value for orientation of the legend (0 to 3)

Where:

0 – Left
1 – Right
2 – Top
3 – Bottom

sModel

CAE Model Name

pxGetCAELegnedRect

Gets CAE Legend rectangle position and size in normalized screen coordinates for the given model.

List<float> pxGetCAELegnedRect(String sModel)

return

Returns an array of size 4. All values are normalized screen coordinates between 0 and 1.

retArray[0] = x position of rectangle
retArray[1] = y position of rectangle
retArray[2] = width of rectangle
retArray[3] = height of rectangle

sModel

CAE Model Name.

xSetCAELegendModelDisplay

Sets model name display flag as part of Legend.

bool xSetCAELegendModelDisplay(String sModel, bool bModelDisplay)

return

Returns True, if successful.

sModel

Model Name. Empty String sets diplay to all models.

bModelDisplay

Set False to hide display of model name along with legend header.

xGetCAELegendModelDisplay

Gets model name display flag.

bool xGetCAELegendModelDisplay(String sModel)

return

Returns True if model name is displayed in legend header.

sModel

Model name. empty String will get current model’s flag.

pxGetCAELegendNoResultColor

Gets applied No Result color in an array.

List<int> pxGetCAELegendNoResultColor(String sModel)

return

Returns array of size 4, where:

retArray[0] = red color value in a range of 0-255
retArray[1] = green color value in a range of 0-255
retArray[2] = blue color value in a range of 0-255
retArray[3] = alpha (transparent) color value in a range of 0-255

sModel

Model name.

xShowCAELegendHeaders

Sets visibility flags to CAE legend headers.

bool xShowCAELegendHeaders(String sModel, bool bModelHeader, bool bResultHeader, bool bInstanceHeader)

return

Returns True if successfully sets the flags.

Returns False otherwise.

sModel

CAE Model Name.

bModelHeader

Model Name header.

bResultHeader

Result Name header.

bInstanceHeader

Instance Name header.

xSetCAELegendAutoUpdate

Sets ON/OFF to Update ColorPlot on Show/Hide Parts option.

../../_images/7b56766e5195a98855df47f627b8661a.png

bool xSetCAELegendAutoUpdate(bool bAutoUpdate)

return

Returns True if successfully sets the flag.

Returns False otherwise.

xGetCAELegendAutoUpdate

Gets a boolean (True or False) if Update ColorPlot on Show/Hide Parts option is ON or OFF

../../_images/7b56766e5195a98855df47f627b8661a.png

bool xGetCAELegendAutoUpdate()

return

Returns True if Update ColorPlot on Show/Hide Parts option is ON.

Returns False otherwise

xGetCAELegendResultDisplay

Gets the visibility flag, whether Legend Result Header is displayed or not.

bool xGetCAELegendResultDisplay(String sModel)

return

Returns True if result name is displayed.

Returns False if not displayed.

sModel

CAE Model name.

xGetCAELegendInstanceDisplay

Gets the visibility flag, whether Legend Instance Header is displayed or not.

bool xGetCAELegendInstanceDisplay(String sModel)

return

Returns True if instance name is displayed.

Returns False if not displayed.

sModel

CAE Model name.

xSetCAELegendDynamicRange

Sets user defined dynamic legend values for the given CAE model by given list of values.

bool xSetCAELegendDynamicRange(String sModel, List<float> valArray)

return

Returns True if succeeds. Returns False otherwise.

sModel

CAE Model name

valArray

List of legend values.

xGetCAEFilter

Gets CAE Filter is used in the given model or not.

bool xGetCAEFilter(String sModel);

return

Returns True if CAE filter is used.

Returns False otherwise.

sModel

CAE Model Name

xSetCAEFilter

Sets CAE Filter in the given CAE Model.

bool xSetCAEFilter(String sModel,bool bCAEFilter);

return

Returns True if CAE filter is successfully set to the CAE Model.

Returns False otherwise.

sModel

CAE Model Name

bCAEFilter

Sets CAE Filter if this flag is true.