Navigation: Scripting Reference Manual > Functions & Subroutines > ARNDisplayInVisualizationView

 

ARNDisplayInVisualizationView

 

Contact Us: fredsupport@photonengr.com

 

Description

Displays the specified analysis results node in the 3D view for context.  The parameters which can be passed to the display function depend on the ARN type being displayed.  Please see the links below for more information on the parameters specific to each data type. 

Common Parameters

Legend

Irradiance, Illuminance, Energy Density, Intensity, Luminous Intensity

Color Image

Scalar Field

Vector Field

3D Grid Wall (Voxel Results)

 

Color Palette List

 

The Pixel Format setting of the Visualization preferences can determine whether the ARN is successfully displayed in the 3D view.  ARN's with resolution greater than 1024 pixels along a given axis will not display successfully when the Pixel Format is set to "Safe".  In this case, the user will need to toggle the "Fast" mode option and then re-open the FRED document in order to be able to render the ARN at this resolution.

 

 

Syntax

success = ARNDisplayInVisualizationView( arnNode, parmString )

 

Parameters

success (Boolean)

True if chart display was successful.  False otherwise. 

 

arnNode As Long

Node number of the ARN being displayed in the chart view.

 

parmString As String

Parameter string containing the display settings having the form, "Parm1=X: Parm2=Y: Parm3=Z...".  Unspecified parameters will acquire default values and unknown parameters will be ignored.  Valid parameter names and values for each allowed analysis type are:

 

Parameter

Description

Allowed Values

Common Parameters

Palette

Color palette used for displaying color levels.

See palette list below

ReversePalette

Reverses the order of the palette's colors.

True or False

NumLevels

Number of color levels displayed.

   0 (continuous)

> 0 (discrete levels)

DataRange

Minimum and maximum values for color range.

Min,Max

Auto (autoscale)

Transparent

Draws visualization with transparency.

True or False

AmbientFraction

Fraction of ambient light from 0 to 1.0.  Providing ambient light prevents obscuration of the data visualization due to shadowing.

0.4

SpecialValueColor

Sets the color for cells with the designated value independent of the selected palette.  The following parameter string would color all cells with value 0.0 gray (R,G,B = 192):

 

SpecialValueColor=0.0, (192,192,192)

Any number, (R,G,B)

Legend

WantLegend

Toggles whether a legend and color bar are drawn with the ARN in the 3D view.

True or False

LegendLocation

Location of the legend within the 3D view window.

Left or Right

UseCustomTitle

Toggles whether the CustomTitle value is displayed with the legend.  If False, the title stored with the ARN is displayed.

True or False

CustomTitle

Custom text to be displayed above the legend if UseCustomTitle is True.

Text string.

TransparentLegend

The legend is drawn transparently so that objects in the 3D view can be seen underneath the color bar.

True or False

Irradiance, Illuminance, Energy Density, Intensity, Luminous Intensity

See common parameters list above.

Color Image

Quantity

Color quantity to be displayed.

RGB, Greyscale, Red, Green, Blue, or CIE Y

Brightness

Image brightness normalization (1.0 = full)

Any value

SpecialValueColor

Sets the color for cells with the designated value independent of the selected palette.  The following parameter string would color all cells with value 0.0 gray (R,G,B = 192):

 

SpecialValueColor=0.0, (192,192,192)

Any number, (R,G,B)

Scalar Field

Quantity

Field quantity to be displayed.

Energy, Amplitude, AmplitudeSigned, Real, Imaginary, Phase

SpecialValueColor

Sets the color for cells with the designated value independent of the selected palette.  The following parameter string would color all cells with value 0.0 gray (R,G,B = 192):

 

SpecialValueColor=0.0, (192,192,192)

Any number, (R,G,B)

Vector Field

Component

Component of the field to be displayed.

X, Y or Z

Quantity

Field quantity to be displayed.

Energy, Amplitude, AmplitudeSigned, Real, Imaginary, Phase

SpecialValueColor

Sets the color for cells with the designated value independent of the selected palette.  The following parameter string would color all cells with value 0.0 gray (R,G,B = 192):

 

SpecialValueColor=0.0, (192,192,192)

Any number, (R,G,B)

3D Grid Wall (Voxel Results)

Quantity

Cell quantity to be displayed.

AbsorbedFlux

InFlux

OutFlux

CellOffsets

SliceN_Draw

*Replace N with 1, 2, 3 or 4

Enable/disable drawing of this slice.

True or False

SliceN_Axis

*Replace N with 1, 2, 3 or 4

Axis perpendicular to this slice.

X, Y or Z

SliceN_Location

*Replace N with 1, 2, 3 or 4

Location of the slice along its axis.

Any number

 

 

Palette List

Spectrum1

RedRamp

BlueRamp

CyanWhite

Spectrum2

OrangeRamp

VioletRamp

BlueWhite

Spectrum3

YellowRamp

RedWhite

VioletWhite

Spectrum4

GreenRamp

GrayRamp

PurpleYellow

Spectrum5

CyanRamp

GreenWhite

ColorWheel

BlueWhiteRed

BlackWhiteRed

BrownWhiteAqua

GreenWhitePurple

BlueYellowRed

GreenYellowRed

YellowPurpleGreen

BlueRedYellow

Ocean

YellowWhite

BlackBody

GrayWhiteSpectrum

RedWhiteYellow

BlueWhiteCyan

Turbo

 

 

 

Remarks

Chart display and visualization view display are not considered critical operations in a script and therefore do not halt script execution when a value of False is returned by the function.  In the event of a False return, a dialog prompt will be displayed.  Some common reasons for a False return value are that the data grid contains all hole values, the data type is unsupported, or memory allocation failed (large data grids).

 

 

Example

The following example traces a new rayset, uses an existing analysis surface to compute the irradiance, stores the results in an analysis result node (ARN) and then displays the results in FRED's 3D view for context with all zero valued cells drawn gray.

 

          Dim arnNode As Long, anaNode As Long, count As Long

          Dim success As Boolean

          Dim parmString As String

 

          'get the node number of the analysis surface being used

          anaNode = FindFullName( "Analysis Surface(s).Detector" )

 

          'delete current rayset and trace sources

          DeleteRays

          TraceCreate

 

          'store the reuslts of the irradiance calculation in an ARN

          count = IrradianceToARN( anaNode, "IrradARN", arnNode )

 

          'display the ARN in the visualization view for context

          parmString = "Palette=RedRamp:"

          parmString = parmString & " ReversePalette=False:"

          parmString = parmString & " NumLevels=0:"

          parmString = parmString & " DataRange=Auto:"

          parmString = parmString & " Transparent=False:"

parmString = parmString & " SpecialValueColor=0.0,(192,192,192)"

 

          success = ARNDisplayInVisualizationView( arnNode, parmString)

 

 

See Also

All ARN Scripting CommandsScripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC