+ All Categories
Home > Documents > forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any...

forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any...

Date post: 20-Apr-2018
Category:
Upload: vuxuyen
View: 222 times
Download: 7 times
Share this document with a friend
16
How to clean up Plant 3D database after using Autodesk Vault commands First off I would like to say to avoid cleaning up the database after making the mistake of deleting or renaming an Autodesk Plant 3D drawing using Autodesk Vault this should always be done through Plant 3D first before deleting from Vault. For those who have already made this mistake and would like to know how to purge the database of non- associated data keep reading. Issue Deleting or Renaming a Plant 3D project drawing in Autodesk Vault will not update the Plant 3D database causing a Vault Project Error (Object reference not set to an instance of an object.). Plant 3D will display an error when the project manager tries to load the missing drawings once this occurs. What this message means When the Plant Project drawing was deleted or renamed in Vault it disconnects the drawing and all data for that drawing in the database. Re-creating the error We have two drawing created in Plant 3D and uploaded to Autodesk Vault. Created by Brian Tait
Transcript
Page 1: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

How to clean up Plant 3D database after using Autodesk Vault commands

First off I would like to say to avoid cleaning up the database after making the mistake of deleting or renaming an Autodesk Plant 3D drawing using Autodesk Vault this should always be done through Plant 3D first before deleting from Vault. For those who have already made this mistake and would like to know how to purge the database of non-associated data keep reading.

Issue

Deleting or Renaming a Plant 3D project drawing in Autodesk Vault will not update the Plant 3D database causing a Vault Project Error (Object reference not set to an instance of an object.). Plant 3D will display an error when the project manager tries to load the missing drawings once this occurs.

What this message means

When the Plant Project drawing was deleted or renamed in Vault it disconnects the drawing and all data for that drawing in the database.

Re-creating the error

We have two drawing created in Plant 3D and uploaded to Autodesk Vault.

Created by Brian Tait

Page 2: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Plant 3D Data Manager showing components in the entire project each with a unique PnPID assigned to a DWG Number.

Autodesk Vault Professional 2016

Open Autodesk Vault Professional 2016 and navigate to our Plant 3D project

Created by Brian Tait

Page 3: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Delete drawing M6-56-5487 from Autodesk Vault

Created by Brian Tait

Page 4: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Select Yes

Select Details

Expanded details

Created by Brian Tait

Page 5: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Select Yes

We now see that drawing M6-56-5487 is deleted from Autodesk Vault

Autodesk Plant 3D

Now let’s go back into our Plant 3D project and refresh the project manager. We now get the Vault Project Error (Object reference not set to an instance of an object.)

Created by Brian Tait

Page 6: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Notice the new icon for drawing M6-56-5487

Created by Brian Tait

Page 7: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Created by Brian Tait

Page 8: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Vault Project Error (Failed to get file from Vault)

The is because we deleted the file in Vault

P&ID Drawing’s folder will not expand giving the Vault Project Error.

If you get to the step you are not able to work on any drawings within the P&ID folder.

Created by Brian Tait

Page 9: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

*Delete your local working folder for Autodesk Vault

Autodesk Plant 3D Database

Open the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or the drawing that was deleted and delete that line.

Created by Brian Tait

Page 10: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Autodesk Plant 3D

Created by Brian Tait

Page 11: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

After deleting the drawing out of [dbo.PnPDrawings] you will be able to reload your Plant 3D/Vault project.

Cleanup Database

Remember all of those components placed in drawing M6-56-5487. We will still need to purge all of those components that are in the database that are not associated to a drawing anymore. Otherwise we will not be able to use that tag number again within the current project. Let’s take a look at the data.

Open the Data Manager in Plant 3D and sort by DWG Number.

Created by Brian Tait

Page 12: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

You now see that all of the components that were in M6-56-5487 are not associated to a drawing but are still in the database. Each one of these components has a unique identifier called PnPID. For Example if we look at CH_GATE_VALVE with PnPID of 1514.

Export Engineering Items

Export Non Engineering Items

Save excel export to a location and open the spreadsheet.

Created by Brian Tait

Page 13: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Unprotect the spreadsheet

Filter the data

Filter DWG Number for Blanks

Created by Brian Tait

Page 14: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Now we have filtered all the components that need to be purged from the database for the table CH_GATE_VALVE.

*This process will be repeated for all worksheets in the excel spreadsheet.

Run Queries and Delete Records

Run a query in SQL to find and delete the records.

Created by Brian Tait

Page 15: forums.autodesk.com · Web viewOpen the Plant 3D database in Microsoft SQL Management Studio or any SQL editor software and run a query on [dbo.PnPDrawings]. Locate M6-56-5487 or

Solutions to Fix

Solution 1

Autodesk Development Team create patch to add functionality to Autodesk Vault

Delete - Purge Plant 3D database of all objects associated to the drawing being deleted. Rename – Update Plant 3D database to rename drawing after rename command in Autodesk

Vault.

Solution 2

Create a stored procedure in SQL to query Plant 3D database for PnPid’s that are not assigned to a drawing.

Created by Brian Tait


Recommended