VDS custom numbering


With Data Standard 2015 the number generation has been integrated within the VDS dialog. That is great! So, just configure the numbering schemes and you can use them right away in the VDS dialog. In case you like to offer just some numbering schemes for certain file type or category, you can just customize the GetNumSchms in the Default.ps1 in order to filter the numbering schemes according to your needs.

But in the case you need something more custom, you can go even beyond. In this post I’d like to show you how you can manage a more complex numbering scheme. We will have a number made of several components, where the values comes from properties of the VDS dialog. Additionally, we want to either generate the number for the combination of properties, or generate a new sheet for the given number.

In the standard dialog you have the list of numbering schemes, the preview for the selected numbering scheme, which also allows you to enter the data to generate the number, and the file name text-box. The numbering scheme preview control provides the ability to capture the users input, but in our case we like to have independent properties on the dialog for this.

Therefore, we will remove the selection of the numbering scheme, the preview and also the file name text-box and handle the number generation completely our self. The resulting dialog looks like this:


Now that all the controls are removed, when a new file is created, no number is generated at all. We will generate the number when the user hits the OK button. The appropriate function ist the OnPostCloseDialog. Here we can set the property DocNumber to our value. In order to do this, we will call the Vault number generator with our custom arguments and so generate a number the way we want.

Now, in our example the number looks like this: [Site]-[Discipline]-[Area]-xxxx-yy, where xxxx is the number and yy is the sheet number. So, a number could be IT-SK-01-1234-01. We will either generate the number (with sheet 01), or increase the sheet number on file copy.

For getting this working we need two numbering schemes, one for generating the number with sheet 01 and one for generating incremental sheets. Here are my two numbering scheme definitions.

2016-04-08_10-19-46 2016-04-08_09-51-11

Then we also need some properties where the user can select the values. In my case with Inventor, i just added further properties to the Inventor.cfg file. Such properties does not necessarily exist in Vault, unless you want this behavior also in Vault. This is how my Inventor.cfg looks like:

<PropertyDefinition PropertyName="Site" DataType="Text" />
<PropertyDefinition PropertyName="Discipline" DataType="Text" />
<PropertyDefinition PropertyName="Area" DataType="Text" />
<PropertyDefinition PropertyName="Dwg No" DataType="Text" />
<PropertyDefinition PropertyName="Sheet" DataType="Text" />
<PropertyDefinition PropertyName="NewSheet" DataType="Boolean" />

In the XAML dialog I’ve removed/commented the numbering scheme selection and the numbering scheme preview.


Instead of the file name text-box, I’ve added the 3 comboboxes for the Site, Discipline and Area, and also a check box which tells me wether just the sheet number should be increased.

<Label Content="{Binding UIString[LBL6], FallbackValue=File Name}" Grid.Row="14" Grid.Column="0" />
<!--<TextBox Grid.Row="14" Grid.Column="1" x:Name="FILENAME" Style="{StaticResource FileNameStyle}" Margin="0,2" />-->
<StackPanel Grid.Row="14" Grid.Column="1" Orientation="Horizontal">
   <ComboBox Text="{Binding Prop[Site].Value}">
      <ComboBoxItem Content="IT"/>
      <ComboBoxItem Content="UK"/>
      <ComboBoxItem Content="DE"/>
   <ComboBox Text="{Binding Prop[Discipline].Value}">
      <ComboBoxItem Content="SK"/>
      <ComboBoxItem Content="XR"/>
   <ComboBox Text="{Binding Prop[Area].Value}">
     <ComboBoxItem Content="01" />
     <ComboBoxItem Content="02" />
   <Label Content="####"/>
   <Label Content="##"/>
   <CheckBox Content="new sheet" VerticalAlignment="Center" IsChecked="{Binding Prop[NewSheet].Value}" Margin="20,0,0,0"/>

Now we need a function that will do the work. I’ve created this function, which could be placed in a custom PS1 file (recommended) or for testing purpose in the default.ps1 (not recommended)

function GenerateNumber
  $numSchems = $vault.DocumentService.GetNumberingSchemesByType('Activated')
  $DrawingSchm = $numSchems | Where-Object { $_.Name -eq "DrawingNo" }
  $SheetSchm = $numSchems | Where-Object { $_.Name -eq "SheetNo" }
  $prefix = $Prop["Site"].Value +"-"+ $Prop["Discipline"].Value +"-"+ $Prop["Area"].Value
    $prefix += "-"+ $Prop["Dwg No"].Value
    $newNumber = $vault.DocumentService.GenerateFileNumber($SheetSchm.SchmID, @($prefix))
    $Prop["Sheet"].Value = $newNumber.Substring($prefix.Length+1)
    $newNumber = $vault.DocumentService.GenerateFileNumber($DrawingSchm.SchmID, @($prefix))
    $Prop["Dwg No"].Value = $newNumber.Substring($prefix.Length+1,4)
  $Prop["DocNumber"].Value = $newNumber

In the OnPostCloseDialog i then call the GenerateNumber function, like this:

function OnPostCloseDialog
  $mWindowName = $dsWindow.Name

When you restart Inventor, you should be able to see the result. Create a new file and save it. The number should be generated with sheet 01. Make a copy via the Data Standard Ribbon and check the „new sheet“ checkbox, and the number remains the same, but the sheet number gets incremented.

In summary, we removed/replaced the VDS numbering with a custom numbering generation. Here we can feed the number generator with properties from the dialog and have all the freedom.

I hope you enjoy!

Posted in Data Standard | 1 Comment

Beta 2017 available!


Hurrah! The beta versions of coolOrange products are available for Autodesk’s products 2017. You can download the beta versions from here http://www.coolorange.com/en/beta.php

The biggest change with 2017 is that now all our products are backward compatible. In order words, the current version 2017, actually just 17, can work with Vault/Inventor 2017, 2016 and 2015. Obviously you will have an according setup for each Vault version, but the feature, capabilities and behavior will be the same across all the versions.

Let’s take powerJobs as an example. You can install the new version 17 on a Vault 2015, 2016 or 2017 version with the according setup. The jobs that you will make with powerJobs version 17 will run with each Vault version. This way, you can focus on the most current release, benefit from all the new cool stuff, and still use it for older Vault versions. Or you can create a job for an older version of Vault and once you update, the jobs still work with the new version of Vault.

Another example is dataLoader. Over the several versions of dataLoader, the capabilities have been improved. Now, you can use dataLoader 17 with all the latest features also for Vault 2015, 2016 and 2017.

With this change, we now have one consistent wiki where all the latest features will be described, and you don’t have to think which version offers which feature. By using the latest version, you benefit from all the features, regardless which version of Vault you are using.

Also, we will continue adding new cool features to our products, and those will be immediately available for the supported Vault versions.

Give a look to the beta versions, and if you have comments, feedback or questions, feel free to reach out to out support.

Posted in Uncategorized | 1 Comment

Check for unique part number

The first time we wrote about Vault and PowerShell was back in 2012. Since then a lot happened. Meanwhile is PowerShell widely used either inside Vault Data Standard, powerJobs and powerGate, or as stand alone scripting language for Vault in combination with powerVault.

We recently received an interesting question about how to find duplicate part numbers inside Vault. You need to write few lines of code, and before creating a full blown application, why not creating a little script that prints out the duplicate part numbers in a CSV file that can be opened with Excel? And here it is:

Open-VaultConnection -Server "localhost" -Vault "vault" -User "Administrator" -Password ""
$srchConds = New-Object Autodesk.Connectivity.WebServices.SrchCond[] 1
$srchConds[0] = New-Object Autodesk.Connectivity.WebServices.SrchCond

$counter = 0
$bookmark = ""
$partNumbers = @{}
$searchStatus = New-Object Autodesk.Connectivity.WebServices.SrchStatus
do {
  $result = $vault.DocumentService.FindFilesBySearchConditions($srchConds, $null, $null, $true, $true, [ref]$bookmark, [ref]$searchStatus)
  $fileIds = $result | Select-Object -ExpandProperty Id
  $props = $vault.PropertyService.GetProperties("FILE",$fileIds,@(88))
  foreach ($prop in $props) { if($prop.Val -ne $null -and $prop.Val -ne "") {$partNumbers[$prop.Val]++ } }
  $counter += $result.Count
  Write-Progress -Activity "searching..." -CurrentOperation "$counter/$($searchStatus.TotalHits) found" -PercentComplete ($counter/$searchStatus.TotalHits*100)
} while ($counter -lt $searchStatus.TotalHits)

$partNumbers.GetEnumerator() | Where-Object { $_.Value -gt 1 } | Export-Csv c:\temp\notUniquePartNumbers.csv -Delimiter ';'

The script uses powerVault for connecting to Vault. Then we use the native API, as in this case speed is key. powerVault would make the coding simpler, but in order to make it simpler, it also loads more information as requested for this case. Usually you don’t care, as you deal just with few records, but in this case, we go over the complete Vault, which might contain hundreds of thousands of files.

So, via the search (FindFilesBySearchConditions) we collect all the files. Now, the search requires search criteria. In our case we look for files that have a Part Number which is not empty. Now, the Vault API requires the property ID for the part number, which is 88, and other search criteria. In order to quickly find out what I need, I just opened the Vault search and configured it as needed and before I’ve started the search, I’ve also opened the vapiTrace.


Now I can start the search and look how Vault executes the search on an API level. The vapiTrace gives me all the information I need.


Obviously I can use the Vault API in order to figure out the property ID and so on, but as I don’t have much time and don’t pretend to win the Oscar for the best code, I just write down those lines I need and hard code the IDs for this particular situation.

As you can see in the PowerShell code, the search is executed inside a loop. The reason is that the search just gives us a set of records, usually 100. So, we need to execute the search several times until we have all the files. The $bookmark variable is empty the first time and is then filled by the search to an according value. By re-executing the search with the given bookmark, we get the next set of records. For each results, we ask for the part number property for the given files and populate a hash table ($partNumbers) where the key is the part number and the value is the frequency. So, if the part number shows up several time, the according value in the array gets incremented. At the end we look for all entries in the $partNumbers array with a value (frequency) higher then 1. Those are then exported to a CSV file that you can open with Excel.

To me, this is a beautiful example how scripting can quickly solve a problem.

Posted in PowerShell, powerVault, Vault API | 1 Comment

Vault – Navision integration

Dynamics-NAV-LogoThe range of ERP systems supported by powerGate grows steadily. We recently made several Microsoft Dynamics Nav (Navision) integrations. From an integration point of view, Navision is a quite cool system. It provides access via web services and REST/OData. Although powerGate works natively with REST/OData, we decided to integrate via web services, as it give us a bit more freedom in consuming the API the way we need.

So, the first step was creating a powerGate Server plugin for Navision. We basically created powerGate services for items and BOMs. Obviously more objects can be consumed and exposed. The Navision API is well documented, but obviously there are some internal system requirements that needs to be known and we had to figure it out. For instance, in order to consume an item inside a BOM, the base quantity of the item must be set. Or in order to create a BOM, you must first create the BOM header with the right amount of empty BOM rows, which will be filled with a key, and then update again the BOM rows. In other words, while the API looks simple, there are some peculiarities that needs to be figured out.

Anyway, the response time of the Navision is amazing. Loading item and BOM data takes a fraction of a second. So, when the user now goes into Vault, clicks on a file or an item with an appropriate part or item number and activates the ERP tab, he immediately can see all the Navision information right from within Vault. He also can update the data, or create new items. Also the BOM transfer is amazingly fast. The check if all needed items are present goes through quite fast, and also the check and compare of BOMs. Making the integration to Navision was quite of fun and also seeing it working life!

Navision comes with several tools, and one of it is the Administration window. Here you can enable Navision to be accessible via web services and REST API.


Once you enabled the connectivity, you can expose the Navision objects via the Navision user interface. Just search for “web services” in the search box at the top right corner and go the “Web Service” area. Here you can create new services just by selecting page as object type, select the object you like to expose and give a name. Once you enable the checkbox “Published”, you will see the URLs for the web services and the REST/OData service.


If you like to test the services, just open the URL in your browser. Google Chrome gives you the best viewing rest and has further cool extensions to play with the services, such as the Chrome JSON formatter (for formatting JSON results) and the PostMan for testing the services.


Now, that the services are running, they can be consumed in an according powerGate Server plugin and then used in the Vault Data Standard dialogs. So, if you have a Navision in your company, then don’t wait any longer to connect it to Vault!!

Posted in powerGate | Leave a comment

Merry Christmas


WOW, what a great year! I hope you feel the same. We had the pleasure working with you: thanks to your feedback the products improved, made successful and interesting projects together, hosted and participated to great events. One of the last event was the AU in Las Vegas (the picture was taken ad the Las Vegas airport :-), where I had the pleasure being on stage with Jim Quanci at the AND conference talking about the app-store experience, hold two highly rated (4.6 and 4.9 to of 5 points) sessions on Data Standard (thanks for the positive feedback!), and had the pleasure to co-speak with Kevin Robinson on his session about Vault-ERP integrations. The recordings of the sessions are available on the AU page, and here the links for the Vault Data Standard Introduction and Vault Data Standard Advanced.

In the past 12 months we managed to release great 2016 versions of our products, and quite proudly a new version of powerGate, which is revolutionizing the way how Vault-ERP integrations are done. Over the past months, together with you, we made integrations to SAP Netweaver, Business One, Microsoft Dynamics Navision, Sage, Abas, and more. The real cool thing is that we see this technology applied by the resellers with just little help from our side. So, our goal to make ERP integration simple and affordable comes close.

A brand new version of powerJobs has been recently released. Unfortunately, we did not had the time to emphasize this new version on the website and blog, and we will do in the new year. However, the new powerJobs is backward compatible, so it’s the same version whether you have Vault 2014, 15 or 16, and all the jobs are compatible too. The way to export other formats is even simpler, and we are sure this version will help you making great things in a simple way.

powerVault, the PowerShell extension for the Vault API, became more capable and now offers simple functions for dealing with items, and more command-lets will come in the next year. With powerVault we want to put you in the condition to extend Vault in a simple, smart and compatible way.

The Inventor apps has been updated and improved, and the success of the threadModeler remains unmatched with a lot of positive ratings, thanks for that! We release the new Inventor app mightyBrowser, which is having a great success and delights many Inventor users already. Check it out!

The most important thing was the conversation with you. Learning for your situations and thinking how we can help to make your business simpler, more attractive and more effective. We attended several Autodesk events, such as the local AUs and other surrounding events, hold several Data Standard trainings, visited your offices, made over 100 webcasts, had countless hours of phone calls with you and kilometres of email exchange. All this in order to learn, help, deliver and shape your and our businesses.

Thanks to all your commitment and trust. We wish you a very Merry Christmas and a happy New Year! We will be back for you with new cool ideas and products by January 11th.

Posted in Uncategorized | Leave a comment

powerVault – enhanced


Hi scripting guys! A new version of powerVault is ready for download!!

With every version of powerVault, we come our mission a step closer. Provide you a simple Vault API that can be used inside our products, Data Standard and stand alone, in order to enable you creating cool customizations with low effort and compatible across supported Vault versions.

With this version of powerVault we added more features to the item side. So, now it’s possible to get all the inks and attachments between an item and file. The new Get-VaultItemAssociations allows you to get the primary, secondary, tertiary links and also the attachments. If you pass just the item number, you’ll get all the links and attachments. If you just want specific links, then use the according options, such as –Attachments, –Primary, etc,

In case you like to add attachments to an item, the Update-VaultItem has been enhanced for this purpose and provides according options. The Update-VaultItem also supports changing the item number.

Additionally, the new Save-VaultFile command-let has been introduced. So far you have been able to download a complete assembly with Get-VaultFile –DownloadPath. The command-let still downloads the file with all dependencies. However, if you like to better control what shall be downloaded, then the new Save-VaultFile gives you all the options you need. You can exclude the children and so just download the file it self. This is helpful in case where you just want the drawing without the model (fast-open). Or you want also to download the parents (-IncludeParents), or include the attachments, and more. This command-let really makes you download the file(s) the way you want.

powerVault is used in powerJobs, powerGate and many of you use this as stand alone or in combination with Data Standard. We like to improve powerVault on a regular base and like to prioritize the enhancements based on the market needs. So, in case you are missing command-lets or options, just reach out to us. Either leave a comment on this post, or send us an email to our support in order to start a conversation.

Posted in powerVault | 1 Comment

mightyBrowser – personalize your Inventor browser


Last week, we release a new app for Inventor: mightyBrowser. It updates the Inventor browser names, reflecting those iProperties that matters to you. Now you can finally recognize the components in your browser by the information that mean something to you!

Let’s say you like to see in the Inventor browser the title and the part number. With mightyBrowser you configure which iProperties shall be used in order to form the text that will be displayed in the browser. You can combine as many properties you like and mix them with plain text, such as separators and the like.

mightyBrowser works for both, Inventor stand alone and in combination with Vault. Just configure which iProperties shall be displayed, and you are good to go. In the standard, the title and the part number is configured. But feel free to configure it as you think is appropriate.


Once installed and configured, you will have to update the browser names manually. This is deliberately, as we don’t want to change your environment. However, if you like the outcome, you can configure the browser name update to be performed automatically on open and/or save. You can also configure whether in an assembly just the first level of the tree shall be updated or all levels. At any time, you can reset the browser to the original names.

There are some Inventor file types that are ignored by the mightyBrowser, such as functional documents and standard parts. Also the top display name of iFactories will not be changed, as this has an impact on the iMembers, so mightyBrowser does not touch this.

In the configuration file, you can find all the settings. Just have a look to the wiki. In case you like to see mightyBrowser in action, check out this video.


We hope you enjoy this new app!

Posted in Inventor | 1 Comment