Navigation: Scripting Reference Manual > Functions & Subroutines > ARNGetPlaneCenter

 

ARNGetPlaneCenter

 

Contact Us: fredsupport@photonengr.com

 

Description

Returns the XYZ plane center coordinates associated with an Analysis Results Node (ARN).

 

Syntax

ARNGetPlaneCenter n, pdposX, pdposY, pdposZ

 

Parameters

n As Long

ARN node number.

 

pdposX As Double

X coordinate of plane center for given ARN node.

 

pdposY As Double

Y coordinate of plane center for given ARN node.

 

pdposZ As Double

Z coordinate of plane center for given ARN node.

 

Remarks

Returns the center XYZ plane center coordinates for the given ARN.

 

Example

These examples contrast the commands ARNGetOriginPos and ARNGetPlaneCenter :

 

1.Consider the two manually defined ARNs:

id1=ARNCreate2DGrid( "myARN1", 21, -1, 1, 21, -1, 1, "Double" )
id2=ARNCreate2DGrid( "myARN2", 21, -2, -1, 21, -2, -1, "Double" )
 

In both cases, the command ARNGetOriginPos returns (x, y, z) = (0, 0, 0). On the other hand, the command ARNGetPlaneCenter returns (x, y, z) = (0, 0, 0) for "myARN1" and (x, y, z) = (-1.5, -1.5, 0) for "myARN2".

 

2.ARNs created from prior "Energy" calculations:

 

Consider two Analysis Surfaces, "Analysis 1" whose Xmin=Ymin=0 and Xmax=Ymax=1, and "Analysis 2" whose Xmin=Ymin=-0.5 and Xmax=Ymax=0.5. Both Analysis Surfaces are attached to a surface which has been first rotated 5 degrees about the x-axis then shifted by (x, y, z ) = (0.1, 0.1, 1). In the script language, ARNs can be created from *.fgd files through the command IrradianceToFileAS in the following way:

 

Dim id1 As Long, id2 As Long, ida1 As Long, ida2 As Long
Dim fname1 As String, fname2 As String
Dim x As Double, y As Double, z As Double
Dim x1 As Double, y1 As Double, z1 As Double
fname1="C:\temp\arn1.fgd"
fname2="C:\temp\arn2.fgd"
id1=FindName("Analysis 1")
id2=FindName("Analysis 2")
Print IrradianceToFileAS(id1,fname1)
Print IrradianceToFileAS(id2,fname2)
ida1=ARNCreateFromFile(fname1,"myARN1")
ida2=ARNCreateFromFile(fname2,"myARN2")

 

For "myARN1", ARNGetOriginPos returns (x,y,z) = (0.1, 0.1, 1) while  ARNGetPlaneCenter returns (x,y,z) = (0.6, 0.59809735, 1.04357781).  For "myARN2", both ARNGetOriginPos and  ARNGetPlaneCenter return (x,y,z) = (0.1, 0.1, 1).

 

See Also

All ARN Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC