Selection manager is a global object accessible via OccViewer.selectionManager, responsible for highlighting color, selection scheme, selection filter and similar selection aspects.

See also OccViewer.UserEvents.onSelectedObjectsChanged callback for tracking selection changes.

interface SelectionManager {
    highlightColor: string;
    selectableByDefault: boolean;
    selectedObjectList: string[];
    selectedObjects: string;
    selectionColor: string;
    selectionFilter: string;
    selectionFilterList: string[];
    toAllowLevelUpSelection: boolean;
    toAllowSelection: boolean;
    toDynamicHighlight: boolean;
    clearSelection(theToUpdate: boolean): void;
    getSelectionScheme(): WasmSelectionParams[];
    resetSelectionFilter(): void;
    setSelectionScheme(theParams: WasmSelectionParams[]): void;
}

Properties

highlightColor: string

Get/set solid highlight hex color.

selectableByDefault: boolean

The selection flag state for objects. This flag defines the default selection state for all objects. To change the state for a specific object, modify this flag for the object.

selectedObjectList: string[]

Get/set list of selected objects as array of strings. Wrapper around SelectionManager.selectedObjects See also OccViewer.UserEvents.onSelectedObjectsChanged callback for tracking selection changes.

the list of selected objects.

selectedObjects: string

Get/set list of selected objects ('*' to select all objects) as string with '\n' separator. See also OccViewer.UserEvents.onSelectedObjectsChanged callback for tracking selection changes.

the list of selected objects.

selectionColor: string

Get/set selection hex color.

selectionFilter: string

Get/set selection filter using string of ids separated by '\n'. User can select by mouse click only that what in this filter. '*' - reset filter - allow to select all objects.

selectionFilterList: string[]

Get/set selection filter using array of strings. User can select by mouse click only that what in this filter. Wrapper around SelectionManager.selectionFilter. ['*'] - reset filter - allow to select all objects.

toAllowLevelUpSelection: boolean

Get/set allow level up selection.

toAllowSelection: boolean

Get/set allow selection status

toDynamicHighlight: boolean

Enable/disable dynamic highlighting.

Methods

  • Clear selection.

    Parameters

    • theToUpdate: boolean

      viewer update flag

    Returns void

  • Reset selection filter.

    Returns void