# How to reference existing Perspective views

**URL:** <https://forum.inductiveautomation.com/t/how-to-reference-existing-perspective-views/35341>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [June 4, 2020, 9:30pm UTC](https://forum.inductiveautomation.com/t/how-to-reference-existing-perspective-views/35341 "2020-06-04T21:30:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blakekinder](https://avatars.discourse-cdn.com/v4/letter/b/e0b2c6/32.png) [@blakekinder](https://forum.inductiveautomation.com/u/blakekinder)\
**Post date:** [June 4, 2020, 9:30pm UTC](https://forum.inductiveautomation.com/t/how-to-reference-existing-perspective-views/35341/1 "2020-06-04T21:30:50Z")

</div>

How can I get a reference to existing views in a Perspective project? I’m creating a component that requires functionality similar to Perspective’s existing embed components.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 4, 2020, 10:12pm UTC](https://forum.inductiveautomation.com/t/how-to-reference-existing-perspective-views/35341/2 "2020-06-04T22:12:46Z")

</div>

There’s no direct way to reference Views, but this will get a list of Views currently saved in any directory of the project, along with their path. Note that you would need to enter the name of your project.

```auto
import os
project_name = 'MyProject'
for root, dirs, files in os.walk(".\\data\\projects\\" + project_name + "\\com.inductiveautomation.perspective\\views"):
	for file in files:
		if file.endswith('view.json'):
			system.perspective.print(root.split('views')[1])

```
