- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
OK I surrender!
We have upgraded from Vault Pro 2013 to 2015 and now I cannot get our programs to add files into the vault.
We are using VB.net 2013 to add the files.
I have tried changing the DocumentService.AddFile to DocumentService.AddUploadedFile but I get a Error 8000 An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in Autodesk.Connectivity.WebServices.dll.
Here is the entire code for that...
Private Shared Function UploadFile(ByVal filePath As String, ByVal folderId As Long, ByVal serviceManager As WebServiceManager) As Long
'This function adds a file to the vault and returns the MasterID
Using stream As New System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim fileData As ByteArray = New ByteArray()
fileData.Bytes = New Byte(stream.Length - 1) {}
stream.Read(fileData.Bytes, 0, fileData.Bytes.Length)
Dim oFile As Autodesk.Connectivity.WebServices.File
Try
oFile = serviceManager.DocumentService.AddUploadedFile(folderId, System.IO.Path.GetFileName(filePath), "Added by Vault ECN Creator", DateTime.Now, Nothing, Nothing, _
FileClassification.None, False, fileData)
UploadFile = oFile.MasterId
Catch ex As Exception
MsgBox(ex.Message)
UploadFile = -1
End Try
End Using
End Function
So I tried Wayne Brill's example of adding files using VDF. The problem here is that his example only allows for the folder to go 1 level deep. Our program has the user select a path in the vault so I have the folderID. Isn't there a way to set the folder directly using the folder ID or folder path without having to use a For Next to search the vault?
Web address to Wayne Brill's Example:
I really do not care what process I use to add files, so either way is fine.
Master Drafter/ CAD Programmer
Using Inventor 2018
Solved! Go to Solution.