# Component Creation

**URL:** <https://forum.inductiveautomation.com/t/component-creation/44403>\
**Category:** Ignition\
**Created:** [March 12, 2021, 1:29pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403 "2021-03-12T13:29:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hossam.abdalrahman](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@hossam.abdalrahman](https://forum.inductiveautomation.com/u/hossam.abdalrahman)\
**Post date:** [March 12, 2021, 1:29pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/1 "2021-03-12T13:29:21Z")

</div>

Hello,

Is there a way to create a new component in a window using scripting ?

Thanks

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 12, 2021, 1:57pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/2 "2021-03-12T13:57:30Z")

</div>

Not sure your use case here, but could you just place all the components that you conditionally need, then hide them. Make them visible when you need them, instead of actually adding them to the window.

---

<div class="post-metadata">

**Author:** ![hossam.abdalrahman](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@hossam.abdalrahman](https://forum.inductiveautomation.com/u/hossam.abdalrahman)\
**Post date:** [March 12, 2021, 2:30pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/3 "2021-03-12T14:30:16Z")

</div>

Thanks for your answer.  
The problem is that the number and type of component is not always the same sometimes i will need 10 other times i will need 100 components.  
I tried to copy and paste one component in a notepad and the result was an XML so what i want to know  
is a way to automatically add this XML to a certain window without having to use copy and paste.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 12, 2021, 2:47pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/4 "2021-03-12T14:47:50Z")

</div>

Are you trying to do this at runtime, or in the designer?

---

<div class="post-metadata">

**Author:** ![hossam.abdalrahman](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@hossam.abdalrahman](https://forum.inductiveautomation.com/u/hossam.abdalrahman)\
**Post date:** [March 12, 2021, 2:59pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/5 "2021-03-12T14:59:59Z")

</div>

just in the designer

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 12, 2021, 3:11pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/6 "2021-03-12T15:11:18Z")

</div>

Are all the components different or is this just a case where using templates and a template repeater is appropriate?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 12, 2021, 3:26pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/7 "2021-03-12T15:26:21Z")

</div>

Yeah that is what I was thinking, using the template repeater.  
[Template Repeater Component - Ignition User Manual 7.9 - Ignition Documentation (inductiveautomation.com)](https://docs.inductiveautomation.com/display/DOC79/Template+Repeater+Component)

---

<div class="post-metadata">

**Author:** ![hossam.abdalrahman](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@hossam.abdalrahman](https://forum.inductiveautomation.com/u/hossam.abdalrahman)\
**Post date:** [March 12, 2021, 3:30pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/8 "2021-03-12T15:30:55Z")

</div>

as And Example I have I need to draw 3 Squares 5 Circles and 2 Triangles  
and I have a template for each so what I need is a way to create the amount i need from each without having to drag and drop.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 12, 2021, 5:28pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/9 "2021-03-12T17:28:06Z")

</div>

If they’re already templates, then your next step beyond the Template Repeater is the [Template Canvas](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Template+Canvas).

---

<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 12, 2021, 5:32pm UTC](https://forum.inductiveautomation.com/t/component-creation/44403/10 "2021-03-12T17:32:21Z")

</div>

`ctrl/cmd + c` -\> `ctrl/cmd + v`?
