Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hello,
Within the Integrity Client 11.0, when the user changes the view and then runs a custom command,
an environment variable shows the current view
MKSSI_WINDOW=si.mysandboxes
MKSSI_WINDOW=project
MKSSI_WINDOW=projecthistory
MKSSI_WINDOW=archive
Can this MKS environment variable be obtained when the user changes the view but without running a custom command defined in Viewset menu -> Customize -> Actions -> Custom ?
If MKS environment variables such as MKSSI_WINDOW would be stored somewhere (files/registry) dynamically whenever the view is changed, I would like to have a notification mechanism about view changes.
Solved! Go to Solution.
These environment variables are set only when you run a client-side custom action.
On Windows, if you run "cmd" outside of the client and type "set", you will not see them.
If you run "cmd.exe" as a custom action in the client and type "set", you will see them (I'm sure you already know that).
I tried to run "integrity gui" from command line to see if I could get the context but that simply spawns the client.
So the only way to access them is to run a custom action.
I'm sure the client doesn't maintain and update these variables in real time outside of a custom action. I suspect it would be quite burdensome for the client to update the registry or variables every time the user did something.
You can propose that as an idea, good luck with that 😉.
Amatei,
You may want to open a Support case to confirm how this works (I haven't used Integrity (now Windchill RV&S) in some time), but I kind of remember that this had some inconsistency of when variables may or may not be refreshed depending on view window/action.
I wish it was more clear of this, in the online help.
Mike
These environment variables are set only when you run a client-side custom action.
On Windows, if you run "cmd" outside of the client and type "set", you will not see them.
If you run "cmd.exe" as a custom action in the client and type "set", you will see them (I'm sure you already know that).
I tried to run "integrity gui" from command line to see if I could get the context but that simply spawns the client.
So the only way to access them is to run a custom action.
I'm sure the client doesn't maintain and update these variables in real time outside of a custom action. I suspect it would be quite burdensome for the client to update the registry or variables every time the user did something.
You can propose that as an idea, good luck with that 😉.
Let's consider a custom action that opens some GUI application.
Then while my GUI application is open, the user changes the Integrity Client view, thus the MKS environment variables are changed too.
It is clear that my GUI application will work incorrectly, considering the initial/old values of the MKS environment variables.
That's why I would like my GUI application to be notified when the user changes the Integrity Client view
The scenario you describe is what I was guessing, it seems you're trying to develop a standalone application that can synchronize its context with the Integrity client.
I just cannot think of any way to achieve that given what I described above.