Problem with IExplorerUtil.UpdateFileProperties and AutoCAD...

Problem with IExplorerUtil.UpdateFileProperties and AutoCAD...

Anonymous
Not applicable
1,929 Views
4 Replies
Message 1 of 5

Problem with IExplorerUtil.UpdateFileProperties and AutoCAD...

Anonymous
Not applicable

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:

 

 

problemAPI_ACADM.png

 

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

 

 

0 Likes
1,930 Views
4 Replies
Replies (4)
Message 2 of 5

Daniel.Du
Alumni
Alumni

We have logged a report for this issue to our engineering team [IExplorerUtil.UpdateFileProperties does not update mapped AutoCAD properties]



Daniel Du
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

Anonymous
Not applicable
It doesn't work for bi-directional inventor iProperties either, it seems.

Is there any information on this?
0 Likes
Message 4 of 5

psaarloos
Collaborator
Collaborator
Install the latest update and the latest hotfix on top of that and give it another go. Does that make and difference? We got the problem solved by doing this..

Regards,
Pim
Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
Message 5 of 5

Anonymous
Not applicable

I have the same issue on Vault 2014 Professional SR1 SP2. So it's likely not the updates fixing it.

 

Best regards

Erik

0 Likes