PDA

View Full Version : Merging Pipe Catalogs?



mikeosborne
2012-10-24, 03:46 PM
I have two pipe catalogs, does anyone know how to merge them easily or does anyone have something I can go by?

BlackBox
2012-10-24, 04:50 PM
Currently Autodesk has no means by which to merge two pipes (more correctly named - parts) catalogs... This has been a frequent complaint of mine after every round of Beta testing.

Basically, the only way that I have successfully merge components from one catalog into another (and this isn't 100%, so take from this what you will), is to do so manually... Great, but what does that mean?

Not so easy to answer... A catalog file (.APC) is really just an .XML file, that tells Civil 3D where to pull the necessary .BMP, .DWG, and .XML files associated with each part in the catalog. To manipulate this, one must carefully modify the applicable Chapter XmlElement, etc. and hope (quite literally, cross your fingers) that there is no file naming, or GUID conflict that may creep up and cause problem(s).

Additionally, one must also consider the means by which to integrate any particular .NET rules that the part is to adhere to.

For the past few months, I've been discussing with Autodesk the idea of implementing a pseudo-Parts Catalog Editor (think CUI Editor of sorts), where one can successfully drag and drop parts between two catalogs, and customize the active catalog as needed.

This can be done with a simplistic (not simple) Windows Presentation Foundation (WPF) User Control being hosted within an AutoCAD Palette, where the TreeView's code-behind can implement an Abstract Factory Pattern to read/write the necessary XmlElement(s), and XmlNode(s), in order to correctly merge the parts dragged and dropped both within the .APC file (read .XML), and within the catalog's directory location via the System.IO.File.Copy() Method.

Sorry I could not be of more help. :beer: