I'm trying to move some of my iLogic configurator programs over to a Vaulted structure. So far I've only hit one hick-up: Once the file is fully configured, I have a rule that "takes" the user to an IDW file using ThisDoc.Launch(). If this file doesn't exist in the user's local workspace it throws an exception (no surprise). Does anyone know if there is a method to get the file form Vault? There's no check in/check out involved, the files will be checked out to a "library user" that will not be running the programs.
This is what I envision (faked):
Try ThisDoc.Launch("My Drawing File.idw") Catch Try ThisApplication.VaultAddIn.MagicVaultMethod("$/Folder/Folder/My Drawing File.idw") ThisDoc.Launch("My Drawing File.idw") Catch MsgBox("Unable to retrive file from Vault") End Try End Try
Solved! Go to Solution.
Solved by rjay75. Go to Solution.
Unfortunately there's no magic vault command to do that. The vault api would have to be used to get the file from the vault.
It's pretty deep down the rabbit hole. Here in super high level pseudo code would be what is needed to refresh(get latest version of) a specific file from the vault.
VltService = SetupVaultService(server) VltService.LogIn(vault, user, pass) or LogInWindows(vault) DocService = VltService.GetDocService() FileInfo = DocService.GetFileInfo("$/root/project/folder/abcd.ipt") DocService.Download(FileInfo.LatestVersionId, "c:\Temp\abcd.ipt")
That's the basic steps involved. Each of those steps require several lines of code and is more involved than it looks. For instance see this blog post to download files from the vault. How to acquire files.
That capability then has to be made accessible from iLogic then. Because I need similar functionality from iLogic I've actually been working on a library for iLogic to do this. Just have to get time to finish it.
It's possible but communicating with the vault is anything but straight forward.
I have a kind of similar need:)
I have an assembly which consumes lots of components, some of them are library and some are standard fabrications items assembled in it. I would be grateful to you if I can have any solution which automatically grabs the missing files from Vault. So users don't have to grab the whole vault stuff to the local machine.
Looking forward to the solution.
Can't find what you're looking for? Ask the community or share your knowledge.