# How do I create templates in Perspective?

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 22, 2025, 4:24pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840 "2025-09-22T16:24:02Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 22, 2025, 4:24pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/1 "2025-09-22T16:24:02Z")

</div>

I’m looking to figure out how to create a template in perspective. I ran into this post from 2021

> [@What is the answer to perspective templates?](https://forum.inductiveautomation.com/t/what-is-the-answer-to-perspective-templates/54259):
>
> Hello All, What is the de facto for using templates in Perspective? Logical answer is embedded views, however these degrade HMI performance and create a lot of latency. We have been staying away from embedded views altogether for these reasons. What are the other options if any to accomplish what was so easy to do in Vision?

Is this still the answer? with the project I’m creating this would be 40+ embedded views just for one view, which seems a bit excessive. is there a better way to creating templates in perspective? we are not using vision for this project. any suggestions are welcome

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [September 22, 2025, 4:39pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/2 "2025-09-22T16:39:56Z")

</div>

Embedded Views is how you instance templates. So what are templates? Basically, any view. I put all of our template views under a folder called “Templates” for consistency. The parameters can be used to do indirection, so you don’t have to create 40+ independent views.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 22, 2025, 4:58pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/3 "2025-09-22T16:58:55Z")

</div>

> [@cseigworth16](#):
>
> Is this still the answer?

Just wanted to add that IA has done a lot of work in the last 4 years with improving the performance of embedded views. You still don't want many nested layers of embeded views, but a few is generally fine.

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 22, 2025, 5:04pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/4 "2025-09-22T17:04:08Z")

</div>

really its my main view, which has a few embedded views on it to form the main screen. then within my embedded views i would have my “template” views? correct?

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [September 22, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/5 "2025-09-22T17:26:09Z")

</div>

The best way to know if you’re going to have a problem is to build a test template and see how it performs. I believe the performance issue manifests most frequently with multiple nested layers of templates and I suspect larger number of parameters may impact performance.

It’s a good practice to build a UDT that contains all the stuff you need for your template and then pass in a tag path to the UDT instance so you can indirect bind all the tags on template from your UDT.

I’ve done way more than 40 instances of a single template on a screen with no performance impact (fast load). If you’re using SVGs in your template make sure you use optimized SVGs (small file size) to reduce load times.

One time I did a template test with about 1000 instances of a device template embedded as a view on the same screen. It loaded in about 3 seconds and responded to tag updates in about a second.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [September 22, 2025, 5:43pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/6 "2025-09-22T17:43:54Z")

</div>

I said nested which is a bad word choice. What I mean is if you have a template that is built from templates which are built from templates and so on.

So it’s not like a recursive nesting thing. It’s if you have lots of lairs of nested templates.

I’ve gotten away with embedding multiple layers deep (4 or 5) but you have to test it and make sure the performance is suitable. That’s why I recommend templating it and making sure it is giving you the performance you want before you build the whole solution.

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [September 22, 2025, 7:25pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/7 "2025-09-22T19:25:15Z")

</div>

Going to throw this in here…. @bmusson ‘s solution, improving performance of nested views resulted by embedded views or flex repeaters: [Musson Industrial's Embr-Periscope Module](https://forum.inductiveautomation.com/t/musson-industrials-embr-periscope-module/99047)

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 22, 2025, 7:47pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/8 "2025-09-22T19:47:14Z")

</div>

thanks! i wont be embedding even near that much, only 2 maybe 3 layers deep

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 22, 2025, 7:48pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/9 "2025-09-22T19:48:12Z")

</div>

I’m actually running into an issue where the SVG’s we got are not actually uploading as SVG’s but instead are uploading as drawings

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 22, 2025, 7:52pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/10 "2025-09-22T19:52:19Z")

</div>

> [@cseigworth16](#):
>
> uploading as drawings

If you are talking about how they show up in the desinger, that is just how they show up when you embed an SVG. As far as I know its always been that way in 8.1

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [September 22, 2025, 8:07pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/11 "2025-09-22T20:07:45Z")

</div>

Correct. When you drag/drop an svg into the designer you have the option to put it in the image library (default) or embed it (what you want).

The designer will convert it to a drawing object once it’s embedded. As far as I know you can’t easily reverse it from a drawing object to an SVG.

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 22, 2025, 8:44pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/12 "2025-09-22T20:44:36Z")

</div>

okay because i remember in IU (i think) it made mention on it uploading as an SVG and being able uncombine it to move pieces of the SVG

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 23, 2025, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/13 "2025-09-23T15:41:25Z")

</div>

my next question would, let say i have a template for a tank and i want it to do; on click event: pull an overlay to the main screen. but each tank could have different statistics so I want to be able to configure each one to display their own stats. is there a way to make the “template” do an on click event but be able to change each individual tank to make that onclick event pull their own stats? if that makes any sense.

before i made the templates i was doing it through message handlers, is it still possible that through the use of them but in a template mode?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [September 23, 2025, 4:06pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/14 "2025-09-23T16:06:25Z")

</div>

> [@cseigworth16](#):
>
> is there a way to make the “template” do an on click event but be able to change each individual tank to make that onclick event pull their own stats? if that makes any sense.

Make your template's `onClick` script generic, just take the tank Id/string path that was passed to the template, and pass them as parameters to the statistics overlay on the main screen. The statistics overlay should be built in a similar fashion to the template, where all it needs is the base tag path string to build the indirect bindings to any statistics tags for the given tank. If you are using any SQL queries then make them use the tank ID as a parameter.

All of this comes down to tag organization. Group tags by their associated tank. If you want, you can technically separate by realtime vs statistics, as long as you maintain a consistent layout/format.

---

<div class="post-metadata">

**Author:** ![cseigworth16](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cseigworth16](https://forum.inductiveautomation.com/u/cseigworth16)\
**Post date:** [September 23, 2025, 4:12pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/15 "2025-09-23T16:12:04Z")

</div>

atm my onclick event script is “system.perspective.sendmessage()” so i want to have whats in the () be configurable for each tank? so ill want to be able to set it to “…sendmessage(‘tank1’)” , “…sendmessage(‘tank2’)” etc. for each instance

I havnt started setting up tags yet, just working on layouts of the screens, im just curious about navigation

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [September 23, 2025, 4:26pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/16 "2025-09-23T16:26:26Z")

</div>

[`system.perspective.sendMessage`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-sendMessage) expects a dictionary payload. Pass identifying information inside of the message's payload, and have the targeted message handler inspect the payload for said identifying information to determine if it should do something or ignore the message.

eg:

```python
system.perspective.sendMessage(
	"showStatistics",
	{
		"tankId": self.view.params.tankId,
	},
	scope='view'
)

```

`self.view.params.tankId` would be the tank id that was passed to the template. You can reference properties on the template in your scripts. This allows your `onClick` script to be generic while still passing the necessary identifying information to other templates/windows/scripts.

edit: For what it's worth, navigation using `system.perspective.navigate` also allows you to pass a dictionary of parameters to send to the view you are navigating to.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 23, 2025, 4:33pm UTC](https://forum.inductiveautomation.com/t/how-do-i-create-templates-in-perspective/110840/17 "2025-09-23T16:33:27Z")

</div>

@cseigworth16, please capitalise and punctuate your posts properly as they are difficult to read otherwise and it shows some disrespect to those you are asking to give of their time to help you. Your compiler wouldn't let you away with it - why should we?
