Navigation: Scripting Reference Manual > Functions & Subroutines > ARNGetOriginPos

 

ARNGetOriginPos

 

Contact Us: fredsupport@photonengr.com

 

Description

Returns the XYZ origin position coordinates associated with an Analysis Results Node (ARN).

 

Syntax

ARNGetOriginPos nNodeNum, dOrigPosX, dOrigPosY, dOrigPosZ

 

Parameters

nNodeNum As Long

Node number of existing ARN.

 

dOrigPosX As Double

X coordinate of the origin for given ARN node.

 

dOrigPosY As Double

Y coordinate of the origin for given ARN node.

 

dOrigPosZ As Double

Z coordinate of the origin for given ARN node.

 

Remarks

Returns the XYZ origin position coordinates associated with an Analysis Results Node (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