# Can you create libraries of custom objects for Perspective?

**URL:** <https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654>\
**Category:** General Discussion\
**Tags:** ignition80\
**Created:** [March 18, 2021, 8:59pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654 "2021-03-18T20:59:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [March 18, 2021, 8:59pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/1 "2021-03-18T20:59:26Z")

</div>

Let’s say that I want to customize the functionality of a standard Perspective button by adding some custom parameters and enabling some Events. This creates my specific button that I can then use over an over again where I need the same functionality (with the result differentiated by the parameters).

The changes I have made are functional and not stylistic, so I can’t abstract them with a Perspective style. So where in general do I store the base copy of my modified button? The only solution I can see is to store it in a view that is never exposed to an actual screen. Whereas what I really want to do is to add my new button type to the list of perspective components.

After writing all that I think what I want is Templates for Perspective. Is that a thing?

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [March 18, 2021, 9:48pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/2 "2021-03-18T21:48:55Z")

</div>

Just toss it in a view of its own and use it as an embedded view where you need it. Can go further with project inheritance and then share that further across projects that inherent the project.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [March 18, 2021, 10:08pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/3 "2021-03-18T22:08:33Z")

</div>

How does that work for a button? For example I currently have 12 instances of my modified button that only different by parameter values. It sounds like the only way to make that work is to move the parameters out of the actual button and into the embedded view.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [March 18, 2021, 10:23pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/4 "2021-03-18T22:23:06Z")

</div>

Yes, just bind the parameters you care about to an input binding on the view.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [March 18, 2021, 10:23pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/5 "2021-03-18T22:23:30Z")

</div>

Yes, views with parameters are to Perspective as templates are to Vision. Beware of potential performance issues--though those are hopefully going to be resolved in the future.

> [@Embedded view vs component loading performance](http://forum.inductiveautomation.com/t/embedded-view-vs-component-loading-performance/37245):
>
> Hi, I wonder why a simple embedded view has very slow loading startup vs perspective component. For example is following example I try to load several custom button that only include a Label and two icon as embedded view. As it shows they loaded very slow but if I create this page with native perspective button they load instantly. I didn’t see this problem for template in Vision.

> [@Embedded view doesn't render on view startup](http://forum.inductiveautomation.com/t/embedded-view-doesnt-render-on-view-startup/35907/18):
>
> Yes, that is the primary target. It’s quite complicated, but we are working on it.

> [@Project screenshots - share yours](http://forum.inductiveautomation.com/t/project-screenshots-share-yours/513/123):
>
> Thank you. These are my tricks: 1 - The client PC is 8 gen i5 with 8 GB RAM. not running with the gateway at the same time. 2 - I use embedded view wisely. Never use two nested embedded views. 3 - I draw my SVG with every low detail. Even I edit the imported SVG in perspective to make them faster. Sometimes I edit XML code. 4 - For Items which are simple and use a lot in a project like navigation button, don’t use an embedded view and just put all object in a container and re-use it. 5 - Us…

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [March 18, 2021, 10:34pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/6 "2021-03-18T22:34:38Z")

</div>

> [@witman](#):
>
> Yes, views with parameters are to Perspective as templates are to Vision.

OK this is making my head spin. Are you saying that if I have a view with parameters, and then reference it it using multiple embedded views, that each reference will have a have it's own separate set of parameters?

Anyway, I'm already 1 deep in embedded views, so this doesn't sound nice:

> Never use two nested embedded views.

Also this seems counter to what you are suggesting:

> For Items which are simple and use a lot in a project like navigation button, don’t use an embedded view and just put all object in a container and re-use it.

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [March 18, 2021, 10:52pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/7 "2021-03-18T22:52:58Z")

</div>

Yes, each embedded view has its own set of parameters (i.e. - adjusting the parameter value of one embedded view instance will not change the parameters in other embedded view instances).

One thing to be careful of at the moment is that adding additional custom parameters to the source view will not automatically add the new parameter to all embedded view instances. There is a feature in the pipeline to make “syncing” these new parameters possible: [New parameter added to a view does not propagate to instances of that view in Perspective](http://forum.inductiveautomation.com/t/new-parameter-added-to-a-view-does-not-propagate-to-instances-of-that-view-in-perspective/43262)

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [March 18, 2021, 11:15pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/8 "2021-03-18T23:15:24Z")

</div>

Yes, it’s not quite ideal, but it’s what we have 🤷‍♂️ In some areas we presently have to choose between high performance runtime and efficient engineering. I expect this will improve over time.

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [September 25, 2023, 2:26pm UTC](https://forum.inductiveautomation.com/t/can-you-create-libraries-of-custom-objects-for-perspective/44654/9 "2023-09-25T14:26:09Z")

</div>

Sorry for taking this post again after a long time, but it is a bit weird solution, isn it?  
So, I have used a button with so many custom. In the future, may be I want to add some feature, and I want to avoid edit each instance of button because of its waste of time. Adding embbeded views to this "root" element, will save me a lot of time, but will not affect in a big way the view performance?  
I have a view with 100+ icons, and it takes a few seconds load the view. Adding 100+ embbeded views, will not make it even more slower?

Thank you!
