sixcloud
Member
I have been struggling with something for the better part of a week navigating the ins and outs of (as far as I can tell) poorly documented FactoryTalk VBA.
Specifically I have been working the designing a trending feature where the user can, at runtime, add tags to a saved list. The saved list is a series of HMI tags that hold strings, and the strings are the OPC reference that ultimately gets added.
This is now operational.
Problem is I cannot seem to modify any of the properties of the pen I just added.
For example:
Trend.Pens.Add(blah,blah, blah, blah) x16
This works. I can see the runtime update with the pens I selected, with the units, description, lo/hi EU pulled correctly.
However, if I attempt to access the properties of one of those pens:
Trend.Pens.Item(0).Color = "SOMECOLOR"
I get index out of range.
Monitoring the TREND.PENS, I see 16 items added (which should be happening) but within the PENS I see ITEM. Inside that Item I see nothing. How do I successfully modify the attributes of these pens I have added?
Specifically I have been working the designing a trending feature where the user can, at runtime, add tags to a saved list. The saved list is a series of HMI tags that hold strings, and the strings are the OPC reference that ultimately gets added.
This is now operational.
Problem is I cannot seem to modify any of the properties of the pen I just added.
For example:
Trend.Pens.Add(blah,blah, blah, blah) x16
This works. I can see the runtime update with the pens I selected, with the units, description, lo/hi EU pulled correctly.
However, if I attempt to access the properties of one of those pens:
Trend.Pens.Item(0).Color = "SOMECOLOR"
I get index out of range.
Monitoring the TREND.PENS, I see 16 items added (which should be happening) but within the PENS I see ITEM. Inside that Item I see nothing. How do I successfully modify the attributes of these pens I have added?