Is there a native scripting function or otherwise a way to supply a tagpath and get returned its historical path
What do you mean by historical tag path?
I am not an expert here, but I donât think thatâs a âcorrectâ term. Tag history doesnât get stored in a tag, so there should be no historical tag path. (I could be wrong). Tag history gets stored in a database via the historian.
What exactly are you trying to do?
something that looks like soâŚ
histprov:BM_CX:/drv:ma-ign-io-a1:default:/tag:flr_0/erb02/batty/tm_ups_1a_1/temp_01_c
Like what the tag tree provides in the powerchart
But why? Like for a report, alarm, store in another tag, like whatâs your end game? If you had it, what would you be doing with it?
system.tag.getConfiguration() is what you want, but you will need to construct the path.
i am adding-on to the ad-hoc chart... I am just constructing the string... but idk it isnt working.. i thought maybe it had to be lowercase... because that is the source path the tree generates a lowercase string.. But i am scripting my pen objects and they look just like the ones i drag and drop from the tree..
I was looking at this but tagHistoryPath or what ever we shall call it isnt a prop of a tag?
Probably a better way to build it, but I have used this before, pyData
is a list of tag paths
for row in pyData:
prov = re.search(r"(?<=\[).+?(?=\])",str(row['Tag'])).group()
tag = re.sub(r"\[[^()]*\]", "", str(row['Tag']))
alarm = row['Alarm']
sourcePath = 'prov:'+prov+':/tag:'+tag+':/alm:'+alarm
Edit, to clarify, pyData
is the results from a table with columns âTagâ, âAlarmâ.
There isnât one.
from com.inductiveautomation.ignition.common import QualifiedPath, WellKnownPathTypes
qp = QualifiedPath.Builder()
.set(WellKnownPathTypes.HistoryProvider, "provider")
.setDriver("driver")
.setTag("path/to/tag")
.build()
.toString()
Doesnât really buy you much over joining the string parts together yourself.
Had no idea that existed.
dude youâre awesome and right⌠I was dumb and didnt cut the â[default]â out the [fullPath] and ran to the forms to soon lol but i am glad i askedâŚ