Page 1 of 2

VMSClient.Proj method with Path

Posted: 15 May 2020, 00:42
by Etienne
I would like to provide VPRs to our production systems and not have to configure Project paths so I tried using the VMSClient.Proj method to specify my path.

The documentation mentions that the Proj(String) command can also be used to examine a project file at a known location on the target system. This location don't has to be within the configured scan folders.

When I provide the path to a VPR, it throws an exception:
Invalid response to PROJ command received.
Specified argument was out of the range of valid values. Parameter name: root
If this doesn't work, a follow-up question is:
Is there any way to use VMSClient.Start with a path to a VPR that isn't in a Project path?

Thanks for your help,

Etienne Laneville

Re: VMSClient.Proj method with Path

Posted: 17 May 2020, 00:20
by Etienne
I tried using the VMSClient.GetCFG method and it throws the following exception:

'VMS Command failed: NotImplemented
NotImplemented
Command not implemented: GETCFG'

Re: VMSClient.Proj method with Path

Posted: 05 Jun 2020, 09:55
by Karol
Hi Etienne!

You need to use VMSClient.Start()!
As argument of the method specify the full path to the VPR (e.g. "D:\Ventuz\Presentations\cube_V6.vpr").
The location of the VPR is _not_ bound to a Ventuz Project folder!

Best Regards
Karol

Re: VMSClient.Proj method with Path

Posted: 05 Jun 2020, 16:34
by Etienne
When I use VmsClient.Start with a path to a VPR, I get the following error:
Ventuz.Remoting4.MachineService.VMSClientResponseException
HResult=0x80131500
Message=VMS Command failed: NotAvailable
NotAvailable
Requested Project not found
Source=Ventuz.Kernel.Remoting4
The file path is correct, it is verified with File.Exists() just before calling VmsClient.Start().

Re: VMSClient.Proj method with Path

Posted: 06 Jun 2020, 02:38
by lerou
You can start a VPR via VMSClient.Start. The project name has to match. It's NOT the VPR's file name - usually it's the filename without the extension, but that's also not always the case!

Use VMSclient.Proj(null) to list your projects and have a look at them. There you'll find both the file (VPR or VZP) and the project name. It should contain all projects found by the Project scan. Look up your VPR there and and then use the ID to start the project.

Re: VMSClient.Proj method with Path

Posted: 06 Jun 2020, 05:00
by Etienne
lerou, thanks for your time with this question. Your answer goes against what Karol replied. He says you can use the VPR's full path and it does not need to be in the Ventuz Project so I should not need to deal with VMSClient.Proj. That being said, in my experience, that is not possible. It's the first approach I tried. Also, I already have code that reads the Projects and looks for the VPR in there, then launches it by ID. This doesn't work when you copy a new VPR to a system and VMS hasn't scanned its Projects folders.

Back to the original question, I ask about adding a path programmatically using VMSClient.Proj. It also describes what I am trying to avoid:
1. Configure the Projects folders in the VMS on multiple production machines.
2. Scan for new projects.

This would be achieved by launching a VPR using a full path but that doesn't sound possible. My fallback would be to add the folder where the VPR is to the VMS Project folders list and scan for the new VPR.

Seems like this should be fairly simple since you can Open the VPR in Windows Explorer, or programmatically, Ventuz launches and you're in business. I understand other machines in the Cluster might not have the file, but let us deal with that down the line with a Cluster error like ErrorProjectMismatch.

Re: VMSClient.Proj method with Path

Posted: 06 Jun 2020, 09:06
by lerou
Etienne wrote:
06 Jun 2020, 05:00
lerou, thanks for your time with this question.
yeah, I just realised, I didn't anwer your question at all. Sorry for that.
Etienne wrote:
06 Jun 2020, 05:00
Your answer goes against what Karol replied. He says you can use the VPR's full path and it does not need to be in the Ventuz Project so I should not need to deal with VMSClient.Proj. That being said, in my experience, that is not possible. It's the first approach I tried. Also, I already have code that reads the Projects and looks for the VPR in there, then launches it by ID. This doesn't work when you copy a new VPR to a system and VMS hasn't scanned its Projects folders.
I just tried it in my remoting tool and I can confirm that using VMSClient.Start with an absolute path outside the VMS search dirs doesn't work.

I also tried manipulating the VMS Configuration, but as you already pointed out, the required methods (SetCFG, SetCFGAsync) have not been implemented.

So there seems to be no straight forward way to deal with this. A possible hack would be to change the VMS config file which includes the VMS search paths. It's located in the public documents near the default location for Ventuz projects:

C:\Users\Public\Documents\Ventuz6\Configuration\VMS

It's a simple XML file that you could read, alter and then use the VMS to look for projects and start them. I'm not sure if this is any better then to copy the VPRs to the public directoy to begin with.

Re: VMSClient.Proj method with Path

Posted: 06 Jun 2020, 21:41
by Etienne
Thanks for that suggestion about editing the config.xml file directly, it's the best solution I have so far.

Do you know if there is an equivalent file for the Ventuz 5 VMS? I looked in the Ventuz5 folder and didn't see any.

Re: VMSClient.Proj method with Path

Posted: 08 Jun 2020, 09:21
by Karol
Hi Etienne,

I forgot to mention that the folder where the VPR is located must be configured in the VMS search paths.
But generally my answer from above is still valid. I just tested this.

Best Regards
Karol

Re: VMSClient.Proj method with Path

Posted: 08 Jun 2020, 16:28
by Etienne
Hello Karol,

Unfortunately your answer does not address the original question nor is it generally correct from what I can see here in my testing:
Karol wrote:
08 Jun 2020, 09:21
I forgot to mention that the folder where the VPR is located must be configured in the VMS search paths.
but in your previous answer you stated that
Karol wrote:
05 Jun 2020, 09:55
The location of the VPR is _not_ bound to a Ventuz Project folder!
If you go back to my original question, this is what I am trying to work around:
Etienne wrote:
15 May 2020, 00:42
I would like to provide VPRs to our production systems and not have to configure Project paths
I've also tested VMSClient.Start again with a full path (as you described in your previous message) and with just the VPR name and both do not work with Ventuz 5 or 6. The VPR file (Baseball+ - 200527 - 01.vpr) is in a subfolder (D:\Ventuz\FSN 2020\Baseball+\Presentations\) of a Ventuz Projects (D:\Ventuz\) folder :
Ventuz.Remoting4.MachineService.VMSClientResponseException
HResult=0x80131500
Message=VMS Command failed: NotAvailable
NotAvailable
Requested Project not found
Source=Ventuz.Kernel.Remoting4
I am specifying the full path to a VPR that has been in my Ventuz Projects for weeks.

The only way this works is by using the project ID which is what I am trying to avoid.

Etienne