Hi Guy's,
I don't think there is. However, I may stand corrected.
Which would be a good thing in this case.
With Geo SCADA VB can you convert a string into a long?
CLng does not seem to exist.
Also, is there another way?
Thanks,
Solved! Go to Solution.
Assuming you're talking scripting on mimics, it is just normal VBScript (it is using the ActiveScript engine provided by Microsoft), the development team just add a few objects (like Server) for you to use.
CLng should work fine.
Option Explicit
Public Sub DoMaths
MsgBox(CLng("1") + CLng("2"))
End Sub
The above code shows 3, whereas if it was treated as a string it would show 12 (and I would have better used & instead of + for a string concatenation to avoid ambiguity, but that's a different issue)
Assuming you're talking scripting on mimics, it is just normal VBScript (it is using the ActiveScript engine provided by Microsoft), the development team just add a few objects (like Server) for you to use.
CLng should work fine.
Option Explicit
Public Sub DoMaths
MsgBox(CLng("1") + CLng("2"))
End Sub
The above code shows 3, whereas if it was treated as a string it would show 12 (and I would have better used & instead of + for a string concatenation to avoid ambiguity, but that's a different issue)
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!