Vladimir Bykov 5 months ago • updated by Ilya Markov (expert) 5 months ago 3

Earlie when I created the subdevice from script I used a template.

Now method for adding subdevice is

module.AddSubDevice(SystemName, [Device], [System], [Type], [Tags], [Name], [Callback])

Did you refused to use subdevice template or I miss something?

Under review

what template does you mean?

I created one tempate Subdevice in Studio with widgetes. After that in script I created subdevices, based on this template, like that:

var subDeviceTemplate = module.GetSubdevice('Template');
var newSubDevice = module.AddSubDevice('New subdevice', subDeviceTemplate); 

and made reference between driver tags and GUI items of the widget of the new subdevice


no, you can't create subdevices this way