.NET

Reply
Active Contributor
anikakramer2006
Posts: 29
Registered: ‎03-23-2011
Message 1 of 4 (342 Views)
Accepted Solution

AutoCAD Vault-Client - Reference Manager

342 Views, 3 Replies
02-06-2014 05:52 AM

Hi,

 

I have to check if I need to update an external reference in AutoCAD before I check-in into Vault

through the AutoCAD Vault-Client.

 

I know how to access the "normal" properties from an external reference by .NET.

Something like...:

 

static public void start()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                BlockTable table = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
                foreach (ObjectId id in table)
                {
                    BlockTableRecord record = tr.GetObject(id, OpenMode.ForRead) as BlockTableRecord;
                    if (record.IsFromExternalReference)
                    {

                         ....//here I want to get the special properties from Vault like checkedIn, refreshFile etc.

                    }

                 }

             }

       }

 

 

I have to access the Vault states through the Reference Manager in AutoCAD and to update the reference if the red arrows are displayed.

If you don't know what I mean, maybe the attached picture will help.

 

Thanks.

Hi,

 

Please keep in mind that checking in files for CAD applications like AutoCAD using the Vault API is unsupported. (need to use the AutoCAD Vault Plug-In to checkin CAD files)

 

Those Red arrows mean this. (From the Vault Help)

"The local copy of the file does not match the latest version in the vault. Use the Refresh from Vault feature to obtain the latest version of the file".

 

Using the API for Vault 2014 you can get the status Icon. This Blog post describes how this can be done.  

http://justonesandzeros.typepad.com/blog/2013/08/getting-the-status-icon.html

 

I have a Vault 2014 VB standalone exe that uses this approach (EntityStatusImageInfo) to get the "status" of a file. Let me know if you want it.

 

I have not found a way to get the status in Vault 2013 versions. There is a FileStatus property for the file object in the Document Service but in my tests with Vault Pro this is always unknown. 

 

This DevBlog post could be of interest:

http://adndevblog.typepad.com/manufacturing/2013/09/autocad-2014-vault-add-in-connection.html

 

 

Thanks,

Wayne

 

Active Contributor
anikakramer2006
Posts: 29
Registered: ‎03-23-2011
Message 2 of 4 (316 Views)

Re: AutoCAD Vault-Client - Reference Manager

02-06-2014 10:51 PM in reply to: anikakramer2006

To be more precise...

We are working with AutoCAD 2013 and Vault Professional 2013.

I'm using C#, .NET 4.0


After having analyzed the XRef with the MgdDbg - SnoopEntities Tool I'm not sure If

I can get this special Vault Xref-Properties through AutoCAD and the Reference Manager. I have to find out how the

Vault AutoCAD PlugIn and the Vault-Explorer are working together and when this sign with the red arrows appears.

In this case, it seems like Vault and AutoCAD are highly interconnected.

ADN Support Specialist
wayne.brill
Posts: 223
Registered: ‎08-25-2004
Message 3 of 4 (289 Views)

Re: AutoCAD Vault-Client - Reference Manager

02-13-2014 11:31 AM in reply to: anikakramer2006

Hi,

 

Please keep in mind that checking in files for CAD applications like AutoCAD using the Vault API is unsupported. (need to use the AutoCAD Vault Plug-In to checkin CAD files)

 

Those Red arrows mean this. (From the Vault Help)

"The local copy of the file does not match the latest version in the vault. Use the Refresh from Vault feature to obtain the latest version of the file".

 

Using the API for Vault 2014 you can get the status Icon. This Blog post describes how this can be done.  

http://justonesandzeros.typepad.com/blog/2013/08/getting-the-status-icon.html

 

I have a Vault 2014 VB standalone exe that uses this approach (EntityStatusImageInfo) to get the "status" of a file. Let me know if you want it.

 

I have not found a way to get the status in Vault 2013 versions. There is a FileStatus property for the file object in the Document Service but in my tests with Vault Pro this is always unknown. 

 

This DevBlog post could be of interest:

http://adndevblog.typepad.com/manufacturing/2013/09/autocad-2014-vault-add-in-connection.html

 

 

Thanks,

Wayne

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Active Contributor
anikakramer2006
Posts: 29
Registered: ‎03-23-2011
Message 4 of 4 (274 Views)

Re: AutoCAD Vault-Client - Reference Manager

02-13-2014 10:10 PM in reply to: wayne.brill

Hi,

thank you so much! That is good news. We will move to Vault Professional 2014 round about a month. So now I can spent the time to read the blog to get prepared. I think thirst I should try it on my own. If my problem still persists, I'll come back to your offer.

 

Have a nice day,

 

Anika

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.