Retrieving the UDT tag path from instance tag path

I’m assuming you are in Ignition v7.9.x, but you might be able to do something like this:

tagPath = "[default]Path/To/Tag/Line 2/Filler.typeId"
typeId = system.tag.read(tagPath).value
print typeId

I don’t have 7.9 on-hand to test that out, but I am curious as to the solution.

I found that in Ignition 8.0, this seemed to work:

tags = system.tag.getConfiguration(tagPath)
for tag in tags:
	tagType = tag['tagType']
	if str(tagType) == 'UdtInstance':
		typeId = str(tag['typeId'])
	    print typeId	

Cheers,
Roger