To begin with, both progeCAD and AutoCAD support the use of external and internal blocks in a drawing file. Blocks are drawings which can be re-used multiple times in another larger drawing. For example, say we use the same fastener several times in a drawing. Rather than actually drawing the same fastener detail from scratch every time it is needed in a view, our fastener block can be inserted as a reference entity everywhere we want the fastener to appear, saving both data space and drawing time. And if we have a 3D block of the fastener, we can also re-use that block again in all of different views of our drawing. Changes to the block will be reflected everywhere it is used in the drawing. Blocks also offer a great way to represent design components that we want reflected later in a bill of materials. In progeCAD 2016, internal blocks can be made "annotative" so that they scale automatically according to the annotation scale of the viewport. Custom attribute information can be inserted using the ATTDEF command while in the block's "local editing" workspace. A block's custom attributes can be viewed and edited using the BATTMAN command (for ATTEXT they need to be checked with DDATTE - see reason below).
Above is an example of using a simple three-line block defined and inserted in progeCAD, and some additional attributes which we defined using ATTDEF. NOTE: if we are inserting a lot of blocks with a lot of attributes, we can prevent progeCAD from asking us every time to confirm each attribute by setting ATTREQ to OFF. Below see the block attributes listed in BATTMAN:
Once we have our blocks inserted and block-attributes defined, we can generate our BOM list. There are several ways we can do this. The easiest way is to use the EATTEXT command (menu "Tools -> Data Extraction.."), choose the default settings offered and select the block attributes desired from the window that follows. progeCAD will display an export preview similar to this one:
Once we click next, we are offered a variety of output formats, including tab- or comma- separated CSV file which we can then import into a spreadsheet for final touches or incorporation into a larger existing product structure list. We can also output the attribute data to a drawing table. progeCAD has supported TABLES in DWG since version 2014.
...and this syntax is used to extract custom attribute data
'N' literal 'N' indicating numeric fields
FFF Width of field (000 - 999)
PPP Decimal places (.0 - .999)
For example, to export the "DEMO-MATERIAL" attribute from our example above we would add the following record pair to our template file:
DEMO-MATERIAL C060000
Which means "character field, maximum length 60, no decimal places"
So, to export, say, block numbers, block names, our material attribute, our cost attribute and lastly our supplier attribute for the drawing of triangle blocks used above we would write this actual template file in notepad and save as, say, "mytemplate.txt":
BL:NUMBER N010000
BL:NAME C060000
DEMO-SUPPLIER C060000
DEMO-COST C010000
DEMO-MATERIAL C060000
NOTE: Creating old ATTEXT templates is evidently a bit tricky. A faulty template file will result in 0 records extracted. It is also reported that these templates have a couple of obscure rules when used in AutoCAD. Each record must be followed by a full DOS carriage return, including the final record (so, no blank lines in between records - but a final blank line with no spaces in it). At least one custom attribute must be in the template otherwise it will silently fail. Because of these problems we recommend using EATTEXT instead of ATTEXT.
We select Comma Delimited Format option for output (this is the same as Excel's CSV file format). The results of ATTEXT in our case came out like this:
1,'test','Demo Building Supply Pty Ltd','60','Treated Pine'
2,'test','Demo Building Supply Pty Ltd','60','Treated Pine'
3,'test','Demo Building Supply Pty Ltd','60','Treated Pine'
These value can be inserted into a spreadsheet or other software for processing into the final Bill Of Material.
No comments:
Post a Comment