Author Topic: Clearing out a junky database  (Read 2553 times)

0 Members and 1 Guest are viewing this topic.

Offline WilliamNYTopic starter

  • Full Member
  • ***
  • Posts: 113
  • Country: us
  • Gender: Male
Clearing out a junky database
« on: Feb 19, 2024, 21:41:35 PM »
I have inherited a database from another company and, frankly, it's not in great shape. I've never had to worry about this before, so I'm wondering if there is a quick and easy way (either built in, or through script) to clear out all the ancillaries and labor costs from every part in the whole database, all at once. We are talking thousands and thousands of parts here.

A separate--although possibly related--question would be if there's a similar way to clear out any UNUSED connectors.

I've done some quick searches here on the forum but nothing immediately jumped out at me as pertaining to my situation.

Thanks y'all.

Offline cadbyken

  • Premier Member
  • *****
  • Posts: 5427
  • Country: us
  • Gender: Male
Re: Clearing out a junky database
« Reply #1 on: Feb 20, 2024, 15:02:08 PM »
Waiting for Darren Young to comment on this.  He had a class recently on this topic but I couldn't  get access to the conference.
Ken Taylor - Atlantic Constructors, Inc
BIM Technology & Database Manager
Revit - not ready for Primetime given all of the add-ons, work arounds, and general issues with Fabrication in Revit.  Tired of them taking our money for little results.

Offline cadbyken

  • Premier Member
  • *****
  • Posts: 5427
  • Country: us
  • Gender: Male
Re: Clearing out a junky database
« Reply #2 on: Feb 20, 2024, 15:04:38 PM »
For the connectors, I have to do something similar.  I am planning on using Darren's scripts to write out all of the connectors.  Organize in Excel or Power BI and then delete what isn't used.  Then start getting making permanent all of the bracketed connectors (along with other stuff).
Ken Taylor - Atlantic Constructors, Inc
BIM Technology & Database Manager
Revit - not ready for Primetime given all of the add-ons, work arounds, and general issues with Fabrication in Revit.  Tired of them taking our money for little results.

Offline WilliamNYTopic starter

  • Full Member
  • ***
  • Posts: 113
  • Country: us
  • Gender: Male
Re: Clearing out a junky database
« Reply #3 on: Feb 26, 2024, 16:30:43 PM »
Ah, nice. Looking forward to Darren commenting then. Thanks!

Offline Darren Young

  • Premier Member
  • *****
  • Posts: 2131
  • Country: us
  • Gender: Male
    • BIM There Done That.
Re: Clearing out a junky database
« Reply #4 on: Feb 26, 2024, 20:23:58 PM »
I'll try to get to a more proper reply this soon. :-)

Offline WilliamNYTopic starter

  • Full Member
  • ***
  • Posts: 113
  • Country: us
  • Gender: Male
Re: Clearing out a junky database
« Reply #5 on: Mar 15, 2024, 20:43:40 PM »
I just wanted to bump this and see if anyone's got some tips for cleaning out a garbage-filled database. Darren?

Offline Darren Young

  • Premier Member
  • *****
  • Posts: 2131
  • Country: us
  • Gender: Male
    • BIM There Done That.
Re: Clearing out a junky database
« Reply #6 on: Mar 19, 2024, 13:58:43 PM »
Ok....tall order. (sorry for the delay).

First thing is to run ALL my "Library" scripts. You can then mash that up in Excel to get a handle on what you have.

SYSSCRREPORT also will show all the ITM's that are used in all your service templates.

I massage that into a batch file w/Excel and copy out all the ITM's I'm actually using.
From there, I'll manually parse through that new folder and see what's being used and copy over unused items in the same product line.

e.g. I might only be using 1/2 the available Viega ProPress parts but I won't split the Viaga library....I'll keep them all.  So I'll copy the unused ones into the new location for the stuff I do use.

Anything left over is unused. I may need it again but as you've found....it's content is questionable. I move that "unused" stuff to a server somewhere in my ITM boneyard. If I get a new/weird material requirement again, I look there first and scrub it on the way back in if I need it.

But all those "used" ITM's, I'll then move them back to where they belong in the DB.

For all my scripts...it only exports ITM properties from ITM's in the libraries (or of a DWG/MAJ depending which group of scripts you run). It will NOT export entries in the database.  You'd need to do that with the .Net API for the most part.

There's a couple exceptions...connectors being one of them.  I just finished a new script for a side job I' doing that's designed to be run against an ITM. It sets the ITM's connector C1 to the first connector in the database and exports the group/name. It then sets the ITM's C1 to the second connector in the database and exports again, repeating the process until they're all done. Unfortunately, most database section of Fabrication don't support this but Connectors does. From here, you an mash of the 2 lists of connectors in Excel using Power Query and see what's used vs not used.

There's a whole ton of other hacks that can be used depending on what the issues are and what's needed. Hard to really document anything without seeing more details. I pretty much need to see the forest to know how to navigate it.

As for things like resetting ancillaries or labor/price tables....scripting can help some. Most of my "Library" scripts have the needed code infrastructure to "loop" through ITM's on disk. They currently export properties but are easily modified to "set/save" property changes if you know COD scripting well.

I'm esentially doing a similar job for another company now.

Offline stonehands99

  • Active Member
  • **
  • Posts: 4
  • Country: us
  • Gender: Male
Re: Clearing out a junky database
« Reply #7 on: Jun 20, 2024, 18:20:55 PM »
The info button was nice but did not list the template used for the service. Darren's writeup was also nice but what I need is not covered. I will poke around some more and see what I can come up with. Thanks for the input.

Offline Darren Young

  • Premier Member
  • *****
  • Posts: 2131
  • Country: us
  • Gender: Male
    • BIM There Done That.
Re: Clearing out a junky database
« Reply #8 on: Jun 21, 2024, 14:50:15 PM »
The info button was nice but did not list the template used for the service. Darren's writeup was also nice but what I need is not covered. I will poke around some more and see what I can come up with. Thanks for the input.

What do you need? or what are you trying to do?

I've got a wealth of tricks of my sleeves....and I'm stubborn.

Reach out direct if the nature of your needs is such that you can't publicly disclose.