Check File out from Vault Browser from Inventor using iLogic

Check File out from Vault Browser from Inventor using iLogic

ccoomes
Advocate Advocate
600 Views
5 Replies
Message 1 of 6

Check File out from Vault Browser from Inventor using iLogic

ccoomes
Advocate
Advocate

Does anyone know how to check out a file from the vault browser in Inventor using iLogic?

 

I can check-in, and check on the top level assembly with iLogic, but I cannot figure out how to check a part out from the vault tab.

 

We cannot use the Model Browser tab, as it is a referenced Solid Edge file and there are no options for vault when you RMB on the part in the Model Tab.

 

The image shows the Vault tab in the browser, and that we would like to check out the Solid Edge File (245731-customer.asm) and then check it back in.  I have also added an image showing the RMB options from the Model Tab.

 

Any help would be great.

0 Likes
Accepted solutions (3)
601 Views
5 Replies
Replies (5)
Message 2 of 6

nstevelmans
Advocate
Advocate
Accepted solution

Hi, is it possible to make use off the standard snippits Inventor 2024

 

 

 

nstevelmans_0-1720527312504.png

 

0 Likes
Message 3 of 6

ccoomes
Advocate
Advocate

Unfortunately the snippets only refer to the active document.  unless of course I have missed something obvious

 

I cant make the Solid Edge file the active document.  However when you RMB over the file in the Vault Browser it allows you to Check on.  This action of RMB and check out is what I am trying to replicate.

0 Likes
Message 4 of 6

m_baczewski
Advocate
Advocate
Accepted solution

You can using this code. You should insert the parameters you want to search.
mSearchParams.Add("Name", "YourNameWithExtension")

 

'Build one to many name/value pairs of Property/Value as search criteria
	Dim mSearchParams As New System.Collections.Generic.Dictionary(Of String, String) 'add UDP.DisplayName, Value Pairs
	mSearchParams.Add("Name", "YourNameWithExtension")

	'returns full file name in local working folder (download enforces override, if local file exists)
	mVaultFile = iLogicVault.GetFileBySearchCriteria(mSearchParams, True, True) ', True: combine search criteria by AND; , , True: check-out

	If mVaultFile Is Nothing Then
		Logger.Error("Vault file search: File not found - Please double check that file can be found with search criteria applied.")
	Else
		Logger.Info("File " & mVaultFile & " found by search and downloaded to local workspace.")
		'add next action using the downloaded file here, e.g. Component.Replace("Part1:1", mVaultFile, True)
	End If

 

Message 5 of 6

nstevelmans
Advocate
Advocate
Accepted solution

Hi this is working for me.

 

'Build one to many name/value pairs of Property/Value as search criteria
Dim mSearchParams As New System.Collections.Generic.Dictionary(Of String, String) 'add UDP.DisplayName, Value Pairs
mSearchParams.Add("Description", "Teststep")	'applies to file 001002.ipt

'...add as many as required to enable a unique search result

'returns full file name in local working folder (download enforces override, if local file exists)
Dim mVaultFile = iLogicVault.GetFileBySearchCriteria(mSearchParams, True, True)

If mVaultFile Is Nothing Then
	Logger.Error("Vault file search: File not found - Please double check that file can be found with search criteria applied.")
Else
	Logger.Info("File " & mVaultFile & " found by search and downloaded to local workspace.")
	'add next action using the downloaded file here, e.g. Component.Replace("Part1:1", mVaultFile, True)
End If

 

0 Likes
Message 6 of 6

ccoomes
Advocate
Advocate

Thanks to all.

 

I managed to get to a solution.  It was all my fault.

 

I hadn't been refreshing the vault status in the Vault Tab.  If I had done this it would have shown me that the parts very being checked out as required, and if I had read the snippets correctly I would have realised you can check them out when you check the file status...

 

All sorted.

 

now to find a solution to paste text into the Check In dialog box, and click ok automatically....

0 Likes