Data Standard – Drawing with same file name as models


In a recent webcast, we’ve received the question on how to disable the number generation within Data Standard for drawings. So, when you place a component in a drawing (IDW, DWG), the drawing shall have the same file name as the inserted model.

There is a switch in the option dialog of the Vault add-in within Inventor, but unfortunately such switch is not evaluated (yet) with the current release od Data Standard 2016. However, Data Standard is highly flexible, so there is a simple workaround.

As the dialog shows up, the function GetNumSchms is called. Such function provides the available numbering schemes. It’s a perfect place for providing just a specific list of numbering schemes for the given file type, or whatever. If this function returns nothing ($null), then the Data Standard dialog uses the file name suggested by Inventor, which is by default the name of the inserted model.

So, just open the default.ps1 file in the folder DataStandard\CAD\addins and go to the GetNumSchms. In such function, we will return $null in case the file has the extension idw or dwg. Like this:

function GetNumSchms
  if($Prop['_FileExt'].Value -eq 'idw' -or $Prop['_FileExt'].Value -eq 'dwg') { return $null }

The next time you’ll save a drawing in Inventor, you will notice that the numbering scheme is disabled and that the file name already reflects the name suggested by Inventor.

That’s it! I hope you enjoy.

Posted in Data Standard | Leave a comment

Ways of integrating Vault with ERP


powerGate is become quite popular and more ERP system are now connected to Vault via powerGate. There are basically three ways for connecting Vault with an ERP system via powerGate:

  • Online via native ERP API (SAP, Navision, proAlpha, myfactory, etc.)
  • Online via database (Sage, etc.)
  • Offline via file transfer (Abas, etc.)

We usually prefer doing online integrations, as the user has immediate feedback whether the transfer did work or not, and there is less need for having data redundant in both systems. However, where an online integration is not possible or nor welcome, the good old fashion file transfer is also OK.

A few weeks ago I’ve wrote about the integration we made with Sage, online via database. Today I’d like to tell you about the integration with ABAS. The usual way to exchange data with ABAS is via XML files. ABAS provides scripts for importing and exporting XML files. Therefore, powerGate will in this case read and write XML from and to a folder.

We wrote a small powerGate plugin which reads and writes XML files from and to an exchange folder. The usual entities are items, BOMs and project data.

As powerGate is a push/pull system, so it reads data from the ERP when needed and writes data into the ERP when necessary, we will cache the XML data into a little database. When a write (create/update) operation from Vault goes to ERP, in this case ABAS, the XML files are immediately written in the according folder, and additionally, the data is also stored into a database. When information from the ERP system are requested by Vault, new XML data from the ERP will be processed into our database, and the data is then read from the database.

The result is a sort of faked “online” integration. We can read ERP data whenever we want, and we can write data whenever is needed. The XML files produced by Vault (on writing) in the according folder can be processed by the ERP system when appropriate. The XML files produced by the ERP are processed whenever a read operation is performed in Vault.

You may argue that even in this way we have a redundancy. Yes, sort of, but it’s in an interim database which we can access and change whenever we like. If all the information would be stored in Vault, then updating ERP information would become more complex, as files or items could be released, checked out, and so on. By having the ERP data in a separate database, the update of the ERP information can happen right away, independently from the permission situation in Vault.

In our case, we use SQLite for the database. It has the advantage that no backend is needed. The SQLite database is just a bunch of files in a folder, so it’s super easy to setup and maintain, and it’s still fast enough and the size limit is at 35 TB. There are several editors that allows reading and editing data with SQLite, so in case there is a need to check or clean up the database, it’s straight forward. One editor, our preferred, is LINQPad.

There are surely other ways of doing such integration. For instance, by using a full SQL Server, or relinquish the SQL database at all. If you have other preferences, feel free to implement powerGate in other ways. This is the beauty of powerGate. You can write your own server plugin and expose the needed services to Vault for further consumption.

Posted in powerGate | Leave a comment

Data Standard – Dynamic Properties


Data Standard 2016 introduces the “dynamic properties”. A brilliant feature that allows you to use Data Standard right away with less need for customization. If you have assigned Vault properties to a category, then the Data Standard dialog will show those properties as you select the according category. In this way, you can achieve quite flexibility in the dialog without the need to configure or customize the dialog.

In the case of Vault, all the properties assigned to a category shows up when you select such category. In case of CAD just those properties will show up, which are mapped to the according CAD file. This is because only those properties can effectively sync the value back to Vault.

Dynamic properties is really dynamic. You can configure in which order the properties shall be displayed, and whether some properties shall be hidden from the dialog. This can be accomplished via the VaultDynamicProperties.xml file in the Vault\Configuration or InventorDynamicProperties.xml CAD\Configuration folder.

Such file is generated while you work with Data Standard. So, after the installation of Data Standard the file is not there. Start creating files, folders and other objects, and you will see the files being created and grow while you select different categories. Such file can be edited with any editor, such as the XML Notepad. By changing the order of the properties in such file, the order of the properties in the Data Standard dialog will change too. If you add an attribute Hidden=”True” to a property, such property will not be displayed in the dialog.

<DynamicPropertiesCategory Category="Engineering" Type="File">
<DynamicProperty Hidden="True">Manager</DynamicProperty>
<DynamicProperty>Engr Approved By</DynamicProperty>
<DynamicProperty>Stock Number</DynamicProperty>

Another thing you will notice with dynamic properties, is the red border of some properties, in case those are not compliant. If for instance a property in Vault is set to be obligatory, a red border will show up on that property. The tooltip tells the user what is missing. The rules on the properties can be applied on the Vault property it self, or on the association with the category. Therefore the property can have different behaviours based on which category the property is assigned to.

In order to show the red border and bring the tooltip, the binding mechanism between the property and the control on the dialog has been improved. A new binding method has been introduced, called WPF:ValidatedBinding. Instead of using {Binding …}, by using {WPF:ValidatedBinding …} the control can get this new graphical behaviour. The ValidatedBinding also takes care about the activation of the OK button. So, instead of showing some red * in front of the control and then catch in the code wether the entry is correct or not, by using the ValidateBinding, all happens automatically based on the Vault property settings.

Try it with the Title. Replace the Binding with WPF:ValidatedBinding on the title control, and you will see the difference.

<TextBox Text="{WPF:ValidatedBinding Prop[_XLTN_TITLE].Value, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="10" />

Of course, in case you still need even more flexibility, you still can create you own control mechanism, but I guess that for the most cases, this new Binding will do the job, and so reduce the need for coding.

It’s important to use Update 2 (or newer) of Data Standard, as important improvements have been made with such update.

Enjoy Data Standard and dynamic properties.

Posted in Data Standard | Leave a comment

VDS 2016 Quick Reference


A few months ago we published the Data Standard Quick Reference for 2015 R2, which had quite a success. Now you can download the updated version for 2016 from here…

With 2016 you’ll find a new way to bind your controls with CAD file properties or Vault properties and automatically validate the fields. In case a field is configured as obligatory and it’s still empty, a red corner will adorn the control and the OK button will be disabled. You just have to use WPF:ValidatedBinding instead of Binding, like this

<!-- before -->
<TextBox Text="{Binding Prop[TITLE].Value …/>
<!-- now -->
<TextBox Text="{WPF:ValidatedBinding Prop[TITLE].Value …/>

Additionally a new property _GeneratedNumber has been introduced on the Vault side. This property is set as soon a number is generated via the number generator. In the function GetNewFileName, the new file name is set based either on the entered file name in case no numbering scheme is active, or based on the selected numbering scheme. The Property _GeneratedNumber tells you which number has been generated.

Have fun with Data Standard and the new Quick Reference.

Posted in Data Standard | Leave a comment

Data Standard logic flow


Many of you asked me wether there is a logical flow behind the Data Standard dialog and how does it look like. The answer is yes, there is a logical flow, and in this document I’ve tried to visualise and describe the flow for the creation of a new file in Vault.

Basically the new file and new folder dialogs starts by a menu item. Such menu item is configured in the mymenu.mnu. Each menu item points to a PS1 file. In case of the creation it’s the CreateFile.ps1. In such file there is point where the file or folder dialog is opened (.Execute()). Now the PowerShell files from the addimVault folder come to play. In the default.ps1 you’ll find the InitializeWindow function, which is called at the time the dialog shows up. Such function is perfect for setting default values, activate or deactivate controls, or subscribe for change events. Once all is set, the ActivateOKButton function is called over and over again, every time something changes in the dialog, and he return value enables/disables the OK button. As the dialog closes, the rest of the CreateFile.ps1 is executed, and here you may apply some custom logic for creating links and the like.

In the PDF you’ll get a brief graphical flow and some more details. I hope that this document helps you understanding the sequence of Data Standard calling functions.


Posted in Data Standard | Leave a comment

powerGate with SAGE


powerGate is meanwhile quite popular when it comes to connecting Vault with SAP, but what about other ERP systems? The powerGate server can be extended with plugins that allows to connect to potential any ERP system. Since the introduction of powerGate, we had the pleasure working with you on several projects, and today I’d like to give you some insight about the integration with KHK SAGE.

In the context of this project, we had the luxury to connect to the SAGE database. Actually, some special SQL views has been provided in order to read data from SAGE. This is a quite convenient approach, as SQL is known by almost everyone, while dealing with the API of an unknown system is of course more time consuming.

So, we’ve created a little powerGate plugin, via the standard and open .Net interface, that connects to the SAGE SQL views and exposes the data via REST/OData to the powerGate client. This took just a few hours of work, and then we were able to test the connection via Google Chrome. In the browser you can read, create, update data just via simple URLs and according arguments. This is grate, as you can immediately check the correct function without completing the integration in the first place. The next step was to start a PowerShell environment, such as PowerGUI or the Windows PowerShell ISE, and with the simple powerGate command-lets, such as Get-ERPObject, Add-ERPObject and Update-ERPObject, test the connectivity.

Add-ERPObject -Entity "SAGE.Services.Material" -Properties @{"Number"="4711";"Title"="test item"}
Get-ERPObject -Entity "SAGE.Services.Material" -Key @{"Number"="4711"}
Update-ERPObject -Entity "SAGE.Services.Material" -Properties @{"Number"="4711";"Title"="Flywheel 15/3"}

Now that the client was talking to the server and the data came through, we started to use the command-lets within the Data Standard dialogs in order to show item data, pick project and related information, access project items, and the like.

As you know, the Vault Data Standard dialogs has PowerShell as scripting language on the backend side. The powerGate client exposes the command-lets described before as native PowerShell commands, which can be easily consumed within the Data Standard dialogs. The dialogs can therefore show ERP data in a tab, or allow the user to enter a project number, look up for it and the pull the data over to Vault, or display the active projects in a list, and so on. It is also possible to create custom actions, such as context menus or place buttons in dialogs or tabs that communicates with the ERP system and updates data in Vault. As powerJobs is also based on PowerShell scripts, it’s possible to sync or transfer data at lifecycle change, such as updating items, transfer the BOM or any other information. The possibilities are endless.

The users now can easily link Vault projects, files and items to SAGE elements and so complete the Vault data with SAGE information, without leaving his familiar environment.

If you want to know more about powerGate, just get in touch with us.


Posted in Data Standard, powerGate | 1 Comment

Editing Data Standard 2016 files with Visual Studio


Since Data Standard 2014, a lot has been improved. The numbering, dynamic property, replace with copy, etc. With the new feature, new controls came in the dialog, which refers to DLLs. Such DLLs are needed in order to interpret the dialogs. So, if you open a Data Standard XAML file with Visual Studio, the designer will only be able to render the dialog if all DLLs are referenced. As recently this question come up several times, I thought it would be good to give you a summary.

These are the DLLs that you’ll need in Visual Studio in order to properly edit a Data Standard XAML file.

  • C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\CreateObject.dll
  • C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\Common.dll
  • C:\ProgramData\Autodesk\Inventor 2016\Addins\Data Standard\dataStandard.UI.dll
  • C:\Program Files\Autodesk\Vault Professional 2016\Explorer\Autodesk.Connectivity.WebServices.dll

Some of these DLLs are needed for the File.XAML, some for the Inventor.XAML and other for the tabs. However, as you probably will edit all of them eventually, just add them to your Visual Studio project and start editing.

Especially for the File.XML you will still see that the numbering scheme control throws an exception saying “Cannot create an instance of “DSNumSchemeCtrl”. Don’t worry about this. Visual Studio tries to instantiate such object and files. However, the dialog is visible and you can edit the XAML file.


So, in order to edit the Data Standard files, you will have to follow these steps:

  1. Create a new project in Visual Studio of type “WPF Application”. Preferable of type “Visual C#”
  2. name it “VDS”, or however you prefer
  3. Visual Studio will immediately open two files (MainWindow.XML and MainWindow.xaml.cs). Close both files, as we don’t need them.
  4. In the Solution Explorer (usually on the right) go the References and add the DLLs mentioned above
  5. In the “Solution Explorer” right click on the project and select “Add > Existing Item…” or just use the shortcut [SHIFT]+[ALT]+A
  6. Navigate to the Data Standard folder C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\ and either from the Vault\Configuration or CAD\Configuration select the XAML files you like to edit. ATTENTION!! Add the file as a link by selecting “Add as link”
  7. In the Solution Explorer double click on the XAML file you like to edit
  8. done!

I hope this little description will help you getting started with editing Data Standard dialogs.

Posted in Data Standard | Leave a comment