AnsweredAssumed Answered

How to write arc. value with vba in a processbook variable

Question asked by ohlbomi1 on Jan 23, 2020

Hello - I'm new with VBA and have a probaply simple question. I do have a processbook display with vba code where I do read an archived value from a certain PI Tag  ( PITagNo1) at a certain time (eTime) - this is tjhe code:

set myTag = server.PIPoints("PITagNo1")
Set newValue = myTag.Data.ArcValue(eTime, rtInterpolated)



This works well. But now I do want to write the result  (newValue) into a second PI Tag ( which is already on the processbook display )  ( "PITagNo2" )  Everytime I try to write anything I get "type mismatch" and other errors. Can someone give me a hint how to write values to a given PI Tag at an given Timestamp into the PI processbook ?