I have created an ACE calculation that requires to cast outputs ad-hoc (i.e. not predefined as outputs in the original context definition in the wizard)
There can be one or more aliases defined in the configuration context that will be used as outputs.
I am having issues casting the PIACEPoint as a working output. The object appears to be created correctly, but no output is ever produced. There are no exceptions thrown.
A quick fix I am using the in meantime is to use the PISDK UpdateValue method in the PIAlias.Datasource property, but I wish to avoid using this so the data is correctly buffered to collectives. (I am using PISDK 18.104.22.1688)
Here is an extract of my code. (It is worth noting that this code is running in an independant class that has not inherited PIACENetClassModule)
For Each DataLine In Me.ContentData
If DataLine.Length > 0 Then
PIAlias = Me.MyModule.PIAliases(DataLine.Split(",")(0))
Value = CSng(DataLine.Split(",")(2))
Quality = CInt(DataLine.Split(",")(3))
PIACEPoint = New OSIsoft.PI.ACE.PIACEPoint(Me.MyContext, PIAlias.Name, TagAliasUsedType.TagAliasAsOutput)
PIACEPoint.ExeTime = Me.ExePITime.UTCSeconds
Select Case Quality
PIACEPoint.Value = Value
PIACEPoint.Value = "Bad"
PIACEPoint.SendDataToPI = True
Catch ex As Exception