Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Customize the "Add Files" Dialog Window

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
DesignEng
918 Views, 8 Replies

Customize the "Add Files" Dialog Window

I would like to modify the "Add Files" dialog window in Vault.

 

I am using Data Standard and users can select the "Add Standard File". They are required to complete a few text boxes that assign document properties and classifications. I want to do the same for the "Add Files" dialog window. The goal is prevent any document from being added to Vault without the few required properties / classifications entered or selected.

 

'Where do I find the "Add Files" file?

8 REPLIES 8
Message 2 of 9
marco.mirandola
in reply to: DesignEng

In Data Standard, as for now, only Add Standard File and Add Standard Folder are supported. If you like to create an Add Standard Files, you can. In order to achieve that, you have to:

  1. configure a new menu item
  2. create an according powershell script
  3. use either the existing XAML or create a new one with specific properties

The script would basically ask the user to either select a folder or a list of files. As you have the list of files, the question is would you like to have just one Data Standard dialog appear, and the data you enter shall be applied to each file, or do you like to have a dialog per file, so that the user can change the values for each file, or you may want to have a dialog per group of files? So in case you selected 3 Doc, 4 XLS and 2 PDFs, you may want to have just 3 dialogs, one per type?

All this is feasible. Few years ago we also made a custom import for CAD files as well, where we also handled the references. So, the possibilities are endless.

 

As mentioned, there is no standard functionality for Add Files as for now, however, it's achievable with relatively low effort. It's just important that you have clear in mind how the user experience shall be.

 

i hope this helps

ciao

marco

 

coolOrange
www.coolorange.com
Message 3 of 9
DesignEng
in reply to: marco.mirandola

marco,

 

Thank you for your reply. I am trying to make it so the users cannot bypass the Data Standard by using the "Add Files..." selection.

 

Is there any way to turn it off so they don't have access to it?

 

I am very interested in creating my own add standard files dialog that you described. I would want it to be able to add properties for each individual file even when multiple files are selected (one at a time). Where do I create a new menu item and where do i find the "existing XAML" to make a browse button?

 

Thank you so much for your help!

 

-Don

Message 4 of 9
marco.mirandola
in reply to: DesignEng

Hi Don, disabling or replacing an existing menu item is something you could do via the regular Vault API, but is not supported yet with Data Standard. So, in order to disable the Add files... you would have to create a little .Net DLL (Vault Extension) and there just disable the menu item.

 

in order to create your own menu item, you have to edit the mymenu.mnu file in the DataStandard\Vault folder. There is a bit of description in that file, but basically you need 2 things:

- define your menu item, which points to your powershell script and XAML file

- add your menu item to a menu site, such as the context menu, the toolbar, or any other location you like to place your command

 

to make it simple, look for the section "item newfile". You will notice a series of properties. You can just copy&past the complete section and rename it to "item addFiles". In that section, you will notice several properties like Description, Hint, Label, which contains just the text to be displayed on the Vault interface. then you'll find the property ID, which is a simple string and must be unique, so different from all others. You may set it like this Id="coolOrangeAddFiles". The PSFile property points to the powershell file that should be executed when the user hits the menu item. the other properties are self explanatory.

Have a look into the file, you will notice is not that complicated.

 

once you have set your menu item, you have to define where in the Vault user interface, the menu item shall show up.

Junp at the end of the file. You will find a section called "site folderContext". here you can add all the menu items that will show up in the context menu of a folder. You'll notice the property called MenuItems=[$newFile, $newFolder, $editFolder];

Just add you newly created menu item like this MenuItems=[$newFile, $newFolder, $editFolder,$addFiles];

 

Restart Vault you will have a new menu item. Now, of course you have to write some code in the powershell script file you defined in the menu item.

 

the PowerShell script files for the menu items are under DataStandard\Vault\addinVault\Menus, while the XAML files are under DataStandard\Vault\Configuration

 

have a look into the CreateFile.ps1. Something similar will have to be written for the AddFiles.

 

I hope this helps you a bit further.

 

ciao

marco

 

coolOrange
www.coolorange.com
Message 5 of 9
DesignEng
in reply to: marco.mirandola

Thank you for this information.

 

-Don

Message 6 of 9
DesignEng
in reply to: DesignEng

I was able to add a new line to the menu. Where can I find an example dialog window script that includes a browse button to add a new file?

 

Thanks again!

-Don

Message 7 of 9
DesignEng
in reply to: DesignEng

Unfortunitly, your description explaining what to do exceeds my computer abilities. I do appreciate you trying to help but I have never created a Net.DLL file and would not know where to put the file in the "API". I was able to add a line to the context menu but do not know how to create the new dialog window that would have a "browse to add files" button.

 

I am very disappointed Autodesk provides Data Standard and doesn't explain that you need to be a programer to use it. It seems to me that it requires a developer to make it work. Autodesk claims you can do so much with Data Standard but doesn't mention that you have to have programming skills and know several computer programming languages to use it. 

 

If the idea is to use Data Standard to control the standardize entry of file and folder properties, then why doesn't Data Standard shut off the default "Add Files..." menu and replace it with an "Add Standard Files...." dialog window? The default Data Standard should include:

 

  • Browse to Add Standard File... (this would allow custom properties to the file that is being added from outside Data Standard)
  • Create Standard File...
  • Create Standard Folder...

It should also include tools to allow the average user to actually use and customize it.

Message 8 of 9
marco.mirandola
in reply to: DesignEng

Hi Don, I understand your point. Well, it's true that with Data Standard and/or the Vault API you can do a LOT! While the Vault API requires deep development skills, Data Standard lowers the bar. Simple things, such as adding fields configuring the UI and also add some simple behaviors, can be done very easily. More complex thing can be done with according knowledge and skills, and very complex things are better done with .Net in Visual Studio and maybe just use Data Standard as a container. 

Your requirement around "Add files..." make sense, but as we already did something similar for other customers, i can quarantee you that this is not simple, as the function is generic and has to deal with all different file types with according pecualiarities.

 

Anyway, there are several videos, docu, and other materials that can help you get deeper with Data Standard, and there is a session "Data Standard introduction" (https://events.au.autodesk.com/connect/sessionDetail.ww?SESSION_ID=6274). So, if you are in Las Vegas, we may meet there and talk about Data Standard.

 

ciao

marco

 

coolOrange
www.coolorange.com
Message 9 of 9
DesignEng
in reply to: marco.mirandola

marco,

 

Don't get me wrong. I aapreciate your help and I am very interested in using Data Standard. It is exactly what I was looking for, I want to control the properties for every file that is added to the Vault. I do not want anyway for users to bypass this system and I want it to be fast and user friendly. I think it is great that Data Standard can be customized to our particular companies needs. I will work with my Systems Department to see if, with your help, we can get Data Standard up and running the way we need it to.

 

Thanks again so much for your help,

-Don

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

Post to forums  

Autodesk Design & Make Report