Yes, but your change in the def line broke it. The comment in the sample code for tagFolder indicates what the caller should supply.
Uhm, not sure what you mean. Should i not have the tagfolder in this line?
def getDatasetFromArrayTags([default]Brewfather_OPCUA):
No. That comes from the caller.
{ Seems to me you need to go through some python scripting basics. }
Supply the tag folder string.
You have enclosed your tag folder path in curly braces, which makes the expression attempt to read the path's value. You need to pass a string. If a constant, put it in quotes. If you have the string in a property, put the path to the property in curly braces.
{ Seems to me you need to go through some Ignition expression binding training. }
I'll stop here until I hear from you that you've completed IU.
Could be. Call it from the designer script console.
Don't put the sample code in the script console. Call the function from script console. One line:
ds = BrewfatherDatasetDropdown.getDatasetFromArrayTags("[default]Brewfather_OPCUA")
This will produce a more complete error for you (us) to see.
Have you saved the project since you created that script?
{ Please post errors as copy and pasted text, not screenshots. Use the "preformatted text" button in the forum comment editor to keep it neat. }
Yes, but I updated my comment above since I have changed the name of the script from "BrewfatherDatasetDropdown" to "BrewfatherDataset".
This is the correct error:
Traceback (most recent call last):
File "", line 1, in
File "module:BrewfatherDataset", line 9, in getDatasetFromArrayTags
AttributeError: 'com.inductiveautomation.ignition.designer.gui.tool' object has no attribute 'toDataSet'
Replace system.tag.toDataSet with system.dataset.toDataSet.
{ I'm unavailable for the next few hours. The community might help. }









