SOC
Set search criteria, perform a search, and insert search results into the Scenario
Syntax
SOC <ScenarioPath> {Options} <Parameters>
Related Commands
Description
The SOC command allows you to set search criteria, perform a search, and insert the search results into the Scenario.
The following table describes the {Options} and their <Parameters>.
{Options} | <Parameters> | Description |
---|---|---|
SetObjectType | Type {ObjectType} | Set the type of the object you are searching for. You can get the valid values for {ObjectType} by using the SOC_RM command with the GetObjectTypes option. This command will clear all search criteria and search results. This command must be sent before any other SOC commands. |
AddSearchCriteria | Field "<FieldName>" {Value | Values | Min | Max} "<Value>" | For a Text field use the Value parameter and the "<Value>" For a Choices field use the Values parameter and list the items to include in the search "<Item1>,<Item2>,<Item3>...". Items must exactly match the values returned from the SOC_RM GetSearchFields command. For a Numeric Range or Date Range field enter the Min and/or Max parameter, each with a numeric "<Value>" in the unit specified in the SOC_RM GetSearchFields command. |
ClearSearchCriteria | N/A | Clear the previously entered search criteria. This allows the user to set new search criteria for the currently set object type. |
InsertSearchResult | ResultNumber <Number> | Insert the specified search result into the Scenario. <Number> is an index into the search results that are returned by the SOC_RM command with the GetSearchResults option. |
Example
First, get the object type values:
SOC_RM * GetObjectTypes
Set the object type for the search:
SOC * SetObjectType Type "Spacecraft"
Get the field names for the object type:
SOC_RM * GetSearchFields
Add the search criteria:
SOC * AddSearchCriteria Field "Owner" Values "US,UK"
SOC * AddSearchCriteria Field "Inclination" Min "60" Max "120"
Get the search results:
SOC_RM * GetSearchResults
Insert the first search result object into the Scenario:
SOC * InsertSearchResults ResultNumber "1"
ReturnMessage
Group Membership
This command belongs to the following group(s):
Version
11.2