I am trying to upload a thumbnail image to a part item (innovator.part.thumbnail)
The method for this is the setfileproperty method.
I have written a function to do this, but it failt to create a new file in the vault. The other updates work fine and the part.thumbnail property does populate with some unknown GUID
Public Sub RegisterArasPart(strPartNumber As String _
, strName As String _
, strDescription As String _
, strClassification As String _
, strLegacyNumber As String _
, strPDMDocumentID As String _
, strImagePath As String)
'Update an existing Aras Item and populate the thumbnail
'Note: I ensured that the file specified is on the server (or available)
Dim NewPartItem As Aras.IOM.Item = inn.newItem("part", "add")
NewPartItem.setProperty("item_number", strPartNumber) ' & iDashNumber.ToString("00"))
NewPartItem.setProperty("name", strName)
NewPartItem.setProperty("description", strDescription)
NewPartItem.setProperty("pdmdocumentid", strPDMDocumentID)
NewPartItem.setProperty("classification", strClassification)
NewPartItem.setProperty("_legacy_number", strLegacyNumber)
NewPartItem.setFileProperty("thumbnail", strImagePath) 'This fails to upload the file given by the strImagePath.
NewPartItem.apply()
DisconnectFromAras() 'This is my function to disconnect
End Sub