cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

MKS environment variables when the user changes the view but without running a custom command ?

amatei
13-Aquamarine

MKS environment variables when the user changes the view but without running a custom command ?

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.

ACCEPTED SOLUTION

Accepted Solutions
LLawton
16-Pearl
(To:amatei)

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 😉.

View solution in original post

4 REPLIES 4
MichaelChatel
20-Turquoise
(To:amatei)

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. 

https://support.ptc.com/cs/help/integrity_hc/integrity111_hc/en/#page/IntegrityHelp%2Fclient_inface_integrity_client_gui.mif-11.html

 

I wish it was more clear of this, in the online help.

 

Mike

 

LLawton
16-Pearl
(To:amatei)

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
13-Aquamarine
(To:LLawton)

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

LLawton
16-Pearl
(To:amatei)

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.

 

Announcements


Top Tags