Hi-
Yeah, I was just showing a little trick I use every once in a while to save some time… really nothing more then a little python scripting, but using the PMI designer as the scripting host, because it’s convenient.
In this case, we needed to make 100 tags, each one identical execept for 1 number, 0-99 (in the name and opc address).
First, I created 1 tag, and exported to CSV. I opened the csv, and did a search and replace to escape quotes, so… from " to " , and then copied that line to the clipboard.
In the PMI designed, I created a temporary window, with a temporary button. In the ActionPerformed event of the button, I wrote a script to run a loop, and print out that line, but with the running number. Something like:
i=0
while i<100:
print "myescapedline... item%d, address%d" % (i, i)
i=i+1
The point is that the PRINT command prints to the console, from which you can copy and paste. So, I opened the console from Tools->Advanced->Console, and clicked the Clear button.
Finally, I put the designer in preview mode, hit the button, and watched the console. I now had a csv of all the tags I wanted, so I copied from the console, pasted into the file, saved and imported it.
Nothing too special, just a quick way to get it printed out somewhere where you can copy the result. I could do it with any scripting environment, but PMI just happened to be the most convenient since it was already installed
Hope this helps,