The tag named "Post" is in Vision Client tag provider. It is a string type tag with value "XYZ".
Button code:
qvs = system.tag.readBlocking('[Client]Post.dataType')
print 'quality is good = %s' % qvs[0].quality.isGood()
print 'dataType = %s' % qvs[0].value
Result:
quality is good = True
dataType = XYZ
This is confusing, because I'm doing exactly what the documentation tells me to do in the Note in the Description section:
Why does it return the value of the tag and not the ".dataType" which I asked for?
I also tried the following:
tagDict = system.tag.getConfiguration('[Client]Post', False)
And received a massive stack trace, the important part of which was:
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayResponse$GatewayThrowable: Provider not found: Client
So how am I supposed to get the data type of a Vision client tag? This is Ignition 8.1.28.
Client tags are weird unicorns (now) because they're still using the pre Ignition 8.0.0 tag code.
Much of the advice you'll see in the manual doesn't apply to client tags as a result.
Let's take a step back - what are you ultimately trying to do, and why?
I am writing generic wrapper functions that deal with tags. Part of that is to understand the data type of the tags so that I can do type checking or type casting myself. Another feature of this wrapper is so that I can write out tag values to a file in JSON format.
I take it from your response that the direct answer to my question is "this isn't possible"? ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
P.S. Another major reason to write these wrappers is to enable me to run "Ignition" script code outside of Ignition, so that I can use Eclipse to do step-by-step debugging with an object viewer, and also to do unit testing. Other than Vision Client tags, this already works.
The easiest answer, by far, is to not think of Vision client tags as interchangeable with "real" Ignition tags in the rest of the system.
It is probably possible to read the data types programmatically, but I don't know exactly how to offhand.