.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD Vault-Client - Reference Manager

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
anikakramer2006
1174 Views, 3 Replies

AutoCAD Vault-Client - Reference Manager

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.

3 REPLIES 3
Message 2 of 4

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.

Message 3 of 4

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

Message 4 of 4

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost