# Set View

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-baaac88d9aae2e793d9f59ae4a5b5f36bca444f7%2FSet_View.png?alt=media)

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-147a8626e09dae1be026375e79059fafa30a0313%2FSet_View.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src/LB%20Set%20View.py)

Open a new viewport in Rhino that shows the parallel-projected view from the sun.

This is useful for understanding what parts of Rhino geometry are shaded at a particular hour of the day.

### Inputs

* **direction \[Required]**

A vector for the direction that the viewport camera faces.

* **position**

A point for the position of the vieport camera in 3D space. If no point is provided, the Rhino origin will be used (0, 0, 0).

* **look\_around**

Optional 2D point (aka. UV coordinates) to tilt the viewport camera off from from the input \_direction. Values for UV coordinates must be between 0 and 1 and these correspond to a tilt of 90 degrees in either direction (with 0.5, 0.5 being centered on the \_direction). Inputting a native Grasshopper Slider MD component will allow the most control of view offsetting.

* **width**

An optional interger for the width (in pixels) of the Rhino viewport that will be generated.

* **height**

An optional interger for the height (in pixels) of the Rhino viewport that will be generated.

* **lens\_len**

An optional number that sets the lens length of the viewport camera in mm. Typical values are around 20-50mm but wider angle views can be achieved by lowering this number to 10 or less. If unspecified, the lens length of the currently active Rhino viewport will be used.

* **mode**

An optional text input for the display mode of the Rhino viewport that will be generated. For example: Wireframe, Shaded, Rendered, etc. If unspecified, the mode of the currenlty active Rhino viewport will be used

### Outputs

* **report**

The name of the viewport that was opened.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/ladybug-primer/components/4_extra/set_view.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
