What was the TechSupport answer? (They are very knowledgable).
Some options that spring to mind (although I haven't thought them through completely).
Create an executable that creates an instance of the ProcessBook application (via a command file), hook the executable in to the "Application BeforeNodeMap" event, have it look at the node being mapped and change it accordingly. Then when you open the display it will change the node between your DEV, TEST, PROD servers.
Create a PISDK Alias, let's say "PBOOK" that points to your "DEV" PI Server. Build your display using PBOOK, save it, close it. Change the server alias "PBOOK" to point to "TEST". Open your display and it should prompt to change the node etc.
You can't, to my knowledge, open a display so that you can change the nodes used within it without actually loading the display.
I like your first suggestion and I will give that a try. I am currently doing something similar to that, but I do not use the "Application BeforeNodeMap" event. That may help me out.
I asked this question to support, but wasn't convinced by the answer.
It could be really helpful to have the support call number you are referring to.
I do not want to get the servers mixed up for obvious reasons. Also, I would like the PDIs that I develop to be GENERIC so that they could use the same TAG names within Datasets regardless of which server I am pointing at.
This seems like a contradiction, on one sude you would like to get three different servers and be able to NOT mix them up, but, on the other side, you would like to be able to use the same things on any of those servers. In my oppinion the later will allow you to confuse them easily.
Is there a way within a batch file to set the default server prior to opening up PROCESSBOOK?
There are some methods you could use, but since PDIs will save the current PI Server being used it will try to connect not to the default PI Server but to the PI Server that was used when you added an specific point. PI SDK will also complain if the ID of the PI Server has changed... this things are in place to prevent the user from swtiching PI Servers inadvertedly (so the user won't mix them up), and it looks like you specifically want to override those mechanisms.
You may very well be better served having 3 different displays and openning the one that connects to the server you want to have oppened.
I don't know of an easy and simple way for you to acchieve this, I'm also having a hard time figuring out why you need to do this.but if you really want to try this out I would suggest (and I will not recommend doing this) removing all the PI Servers from the Known servers list and adding just the one PI Server you want the final user to use. Keep in mind that there is no current programmatic way to do this automatically, You will geet prompted by Processbook as soon as it opens on what server to use and the only server available would be the right choice.
Could you explain why you want to do this two things at the same time?
1.- using the same tag names for separate servers
2.- Switching servers seemlessly
Not reading through everything written in this thread so far, I'd suggest checking out what Han Yong wrote here:
The tip is basically for ProcBook to get tags by their tagnames - instead of the normal ProcBook way - getting them by their tag id's. This could perhaps help!
In some shops there are separate (completely independent) development, test and production environments. Each environment would have a complete archive copy of production environment. Rather than build 3 separate sets of .PDIs, simply build one. When changes are made, they can be developed using the job that applies the .PDI to the development server. When changes are tested, the same .PDI can be used against the test server. Once the test crew is satisfied with correctness, the same .PDI is moved into production.
In some of the other responses I noticed that there are tools to reset all the tags associated with the servers. In this case, since the servers have an identical set of tag names, and we are dealing only with historical data, the .PDIs wouldn't need to be changed.
Thanks for your interest.
Each environment would have a complete archive copy of production environment.
This looks like a backup, if it is a backup, the only thing you would need is for the development computer to only see the development server, everything else would be identical so it won't matter.
But, why would you need a "developmet" PI Server just to create .PDI's? it would make sense if you were creating a heavy customized PDI that does a lot more than just displaying your data.
Right. There are other databases involved entering information into the .PDI. I have some leads to go on though based on all the responses. Thanks.
I want update this discussion.
I'm encountering the same issue explained above on this discussion.
What I want to do is create a ProcessBook that working indepently of which server it is collecting the data.
For example, I create a display with a PI value object.
When you create this type of object you have to specify a correct PI server with a tag. You can also use a PI Calculation, odbc connexion, an AF element or an MDB. But all this way of getting value, you have to specified which PI server you want to connect. During the creation of the value object the server connection have to be working.
On that account, the value save the specified server ID.
If you try to open the processbook display on another computer, that don't have the connection to the server previously specified, you have to determined an other one.
And you have to do this procedure for every display you had configure before. So it could be really lack of time to do this server modification every time you modified a display and for every display.
What I'm looking for it's a faster way to modified the server of every object on every display of a piw.
As Rhys suggested on 21 Apr 2010, I try to catch the event named BeforeNodeMap, but I didn't succeed to catch it.
I also tried to workaround by using a Server Alias and a Path Alias but was not able to use this alias on the ProcessBook object.
Thank for your help.
Have you tried the PBSupportTool for bulk editing of PDI files? Contact Customer support if you don't have a copy of this tool. One of it's functions is to do a global search & replace on all symbols in a list of PDI files. Therefore you can use it to change the older server name to the new server name without opening up and modifying each PDI separately.
If all of the tag names are the same, would it make sense to use AF, create a template and create elements for each server? Then you can use an Element Relative Display.
@Alex: I think what you describe is possible if you use 1 AF Server, 3 AF Databases and 3 PI Data Archive Servers, and you configure the default AF Database to be the development, test or production version. The problem that I see with this is that you don't have a separation layer for the AF Server for the 3 different environments. Generally, as these environments are isolated and controlled by different people, this technique described could be difficultly achievable.