Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

VMSClient.Proj method with Path

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

VMSClient.Proj method with Path

Post by Etienne » 15 May 2020, 00:42

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

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: VMSClient.Proj method with Path

Post by Etienne » 17 May 2020, 00:20

I tried using the VMSClient.GetCFG method and it throws the following exception:

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

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: VMSClient.Proj method with Path

Post by Karol » 05 Jun 2020, 09:55

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

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: VMSClient.Proj method with Path

Post by Etienne » 05 Jun 2020, 16:34

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().

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: VMSClient.Proj method with Path

Post by lerou » 06 Jun 2020, 02:38

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.

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: VMSClient.Proj method with Path

Post by Etienne » 06 Jun 2020, 05:00

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.

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: VMSClient.Proj method with Path

Post by lerou » 06 Jun 2020, 09:06

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.

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: VMSClient.Proj method with Path

Post by Etienne » 06 Jun 2020, 21:41

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.

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: VMSClient.Proj method with Path

Post by Karol » 08 Jun 2020, 09:21

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

User avatar
Etienne
Posts: 48
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: VMSClient.Proj method with Path

Post by Etienne » 08 Jun 2020, 16:28

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

Post Reply