# SolutionData class

Namespace: [Grasshopper2.Doc](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.doc.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class SolutionData
```

Storage class for object solution results.

## Properties

- [CustomData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/customdata.md): Gets the fleeting custom data dictionary where custom values can be stored.
- [Duration](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/duration.md): Gets the time it took to compute this data. This property can be set in case additional duration needs to be added to the measured duration so far. Just make sure you're adding the correct amount to the correct state if you are setting this.
- [Id](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/id.md): Gets the id of the solution which spawned this data.
- [IsEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/isempty.md): Gets whether this result contains an [ITree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.itree.md), any messages, or any custom data.
- [KeyedTreeCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/keyedtreecount.md): Gets the number of keyed trees stored in this data.
- [Messages](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/messages.md): Gets all messages associated with this object.

## Methods

- [AddMessage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/addmessage.md): Add a message to the message set.
- [AddMessages](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/addmessages.md): (2 overloads) Add a collection of messages to the message set.
- [Empty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/empty.md): (static) Create an empty result, to be populated at a later time.
- [FromData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/fromdata.md): (static) Create results with a data tree.
- [FromException](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/fromexception.md): (static) Create empty results with exception messaging.
- [RemoveMessages](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/removemessages.md): Remove all messages which match the given level and filter.
- [SetTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/settree.md): (2 overloads) Sets or overwrites a keyed tree. This is typically only used so that components can store the data trees meant for their output parameters.
- [Tree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutiondata/tree.md): (2 overloads) Gets the unkeyed tree, if any.
