Click or drag to resize
SoSearchPathAction Class

Searches for a node in a scene graph using a sequence of search criteria.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.ActionsSoAction
      OIV.Inventor.ActionsSoSearchAction
        OIV.Inventor.ActionsSoSearchPathAction

Namespace: OIV.Inventor.Actions
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoSearchPathAction : SoSearchAction

The SoSearchPathAction type exposes the following members.

Constructors
  NameDescription
Public methodSoSearchPathAction

Constructor.

Top
Methods
  NameDescription
Public methodAddPath
(Inherited from SoSearchAction.)
Public methodApply(SoNode)

Initiates an action on the graph defined by a node.

(Inherited from SoAction.)
Public methodApply(SoPath)

Initiates an action on the graph defined by a path.

(Inherited from SoAction.)
Public methodApply(SoPathList)
Calls Apply(pathList, false).
(Inherited from SoAction.)
Public methodApply(SoPathList, Boolean)

Initiates an action on the graph defined by a list of paths.

(Inherited from SoAction.)
Public methodClearApplyResult

When applied, an action may reference nodes or create objects (e.g.

(Inherited from SoSearchAction.)
Public methodStatic memberEnableElement
Public methodEnableElements

(Overrides SoSearchActionEnableElements.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodForwardTraversal(SoNode)

Traverse a node that is not part of the current scenegraph.

(Inherited from SoAction.)
Public methodForwardTraversal(SoPath)

Traverse a path that is not part of the current scenegraph.

(Inherited from SoAction.)
Public methodGetContinueActionInBranchFlag

This function indicates if the action must stop in the current branch.

(Inherited from SoAction.)
Public methodGetCurPath

Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed.

(Inherited from SoAction.)
Public methodGetDerivedIsOK

Gets flag to allow search on a type to match derived types.

Public methodGetDistribMode

Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only).

(Inherited from SoAction.)
Public methodGetFind

Returns what to look for.

(Inherited from SoSearchAction.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetInterest

Returns which paths to return.

(Inherited from SoSearchAction.)
Public methodGetName

Returns the name of the node to search for.

(Inherited from SoSearchAction.)
Public methodGetNode

Returns the node to search for.

(Inherited from SoSearchAction.)
Public methodGetNodeAppliedTo

Returns the node the action is being applied to.

(Inherited from SoAction.)
Public methodGetNumItemsFound

Get the number of search items that were successfully found.

Public methodGetOriginalPathListAppliedTo

Returns the original path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPath

Returns resulting path, or NULL if no path was found.

(Inherited from SoSearchAction.)
Public methodGetPathAppliedTo

Returns the path the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathCode

Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathListAppliedTo

Returns the path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPaths

Returns resulting path list.

(Inherited from SoSearchAction.)
Public methodGetPipeId

Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodGetSceneManager

Return the OIV.Inventor.SoSceneManager associated with this action.

(Inherited from SoAction.)
Public methodGetSearchString

Gets the search path string.

Public methodGetSeparatorChar

Gets separator char for search string.

Public methodGetState

Gets the state from the action.

(Inherited from SoAction.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetType(Boolean)

Returns the node type to search for.

(Inherited from SoSearchAction.)
Public methodGetWhatAppliedTo

Returns code indicating what action is being applied to.

(Inherited from SoAction.)
Public methodHasTerminated

Returns true if the traversal has reached a termination condition.

(Inherited from SoAction.)
Public methodInvalidateState

Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied.

(Inherited from SoAction.)
Public methodIsBeingApplied

Returns true if this action is currently being applied.

(Inherited from SoAction.)
Public methodIsFound
(Inherited from SoSearchAction.)
Public methodIsLastPathListAppliedTo

Returns true if the current list is the last one from the original.

(Inherited from SoAction.)
Public methodIsSearchingAll

Returns false if searching uses regular traversal, true if it traverses every single node.

(Inherited from SoSearchAction.)
Public methodIsUsingAlternateRep

Returns true if current action is using alternate representations.

(Inherited from SoAction.)
Public methodPostDelayedTraversal

Method called by SoMultiPassManager after delayed pass traversals.

(Inherited from SoAction.)
Public methodPreDelayedTraversal

Method called by SoMultiPassManager before delayed pass traversals.

(Inherited from SoAction.)
Public methodReset

Reset options back to default values, clears returned path.

(Overrides SoSearchActionReset.)
Public methodResetContinueActionInBranchFlag

This function resets the continue action flag.

(Inherited from SoAction.)
Public methodSetDerivedIsOK

Sets flag to allow search on a type to match derived types.

Public methodSetFind

Sets what to look for; what is a bitmask of LookFor enum values.

(Inherited from SoSearchAction.)
Public methodSetFound
Public methodSetInterest

Sets which paths to return.

(Inherited from SoSearchAction.)
Public methodSetName

Sets the name of the node to search for.

(Inherited from SoSearchAction.)
Public methodSetNode

Sets the node to search for.

(Inherited from SoSearchAction.)
Public methodSetPipeId

Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodSetSceneManager

Set the scene manager associated with this action (if any ).

(Inherited from SoAction.)
Public methodSetSearchingAll

Sets whether searching uses regular traversal or whether it traverses every single node.

(Inherited from SoSearchAction.)
Public methodSetSearchString

Sets the search path string.

Public methodSetSeparatorChar

Sets separator char for search string.

Public methodSetType(Type)
Calls SetType(t, true).
(Inherited from SoSearchAction.)
Public methodSetType(Type, Boolean)

Sets the node type to search for.

(Inherited from SoSearchAction.)
Public methodSetUpState

Creates state if it is NULL or it is no longer valid because new elements have been enabled since it was created.

(Inherited from SoAction.)
Public methodStopActionInBranch

This function stops the action in the current Scene Graph branch.

(Inherited from SoAction.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTraverse

Does traversal of a graph rooted by a node.

(Inherited from SoAction.)
Public methodUseAlternateRep

Tell the action to use alternate representations during traversal when available.

(Inherited from SoAction.)
Top
Remarks

This class extends OIV.Inventor.Actions.SoSearchAction to search for a sequence of items defined in a string, e.g., "Wheel1/Hub/Bearing". Each item can be a

  • Node name, or

  • Node type (type name in angle brackets, e.g., "<Cone>").

When the action finds a node that satisfies the current search item, it effectively restarts the search from that node, using the next search item. This means that the search for each item (after the first) is confined to the subgraph under the node that satisfied the previous search item. In most cases each item (except possibly the last one) will be a grouping node, but this is not enforced by the action.

Finding nodes by name is a useful technique for modifying a scene graph, but using OIV.Inventor.Nodes.SoNode.GetByName(System.String) or OIV.Inventor.Actions.SoSearchAction requires assigning a unique name to every (interesting) node. Often the same subgraph will be used multiple times and it would be convenient to assign each instance of the subgraph a unique name, but reuse the same names for the nodes inside the subgraph. OIV.Inventor.Actions.SoSearchPathAction allows this kind of hierarchical naming.

Given a scene graph with hierarchical names, for example:

  DEF Wheel1 Separator {
     DEF Hub Separator {
         DEF Bolt Separator {
             Cylinder { height 3 }
         }
     }
 }
 DEF Wheel2 Separator {
     DEF Hub Separator {
         DEF Bolt Separator {
             Cylinder { height 13 }
         }
     }
 }

"Wheel1/Hub/Bolt" would find "Bolt" in the first wheel. Intermediate names may be omitted if the search string is still unambiguous. For example "Wheel1/Bolt" would find the same node in this simple case. "Wheel2/Hub/Bolt/<Cylinder>" would return a path including the leaf OIV.Inventor.Nodes.SoCylinder node in the second wheel.

Most of the methods inherited from OIV.Inventor.Actions.SoSearchAction are ignored and do not return useful information (set/getNode, set/getName, etc.). Relevant inherited methods are set/isSearchingAll, getPath, and reset.

Note that by default nodekits do not search their children when a search action is applied. The reference page for OIV.Inventor.Nodekits.SoBaseKit discusses the methods OIV.Inventor.Nodekits.SoBaseKit.IsSearchingChildren() and OIV.Inventor.Nodekits.SoBaseKit.SetSearchingChildren(System.Boolean), which allow you to query and control this behavior.

See Also