Open Vault file programatically in viewer

Open Vault file programatically in viewer

Anonymous
Not applicable
1,300 Views
5 Replies
Message 1 of 6

Open Vault file programatically in viewer

Anonymous
Not applicable

I'm not sure if this is the correct section or not but I am looking to see if I can get a little guidance.  Is there a way to create a client application that would open a vault file in Inventor View?  We have a C# .NET application that users are interfacng with to look at database records, and what I am trying to do is allow them to click a button, have my application find any associated drawings in the vault, and open them in Inventor Viewer.

 

I have heard a little about apprentice and I am trying to see what the best approach is for me to get started...I am hoping it is a relatively straightforward proccess once I am more familiar with the API.

0 Likes
1,301 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

 

After much googling and trial / error I couldn't find a solution to my original problem, but I thought of a way to make my problem easier.  I will post what I am going to attempt for the purpose of helping anyone else who has to do this.

 

I am going to use the Vault Mirror utility (link) and modify it to run as a console application that creates and maintains a mirror copy of the vault on a network drive.  Once there, I will use a basic C# file open command to open the files in Inventor View from my application.  

 

System.Diagnostics.Process.Start(@"\\Server\filepath\filename.iam");

 

 

0 Likes
Message 3 of 6

Anonymous
Not applicable

I'm going further down this road and I hit an obstacle that I wanted to run by you guys.

 

My objective in this project is twofold.  

1) Allow for mass updates to iProperties on items in the Vault

2) Allow users to open copies of those files in Inventor View from our custom application.

 

I already have code that updates the iProperties, and I resolved the inventor view problem by creating a mirror as I mentioned before, but a speedbump has shown itself.

 

Basically the iProperty I am updating is displayed as text on the drawings.  I can update the iProperty via the Vault API...but the text on the drawing doesn't update.  When I open the file in Inventor I get those red lightning bolts prompting me to update the sheet.  Once I do all is good, but the whole point of this is to automate changes.  For users that open the file in Inventor View, they don't even have the ability to update the sheet.

 

If I were using iLogic I could just use InventorVb.DocumentUpdate() but I don't know that there is an equivalant in the Vault API (feel free to correct me if I am wrong).  Is there a way to trigger these sheet updates en masse from the vault explorer?  Like a  "Right Click" --> "Refresh Documents" type deal?

 

I am a bit stuck...hoping someone here might have some insight into how I could go about resolving this.

 

EDIT:

 

I am using Vault Workgroup 2016

0 Likes
Message 4 of 6

Markus.Koechl
Autodesk
Autodesk

Hi Anthony, 

your requirement can get solved, but before we invest to do exactly what you try, I'd like to ensure that default available capabilities are evaluated for your purposes:

1) view files from external application: Vault offers as default to mirror DWF/DWFx files to a configurable location. The DWF viewer also offers capabilities to be integrated in Web browser as well as ActiveX control. Why do you need to view native files instead of viewing formats?

2) the integrated jobs to create DWF files exactly deliver, what you are trying - update properties before the viewing file is created. With that your property edit is reflected in the drawing sheet before the DWF is created and published.

Does this make sense?

- Markus

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 5 of 6

Anonymous
Not applicable

mkoe,

 

Interesting... perhaps I am overcomplicating things.  I am an IT person by trade so when the Engineering told me we needed to code a solution I thought they were more familiar with the Vault.

 

Can you elaborate or link to articles that better explain how to leverage jobs to create DWF files?  Right now the drawings are all .idw files.  There isn't a need for them to be that necessarily.  

 

Currently we have an iLogic macro that exports various sheets on the .idw file to different PDF files that other employees can view.  We are trying to allow for mass updates to the vault to correct some old data in our system (thousands of iProperties that are out of date, but we know the correct values in the SQL database of our ERP system), and prevent engineers from having to manually open / republish anything for users to see the updated drawings.

 

If I can mass update the iProperties, and then use a vault utility to update the drawings to DWF files that should be fine as well.  

0 Likes
Message 6 of 6

Markus.Koechl
Autodesk
Autodesk

hi,

with the given overview of the complete task I suggest to steps:

Import the properties you need to update. In case you don't have specific tools you could follow the steps to edit multiple property selections:

http://help.autodesk.com/view/VAULT/2016/ENU/?guid=GUID-6D023A47-E26F-43D7-9F20-032849C3942F 

You even could copy & paste properties that you prepared in an Excel sheet upfront.

As second step you should apply a lifecycle on the IDW files to get updated and published to DWF files. To activate property update and publishing go to the lifecycle used, edit the transition / action and select synchronize properties / update visualization. Follow the instruction published here: http://help.autodesk.com/view/VAULT/2016/ENU/?guid=GUID-B4443A39-A621-4E14-8A11-484EFBF3DB90 

 

Markus



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes