If I attach a reference to a file, and display the BOM for the file I will see the reference as an item in the bill with a quantity of 1. Is there any way to add a second reference to the same item and have the quantity show 2?
Why don't you change the quantity in the BOM rather than creating the additional reference?
Jeff Sweeney wrote: Why don't you change the quantity in the BOM rather than creating the additional reference?
Jeff Sweeney wrote:
I'm trying to automate as much as possible to reduce errors due to typos and/or laziness. We have a handful of AutoCAD Electrical users and AcadE has some peculiarities that make working with it via PDM a bit tricky, especially when it comes to BOMs. When users create a new project (which is the equivalent of a SW assembly), they can choose an 'Add Component' operation that my addin provides. After asking for component details (part number, tag number, etc), a shared copy of a component library file is placed in a 'Components' subdirectory of the project. This shared file would then be attached to the project file, thus creating the BOM. If they want to add another instance of the same component, with a different tag number, it doesn't work due to the limitation of references.
Over the weekend I decided to turn my placeholder file into a n XML file that contains where used info for the component. The file looks something like this:
<bom number = "400001">
So, now I can parse the file when 'Add Component' is selected, looking for the <bom> element whose number matches the current project, and add a new <instance> element with the corresponding tag.
The final piece is to tweak the BOM programmatically to display the tag numbers and alter the QTY column to match the number in instances of a component in the XML file.
Retrieving data ...