Problem with IExplorerUtil.UpdateFileProperties and AutoCAD...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So here's the problem:
When trying to update a mapped UDP on a DWG file (AutoCAD Mechanical) inside the Vault Explorer via Edit Properties it works like a charm and both properties (Vault and also ACADM) are good.
Unfortunelty when trying to update the exact same property on the excat same file via the Vault API (IExplorerUtil.UpdateFileProperties) it doesn't work like a charm as you can see here:
The value 'test' is not updated inside of the DWG file for any reason!
For testing purposes I've put the source code for updating properties to a console app:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Services;
using Autodesk.Connectivity.Explorer.ExtensibilityTools;
using Autodesk.Connectivity.Explorer.Extensibility;
using Autodesk.Connectivity.WebServices;
using Autodesk.Connectivity.WebServicesTools;
namespace VaulttSandbox
{
class Program
{
private static UserPasswordCredentials _cred;
private static WebServiceManager _srvMgr;
static void Main(string[] args)
{
_cred = null;
_cred = new UserPasswordCredentials("***", "***", "Administrator", "***");
_srvMgr = new WebServiceManager(_cred);
File[] aal = _srvMgr.DocumentService.GetLatestFilesByFolderId(12, false);
File myDrawing = aal.FirstOrDefault(x => x.Name == "Zeichnung_BRE.dwg");
// initialise properties dictionary
Dictionary<PropDef, object> propertiesDict = new Dictionary<PropDef, object>();
PropDefInfo[] propDefInfo = _srvMgr.PropertyService.GetPropertyDefinitionInfosByEntityClassId("FILE", null);
propertiesDict.Add(propDefInfo.FirstOrDefault(x => x.PropDef.DispName == "Initial Created By").PropDef, "test");
// update properties
IExplorerUtil explUtil = ExplorerLoader.LoadExplorerUtil(
_cred.ServerName,
_cred.VaultName,
_srvMgr.SecurityService.SecurityHeader.UserId,
_srvMgr.SecurityService.SecurityHeader.Ticket);
explUtil.UpdateFileProperties(myDrawing, propertiesDict);
Console.WriteLine("Press any key...");
Console.ReadLine();
}
}
}
Some more informationen:
- when running the above code there occurs no exception
- using VS Express 2012 Windows Desktop / Vault Pro 2013 Update 1
- target framework: .NET 4.0
- when trying to update a inventor file via the Vault API there is no problem at all
- problems with property mapping is out of question, because property could be edit via Vault Explorer

