## HideAndUnselect

### Introduced

v1.0

### Description

Hides and unselects objects.

### Scripting Syntax

    HideAndUnselect( [Target], [PropertyName] );

### Parameters

Parameter | Type | Description
--- | --- | ---
Target | String | List of objects to hide and unselect. Default Value: Current selection
PropertyName | String | Visibility parameters to set. Default Value: visibility
Possible Values: | Description:
visibility | View and Render visibility
viewvis | View visibility
rendvis | Render visibility
selectability | Selectability

### Examples

#### 1. VBScript Example

    NewScene
    CreatePrim "Sphere", "MeshSurface"
    Translate , -6, 0, 0, siAbsolute, siView, siObj, siXYZ, True, , , , , , , , , 0
    CreatePrim "Torus", "MeshSurface"
    CreatePrim "Cube", "MeshSurface"
    Translate , 7, 0, 0, siAbsolute, siView, siObj, siXYZ, True, , , , , , , , , 0
    SelectObj "sphere,cube"
    logmessage "Selection before hiding: " & Selection.count & " objects"
    for each obj in Selection
    logmessage "    " & obj
    next
    MsgBox "About to perform HideAndUnselect..."
    HideAndUnselect
    logmessage "Selection after hiding: " & Selection.count & " objects"
    for each obj in Selection
    logmessage "    " & obj
    next

#### 2. VBScript Example

    ' Create a sphere, hide some polygons and deselect them
    NewScene
    SetDisplayMode "Camera", "shaded"
    CreatePrim "Sphere", "MeshSurface"
    SetValue "sphere.polymsh.geom.subdivu", 30
    SetValue "sphere.polymsh.geom.subdivv", 30
    SetValue "sphere.Scene_Material.Phong.diffuse.blue", 0
    SetValue "sphere.Scene_Material.Phong.diffuse.red", 1
    SetValue "sphere.Scene_Material.Phong.diffuse.green", 1
    ActivatePolygonSelTool
    SelectGeometryComponents "sphere.poly[168,169,170,198,199,200,258,259,260,288,289,290,133,134,162,163,191,192,221,222,251,252,282,283,313,314]"
    HideAndUnselect

### See Also

ToggleVisibility HideUnselected