Hello,
I am trying to update some of my scripts so that they can run on OpenSim 4.x but I like the idea of keeping backward compatibility with OpenSim 3.3, which I still use sometimes. I was wondering if there is any method available from the MATLAB API that returns the OpenSim version being used. Currently I am reading the $OPENSIM_HOME environment variable, but I was looking for a more robust approach.
Thank you,
Luca
Determining the OpenSim version in use from the MATLAB API
- Luca Modenese
- Posts: 43
- Joined: Wed Jan 21, 2009 9:16 am
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Determining the OpenSim version in use from the MATLAB API
Hi Luca,
While this may help short term, you probably need to upgrade since official OpenSim 4.0 has been out for close to 3 years but anyway, you can use
to get the exact version of the API you're using. I'm sure this has been in all 4.0+ versions but likely it existed in earlier versions as well.
The environment variable OPENSIM_HOME, has been dropped in version 4.0+, is not set by installer since it pollutes the environment and precludes using multiple installations on the same machine and so should not be assumed by new code.
Please let us know if that works for you,
-Ayman
While this may help short term, you probably need to upgrade since official OpenSim 4.0 has been out for close to 3 years but anyway, you can use
Code: Select all
opensimCommonJNI.GetVersion()
The environment variable OPENSIM_HOME, has been dropped in version 4.0+, is not set by installer since it pollutes the environment and precludes using multiple installations on the same machine and so should not be assumed by new code.
Please let us know if that works for you,
-Ayman
- Luca Modenese
- Posts: 43
- Joined: Wed Jan 21, 2009 9:16 am
Re: Determining the OpenSim version in use from the MATLAB API
Thank you Ayman, that works!
Based on my tests the method did not exists for OpenSim 3.3 but that is not an issue.
Best wishes,
Luca
Based on my tests the method did not exists for OpenSim 3.3 but that is not an issue.
Best wishes,
Luca