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
Date
Fall/Winter 2014-2015

Venue(s)
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
Date
Fall/Winter 2014-2015

Venue(s)
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:
Object
Option
Method
Permissions
ByUserId
GetPermissionsByUserId
Roles
ByUserId
GetRolesByUserId
Hereinafter Vault2014PowerConsole will be used to illustrate usage of methods.
Where:

  • 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:

Connect-VaultCMD

Connects Vault through command prompt. Usage examples:
Connect-VaultCMD
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:



Connect-VaultVDF

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: