Navigation: Scripting Reference Manual > Functions & Subroutines > FindFullNameNoCase

 

FindFullNameNoCase

 

Contact Us: fredsupport@photonengr.com

 

Description

This function returns the node number of the first entity in the Optical Sources, Geometry, or Analysis Surface(s) folder with the given short name (not case sensitive).  This function does not use the full hierarchical name of the entity.

 

Syntax

n = FindNameNoCase ( shortName)

 

Parameters

n (Long)

Returned node number of the entity referenced by shortName.  If no match is found, a -1 is returned.

 

shortName As String

Short name of the entity whose node number is intended to be returned (not case sensitive).

 

Example

The example below demonstrates how to use the FindNameNoCase function to retrieve the node number of a source by its short name and then use the returned node number to modify the source parameters.

 

Sub Main

 

    'Retrieve the node number of the source

    Dim srcNode As Long

    srcNode = FindNameNoCase( "Source 1" )

 

    'Retrieve the ray positions specification

    Dim semiX As Double, semiY As Double

    Dim nRays As Long, isEllipse As Boolean

    GetSourcePosGridRandom( srcNode, semiX, semiY, nRays, isEllipse )

 

    'Change the number of source rays

    nRays = 10000

 

    'Modify the source node

    SetSourcePosGridRandom( srcNode, semiX, semiY, nRays, isEllipse )

 

    'Update the model

    Update

 

End Sub

 

 

See Also

FindNameNoCase

FindFullName

FindMaterial

FindScatter

FindRaytraceCtrl

 

 

 

 

 

Copyright © Photon Engineering, LLC