Component Creation

Hello,

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

Thanks

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.

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.

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

just in the designer

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

1 Like

Yeah that is what I was thinking, using the template repeater.
Template Repeater Component - Ignition User Manual 7.9 - Ignition Documentation (inductiveautomation.com)

1 Like

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.

If they’re already templates, then your next step beyond the Template Repeater is the Template Canvas.

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