Create panel and buttons from script

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
gmcphers
Posts:5
Joined: Tue Jun 09, 2015 12:43 pm

Create panel and buttons from script

Post by gmcphers »

So I am creating a library and I want to create some wizards to help people construct items more quickly. I am hand crafting the wizards for some specific specs so I am not using the wizard builder. I would like to be able to be able to create panels and push buttons in the the actual code. So are there any functions or anything like that where I can make a new push button on a panel or make a new panel from code? I have searched the help but I haven't seen anything. Thanks for your time :)

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Create panel and buttons from script

Post by leoknipp »

Hello,

with the CTRL-function createPanel() you can create a new panel.
Inserting graphical objects via script functions to save them in the panel file is not possible in a simple way.

You could create the panel in Gedi, save it as xml-file and have a look at the panel file in xml-format.
Then you can write your own functions which will create xml-files.

Why aren't you using the Gedi to create the panels?

Another possibility is to load reference objects (panel files) during runtime using the CTRL-function addSymbol(). With this function you can put new references to a panel in runtime. This information is not saved in the panel file then.

Best Regards
Leopold Knipp
Senior Support Specialist

gmcphers
Posts:5
Joined: Tue Jun 09, 2015 12:43 pm

Re: Create panel and buttons from script

Post by gmcphers »

So I am taking a text document with about 2000 panels names on it and I am going to make code that creates each panel with the corrosponding name as well as the panel topology. I was going to make a wizard that would also create some of the button structures on the panels. Thanks very much for your help and time :)

3 posts • Page 1 of 1