bcpCreator – Three steps for a successful migration into Vault

Yes, there are really just three steps to transfer your data into Vault via bcpCreator.

All you need is the DataExportUtility from Autodesk, an SQL database that contains your metadata and of course your CAD-files. That’s it!

And here we go with the explanation of all the three steps (I use the Padlock from Autodesk as an example.)

1. Scan your CAD-files

This step should be the simplest one, but is not obligatory! Download and install the Autodesk ProductStream DataExportUtility 2014 from Autodesk Website. Now run the application and select the project file (1), and then analyze your data (2):

28-03-2014 17-05-24As soon as the analysis is complete, the tool will show “Done” in the status bar. Now you can check if your files are ok (take a look at the categories that the ExportUtility shows).

The main reason, why you had to scan your data, is because this tool will create a database file, that contains all the relevant information for the export (e.g. information about associations of Inventor files). Without this database, you will not be able to open Inventor files correctly when you imported them into Vault.

The result should be a lucene database in this directory: C:\ProgramData\Autodesk\Productstream Data Export Utility\v2014\NOPSP

2. Bring your meta-data into a SQL-database

Mabe you have already a SQL-database, because you are migrating from an SQL-based Data Management System (e.g. SmartTeam or ProductStream Professional). Than you can go straight to step three. Because I want to bring the Padlock example into an SQL database, I have created a CSV file containing all the files from the Padlock directory, and the associations between the files.

Download the Padlock.csv. But our SQL-database is still empty. Let’s fill the database with our new Padlock.csv. Open SQL-Management Studio and run this query:

USE TestDb
FullName VARCHAR(300),
CreationTimeUtc VARCHAR(100),
LastWriteTimeUtc VARCHAR(100),
ChildIDs VARCHAR(50),
) GO
FROM 'c:\Temp\Padlock.csv'

Yea, thats it! Now you can find the new table that contains the Padlock metadata:03-04-2014 10-50-56

3. Export with bcpCreator

The first thing we have to do now, is configuring the bcpCreator correctly. bcpCreator needs the lucene database from the Export Utility. It needs to know where the SQL-database with its files is, and it needs a valid export configuration.

Therefore the first thing we do, is adapting the bcpCreator.exe.config file in the installation directory:

03-04-2014 11-00-21

Now we run the bcpCreator for the first time. It will detect that this is the first run and create a stored procedure in your SQL-database (under Programmability / Sored Procedures / bcpCreator_GetDocuments)

And here is the customized procedure that we can use for the export:

-- =============================================
-- Author: Martin Weiss
-- =============================================
ALTER PROCEDURE [dbo].[bcpCreator_GetDocuments] 
-- configure this select querry
 SELECT [ID] as 'Id'
 ,[FullName] as 'FileLocation'
 ,'$'+SUBSTRING(REPLACE([FullName],'\','/'),CHARINDEX('\Padlock\',[FullName])+8,300) as 'VaultLocation'
 ,'A' as 'Revision'
 ,'Work in Progress' as 'State'
 ,'Basic Release Process' as 'Lifecycle'
 ,'Standard Alphabetic Format' as 'Revision Definition'
 ,CASE UPPER(RIGHT([FullName],3))
 WHEN 'IAM' THEN 'Engineering'
 WHEN 'IPT' THEN 'Engineering'
 else 'Base'
 END as 'Category'
 ,'Administrator' as 'Created By'
 ,[CreationTimeUtc] as 'Create Date'
 ,'Test import' as 'Revision Description'
 ,[ChildIds] as 'Child Ids'
 ,'Martin' as 'UDP_Author'

Now we are ready for the final export! Run the bcpCreator again and relax…

If you have configured that, the Bcp-Utility will be launched automatically. There is nothing left to do anymore. Otherwise you can search and launch this batch file C:\Temp\bcpCreatorExportPackage_***\Package_Import.bat

03-04-2014 12-28-46When the export is done, open your Vault client, and check if the folders are created and are containing the padlock files. Check if the Revisions, States, Properties and the History is Ok.

Now we are done!

About weiss92

Software Developer
This entry was posted in PowerShell, Uncategorized, Vault API and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s