How to find if rv instance is running or not?

This question has been asked before I spotted somewhere however that was for older version.

INFO: decoded URL 'rvlink:// -l -play -eval 'shotgun.theMode().setServerURLValue("[https://dabarti.shotgunstudio.com](https://dabarti.shotgunstudio.com/)");shotgun.sessionFromVersionIDs(int[] {9007});'' 

no backtrace available 
INFO: eval returned: ERROR: attempted to reference unresolved symbol "" at Command line eval, line 1, char 74

I am facing this problem : https://groups.google.com/a/shotgunsoftware.com/d/msg/shotgun-dev/AwLlA7QsCGQ/ADacxTtPGAAJ

I want to know the rv way of finding if rv is already open because rvpush url throws the error reported in the above URL

or how to fix this error when using rvpush ?

1 Like

Hey,

It looks like there might be a syntax error with your command. Would you mind trying:

rv -flags ModeManagerPreload=shotgun_review_app -eval 'shotgun_review_app.theMode().setServer("https://YOURSITE.com");shotgun_review_app.theMode().launchTimeline([(string,string)]{("entity_type","Version"),("entity_id","INTEGERNUMBER")});'

Thanks,
Alexa

1 Like

As for how to find is RV instance is running:

I think there are two pieces of information that can be very helpful for this use of RV. The first is RVPUSH. If you look alongside RV in your installation you will find an additional application called “rvpush” that can be used to send rv commands to already running RV instances. You can start new ones as well, but for many tasks RVPUSH is a great tool to set the session state if you do not need to hear back from RV. Here are the docs: RVPUSH

The second slightly more advanced approach is to use rvNetwork.py which is also included with each installation of RV. This python module has the ability to help you send and receive communication with a running instance of RV. You can find it under $RV_INSTALL_PATH/src/python/network/rvNetwork.py. There’s some documentation inside that module.

1 Like

thank you Alexa,
so in
rv -flags ModeManagerPreload=shotgun_review_app -eval 'shotgun_review_app.theMode().setServer("https://YOURSITE.com");shotgun_review_app.theMode().launchTimeline([(string,string)]{("entity_type","Version"),("entity_id","INTEGERNUMBER")});'

INTEGERNUMBER is all that is required ? not string, Version ?

1 Like

I tried and got this error in rvconsole:

  0: __statement_list (void; ?, ?varargs)
INFO: eval returned: ERROR: attempted to reference unresolved symbol "" at Command line eval, line 1, char 196
1 Like

the linked rvpush docs do not show how to set the session state !
those are same as doing rvpush --help

1 Like

Yes, all you need is the Version ID, which is an integer like 712 for example. Do you have Shotgun Integration AND Screening Room packages enabled in RV?

I’m not sure I understand the question… If you could have an RV way to find if RV is open, wouldn’t you already have RV open?

1 Like

I am launching new rv from shotgun that wants to finds an existing instance and open the mov in the already open one instead of launching a new rv instance.

You replied very late, I have figured out I can use tags to find rv instance.

Thank you .