|
I received a question from a http://autodesk.blogs.com/between_the_lines/ - Between the Lines blog reader John Reid this week in response to a previous post “ http://autodesk.blogs.com/between_the_lines/2009/01/starbacks-bbq-floor-space-planning-with-autocad-fields.html - StarBacks BBQ Floor Space Planning with AutoCAD FIELDS ”. I thought it would be a great lunchtime challenge to break free of all the other things I was doing, and have some CAD fun. The question was about having a http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4b40.htm - FIELD read a http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCK quantity in the drawing. I created this tutorial showing how I accomplished this challenge. There could be other ways, but this was the method I used and came natural to me. I used http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-5143.htm - BLOCK ATTRIBUTES in the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCK definitions, in this case an http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-5143.htm - ATTRIBUTE named “PART”. This way I could get both the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCK name as well as the part name. With the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCK definitions I could then use the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ff1c7e22710db287822c-7fb7.htm#WSc30cd3d5faa8f6d815cda3fffc2d5ffb1-7ffa - Data Extraction wizard to export the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-5143.htm - BLOCK ATTRIBUTES and block counts to an http://www.autodesk.com/autocad - AutoCAD http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-5300.htm - TABLE . I could then have the table as my http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCK counts and reference the cell in the table in a field elsewhere in the drawing. Now if I deleted one of the instances of the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCKs , the counts would magically be updated to reflect the true count of http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4d7e.htm - BLOCKs , Note in order for the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-5300.htm - TABLE count to update frequently when you save the file and in turn update the fields you need to have your system variable http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS73099cc142f4875513fb5cd10c4aa30d6b3785.htm - DXEVAL set to 32 so that the value updates when the drawing is saved. OK lets step through this visually. http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef0120a9240b6d970b-pi"> I have a drawing in http://www.autodesk.com/autocad - AutoCAD 2010 with a http://en.wikipedia.org/wiki/HVAC - HVAC design for a building. I setup 2 blocks one for a specific HVAC return and one for diffusers with a attribute of PART in the block editor. The blocks were inserted multiple times throughout the design. http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef0120a9240b79970b-pi"> Now I start the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ff1c7e22710db287822c-7fb7.htm#WSc30cd3d5faa8f6d815cda3fffc2d5ffb1-7ffa - Data Extraction wizard and have it automatically select all content. After saving a extraction template, select the option to display blocks with attributes only. Next http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef01310f8aca51970c-pi"> Filter in on the attribute in common I want, in this case “PART”. Next http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef01310f8aca64970c-pi"> Select the option to create a table from the data. It will create the block properties I selected as well as a total count per block with the default option for count to display. Next http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef01310f8aca75970c-pi"> Now that I have inserted the generated table, I can create a http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4b40.htm - FIELD to reference the cells in the table that contain the block counts. Next http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef0120a9240ba9970b-pi"> I use insert http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4b40.htm - FIELD and select formula and then select the option “cell” and then select the cell in the table I want to display in the http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS1a9193826455f5ffa23ce210c4a30acaf-4b40.htm - FIELD . Done http://autodesk.blogs.com/.a/6a00d8341bfd0c53ef01310f8acaa8970c-pi"> Now I have both a table with block count and attributes as well as a field referencing the table cells. The best of both worlds. I could place the field in a label elsewhere in the drawing instead of a table format. I linked to the online http://www.autodesk.com/autocad-help - AutoCAD Help (http://www.autodesk.com/autocad-help) documentation for certain terms and commands in this blog article. Thanks to John Reid for giving me the fun challenge. Cheers, Shaan
http://feeds.feedburner.com/~ff/blogs/btl?a=wzZ7Q4lkqUk:UMuom_MGFVY:yIl2AUoC8zA">  http://feeds.feedburner.com/~ff/blogs/btl?a=wzZ7Q4lkqUk:UMuom_MGFVY:qj6IDK7rITs">  http://feeds.feedburner.com/~ff/blogs/btl?a=wzZ7Q4lkqUk:UMuom_MGFVY:V_sGLiPBpWU">  http://feeds.feedburner.com/~ff/blogs/btl?a=wzZ7Q4lkqUk:UMuom_MGFVY:sHskjighKVI">
 Go to the http://feedproxy.google.com/~r/blogs/btl/~3/wzZ7Q4lkqUk/autocad-tip---reference-a-block-count-in-a-field.html - original post...
------------- http://autodesk.blogs.com/between_the_lines/" rel="nofollow - Between the Lines - Autodesk blog by Shaan Hurley
|