Navigation: Reference > AstroSearcher Class |
|
The AstroSearcher Class encapsulates AstroSynthesis' Natural Language Search capabilities. You can use the AstroSearcher Class to execute Natural Language Search queries in script, and cycle through the matched bodies.
' This example finds the root bodies of all systems
' with a hospitable world and sets their label color to purple.
sector = GetCurrentSector()
srch = NewAstroSearcher( sector)
srch.Search "systems with hospitable"
n = srch.GetResultCount()
For i = 1 To n
o = srch.GetResult( i)
o.LabelColor = RGB( 255, 0, 255)
Next
DeleteAstroSearcher srch
RefreshScene