Monday, August 18, 2014

Autodesk Vault Programmer's Cookbook. 4.3. Adding users

You can add user by calling AddUser method.
Hereinafter Vault2014PowerConsole will be used to illustrate usage of methods.

"Autodesk Vault Extreme Administrating" training

Class Description

This class surveys approaches, technologies and tools that would be helpful for reliable Vault administration and management.
We will overview different ways to comprehensively minimize risks and optimize resources in planning, installing, managing, maintaining, migrating, securing, updating and upgrading your Vault system.
We'll show you bunch of tools and teach how to adapt them to cover your needs.

Class Length
4 Days

Learning Objectives
  • Recognize and prevent risks in Vault for which you are responsible
  • Comprehensively improve Vault reliability
  • Make fast deployments of new Vault systems, organize interaction with different CAD systems and PLM 360
  • Collect, configure and manage tools for handy Vault administration
Target audience
  • System integrators
  • System Administrators
  • IT
Fall/Winter 2014-2015

Most convenient for better part of attendees in next regions:
  • Americas
  • Asia
  • Europe
  • Oceania

Event registration

"Autodesk Vault Advanced Programming" training

Class Description

This class teaches you Autodesk Vault API essentials and provides you low start for programming under Vault.
We will create various client applications to interact with Autodesk Vault Server. Programs will be written on PowerShell - as easy-to-start, quick response, succinct and clear .NET environment for learning and administration objectives. We will also touch on some best practices, workflows, workarounds, tips and tricks in Vault management and administration.
Basics of interaction with different CAD systems and cloud services will be covered too.
We'll show you actual projects where Autodesk Vault API has been used, share the collection of PowerShell source code and learn how to utilize it properly. And show you how to translate it to other programming languages to create versatile plug-ins and stand-alone applications.

Class Length
4 Days

Learning Objectives
  • Clearly understand the concepts of Autodesk Vault API framework
  • To use PowerShell language for Vault server interaction and to solve tasks of IT administrator and system integrator with it
  • Develop applications to cover own needs in Vault management, interaction with different CAD systems and PLM 360
  • Easy create UI and automate frequent tasks of Vault Administration and management
Target audience
  • Programmers
  • System Administrators
  • IT
Fall/Winter 2014-2015

Most convenient for better part of attendees in next regions:
  • Americas
  • Asia
  • Europe
  • Oceania

Event registration

Friday, August 15, 2014

Autodesk Vault Programmer's Cookbook. 4.2. Getting more user information

To get information about users' permission and roles use next methods:
Hereinafter Vault2014PowerConsole will be used to illustrate usage of methods.

  • You are already logged in with Connect-VaultCMD or Connect-VaultVDF commandlet
  • $vltAdminSvc - AdminService

Tuesday, August 12, 2014

Connecting Autodesk Inventor Content Center from PowerShell

So. Some fun in the middle of the week.

In prospect you'll be able to edit Content Center libraries bypassing Autodesk Inventor Content Center Editor. Take a look.

How it works:

We are allowed to use this DLLs and their methods, but there is no documentation on them and no Autodesk support will be provided - this is the official position of Autodesk.

Friday, August 8, 2014

Starting with Vault2014powerConsole

Specifically for Autodesk Vault programming lectures by ZippyBytes, the PowerShell-based (Wikipedia, MSDN) module is designed.

Installing Vault 2014 PowerConsole

  1. Make sure that PowerShell is installed on your system. E.g. through Start menu, or executing powershell command from cmd.
  2. If PowerShell is not installed, install it using How to Install Windows PowerShell 4.0 article.
  3. Check PowerShell version by $PSVersionTable.PSVersion (Stack Overflow) command. If version is less than 4.0, you are recommended to update it to 4.0 using Windows Management Framework 4.0. Be sure to read the installation instructions and system requirements.
  4. Check execution policy by Get-ExecutionPolicy cmdlet. If it no equals RemoteSigned (e.g. Restricted), set it up by Set-ExecutionPolicy RemoteSigned.
  5. Download Vault2014PowerConsole.exe package from GitHub. Source code also available.
  6. Installation puts module files into c:\Users\[CurrentUser]\Documents\WindowsPowerShell\Modules\Vault2014PowerConsole directory, and also creates shortcuts in Start menu under ZippyBytes folder.

Starting with Vault 2014 PowerConsole

Connecting Vault

You can connect Vault using following cmdlets:


Connects Vault through command prompt. Usage examples:
After the launching cmdlet it will ask you for all parameters: server, vault, username, password.

Such approach is useful for scripting outside Vault 2014 PowerConsole. You are importing module first, then establishing connection. Example:


Calling regular Vault login dialog.

Module variables

Fore useful dealing with module, next variables are defined:
  • vltActiveConn - current active connection
  • vltAdminSvc - AdminService
  • vltDocumentSvc - DocumentService
  • vltFilestoreSvc - FilestoreService
  • vltFolderCurrent - current folder, object of Autodesk.Connectivity.WebServices.Folder class
  • vltGroups - list of groups, an array of Autodesk.Connectivity.WebServices.Group objects
  • vltRoles - list of roles, an array of Autodesk.Connectivity.WebServices.Roles objects
  • vltUsers - list of users, an array of Autodesk.Connectivity.WebServices.Users objects
Note: place $ sign before variable to access it.

Module cmdlets

Next module cmdlets are available (you can get list of them by Get-Command -Module Vault2014PowerConsole):
  • Add-VaultFile
  • Add-VaultFileHidden
  • Add-VaultFolder
  • Add-VaultFolderLibrary
  • Connect-VaultCMD
  • Connect-VaultVDF
  • Disconnect-Vault
  • Get-FilePath
  • Get-VaultAllConnections
  • Get-VaultChildItem
  • Get-VaultFolder
  • Get-VaultPowerConsoleHelp
  • Get-VaultVariables
  • Get-VaultVariablesDescriptions
  • Set-VaultActiveConnection
  • Set-VaultLocation
  • Set-VaultVariables
To access cmdlet info use Get-Help cmdletName.

Tuesday, August 5, 2014

Autodesk Vault Programmer's Cookbook. 4.1. Getting user information

To retreive information about users you have to call Get*User* methods from AdminService:

Object Options Method name
AllUsers GetAllUsers
User ByUserId GetUserByUserId
MemberUsers ByGroupId GetMemberUsersByGroupId
UserInfo ByUserId GetUserInfoByUserId
UserInfos ByUserIds GetUserInfosByUserIds
The simplest is GetAllUsers(), it returns all users with no input.
After calling it you can output all objects, or filter required. PowerShell filtering is available from Where-Object cmdlet:
Since now the Vault2014powerConsole will be used to illustrate code. After login you have
$vltActiveConn object that represents active connection. You can also use $vltAdminSvc to acces AdminService.

Results are represented on video:

Using Vault2014powerConsole - Part 1. Connecting Vault

Now you can connect Vault via PowerShell command line. Take a look how to do this with Vault2014powerConsole.


Monday, August 4, 2014

Concept of Virtual Design Technology

Some thoughts in region of CAD and data management with proposing the solutions.


What’s usually happening while implementing CAD, PDM or PLM technology?
After implementation users usually trying to find the way how can they deal with workflow. In CAD they’re trying to create model, or even “paint” it. If even they create model through parameterizing, they’re just “playing” with the expensive toy.

Problem formalizing

Let’s draw an analogy of working process to playing chess, or proving of the math theorem. The big task of winning, or theorem proving divides on bunch of hierarch-spitted common tasks. In chess – this is chess etudes, which are masterly linking into game, in math – the conveyor of lemmas, that provides the solution. Etudes and lemmas – are “best practices”, “jazz standards” of knowledge field, which they are representing.

Currently almost all of domains are isolated each from other by vendors, software, geo-locations, companies and even departments.

Why can’t we share each other our knowledge and achievements? Surely there’re certain business secrets, but what about basic knowledge, like: physic, chemistry, math, standards (DIN, ISO, JIS, etc.), electrics, mechanics and others? A numerous work hours are spending daily to reproduce already solved problems; we’re stuck in basics instead developing something really good. End-users in Germany are spoiling their time on created already designed piping models for Inventor while there’re already created ones in Canada for Solidworks or Plant 3D. Vendors are developing different HVAC tools for AutoCAD, then for Revit, ArchiCAD – but all they are having the same functionality. But if you can calculate the ducts size depending on consumers in one app – you can’t do this in other, and even you can’t enhance it to do this.

Statement of a problem

In computer-aided design there are next matters of fact:
  1. Almost every design task have been every solved and have common solution, that’s not depends on platform. 
  2. Computer aided design is aimed on reducing user’s interaction. 
  3. End-user really waits from vendor solving of all routing tasks, or just out-of-the-box best practices. 
  4. If there’s no out-of-the-box, they’re ready to buy a pack of them. 
  5. Parametric models have no interoperability within different CAD systems: Inventor Content Center components, Inventor iLogic, Revit families, Plant 3D specs, AutoCAD MEP, etc. So user has to define parametric model for each application separately. 
  6. As in previous statement, for each CAD designed separate modeling environment and wizards: Routed systems (Cable & Harness routing and Tube & Pipe routing) and frame generator in Inventor, cabling and HVAC tools for Revit, AutoCAD MEP, Plant 3D. Each content center model has to be designed with CAD-specific connector, and user could edit certain system just in that CAD it had been designed. 
  7. No CAD or PDM/PLM can provide fully-implemented system approach. At now we’re mainly playing with tools instead solving tasks. We can't see the forest behind the trees.


Let’s outline several directions of solving raised issues.
  1. Creating catalogue of best-practices blocks: components, operations, standards, rules, wizards, user interfaces. 
  2. They should be widely applicable: in different apps of one vendor, for different vendors’ software, on desktop or in the cloud. 
  3. The main repository is always up-to date, end-users can get new functions like an anti-virus updates. 
  4. The best practices are described on common language, which could be interpreted by add-on over CAD/PDM system, any part of PLM solution – the analog of Virtual Studio Technology (VST) in audio software.
Here are some obvious benefits of technology:
  1. Benefits of end-users 
    1. Standardized workflows for different tasks and regions (MFG, AEC). 
    2. No more from the ground development. 
  2. Benefits of vendors 
    1. Providing more conformity tools enhances user’s sympathy. 
    2. Development of platform-independent VDT’s (Virtual Design Technology) reduces costs on software development. 
  3. Benefits of distributors 
    1. Increasing of sales via big implementations and subscriptions. 
  4. Benefits of resellers 
    1. Resellers receive great ability to create more complex and flexible monetizing plans. 
  5. Benefits of system integrators/implementers 
    1. Implementers should no more to develop implementations from scratch. 
    2. This is better than pre-defined implementations because customization is more flexible. 
  6. Benefits of third-party developers 
    1. Third party-developers will cover much wide target auditory – not just one vendor.
Actual delivering of technology to end-users is shown above.

Hosting of VDT at engineering systems
Workflow diagram also shown:
VDT workflow


Why it this technology inevitable? In evolution the symbiosis is the most winning stratagem for all parties, and must survivors are seeking this. The main goal of any vendor should be in satisfying end-user’s requirements – not in upgrading theirs solution. If vendor doesn’t meet this – he’ll become an out-sider.

Kind regards, Dmitry Yemelyanov aka MiWa NiZa

Monday, July 21, 2014

Vault 2014 PowerConsole

O my brothers, I've got some fun stuff for you. I can't keep it to myself anymore.

So I've released my PowerShell console for Autodesk Vault: Vault 2014 PowerConsole.

Version 1.0 is available here: Vault2014PowerConsole.exe and sourcecode.

Installer puts module to $USERPROFILE\Documents\WindowsPowerShell\Modules\ folder and places shortcut to desktop.
 After Vault 2014 PowerConsole launch
 Login through command prompt
Prompt: [Vault Name]{User Name} Current Location>
 Login through GUI
List of Vault users. Every "User" is object
List of Vault users in standard GridView. Every "User" is object, and could be passed through next command
List of module commands
List of objects in parent folder

Friday, June 6, 2014

How are you feeling today Mr. Vault?

Sometimes after sudden rebooting of server (emergency, supply problems, etc.) not all related to Vault services are started.

To check if everything is O.K. in this field, you can use PowerShell cmdlet Get-Service.  It can hook service object on local or remote computer. We're interested in status of certain services:

  • IISADMIN - IIS service
  • MSSQL$AUTODESKVAULT - Vault instance of SQL
  • Autodesk Data Management Job Dispatch - JobProcessor's service

Next script will list all services on remote computers 'srv' and 'srv1' and helps to determine if there are any stopped services. Then you can select some stopped services and launch them.

Grid view dialog:

Tuesday, May 27, 2014

Autodesk Vault Programmer's Cookbook. 4. Users



Vault API provides a number of methods for working with users. They're located in AdminService service. With next pivot table you can get an overview of this methods.




To call the method in relation to a particular user - or users - enough to know their names or IDs. This information is stored in the class User. It has next fields:

The authentication type.
The date that the user was created.
The user that created this user.
The email address of the user.
The first name of the user.
A unique number that the Vault uses to reference the user.
If false, the user account is inactive, and the user cannot log in.
If true, the user is a system user.
The last name of the user.
The login name of the user.  

User class is inbound for UserInfo class, which has the following fields:

An array of Role objects associated with this user.
The userId of the user.
An array of KnowledgeVault objects associated with this user.

Remember this distribution when you're working with users. It should also be noted that the User field returns object IDs instead of object reference - while you're working with Groups.

Friday, May 23, 2014

Autodesk Vault Extreme Administration. Disable UAC


According to Vault installation pre-checks you have to turn off User Access Controll (UAC) feature before installation. It takes up to 7 steps to do this.
What could be done to do this fast if this is quite regular operation as for you.


The UAC state is stored in registry value "EnableLUA" of  key HKLM:\Software\Microsoft\Windows\CurrentVersion\policies\system. If it's off - value should be 0, otherwise 1.
So you just have to update this value to turn UAC off. To perform this let's use PowerShell functions.
To chesk UAC state:

To set UAC state:

Set-UACStatus -Computer [computer name] -Enabled [$true|$false]

Come on, take this tools in your toolpack!