# Held Object

### HeldObjectData Class

Handler for agent grab events.

### Syntax

### Member Details

#### ComponentId Property

> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### HeldObjectEvent Property

> The type of held object event which occurred.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [HeldObjectEventType](https://help.sansar.com/hc/en-us/articles/360001378743) **HeldObjectEvent** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### HeldObjectInfo Property

> information about the held object
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [HeldObjectInfo](https://help.sansar.com/hc/en-us/articles/360001396326) **HeldObjectInfo** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ObjectId Property

> The ObjectId of the held object.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### HeldObjectEventType

### HeldObjectEventType Enum

Type of held object event.

### Syntax

\[Sansar.Script.Interface]\
\[System.Flags]\
public enum **HeldObjectEventType**

### Remarks

### Members

| Member Name | Description                  |
| ----------- | ---------------------------- |
| **Grab**    | Grabbed by a player avatar.  |
| **Release** | Released by a player avatar. |

### Requirements

**Namespace:** Sansar.Simulation\
**Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
**Assembly Versions:** 1.1.0.0

***

### HeldObjectInfo Struct

Information about if this HeldObjectInfo is being held by an agent.

### Syntax

\[Sansar.Script.Interface]\
public struct **HeldObjectInfo**

### Member Details

#### ControlPoint Field

> #### Syntax
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### IsHeld Field

> Is the object being held by an agent
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **IsHeld**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### LocalPosition Field

> The local space point on the object that is held.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [Sansar.Vector](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/vector) **LocalPosition**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SessionId Field

> The SessionId of the agent that is holding the object.
>
> #### Syntax
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***
