CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 1866 

CAD tip CAD tip # 8677:

Question CAD 
 %  platform  category 
Q - question

Associative DWG table of line length totals (by layer).

A - answer A common requirement for drawing automation and for increase of the DWG "intelligence" is the automatic and dynamic (updating on changes) schedule of total line lengths or areas (acreage) listed by the individual layers.

Beside several solutions based on add-on LISP or ARX utilities, you can also solve this problem using the standard internal AutoCAD command DATAEXTRACTION - available already since version 2008.

The following images illustrate the workflow of selecting options in the drawing data extraction wizard and inserting the totals to an associative table in your drawing. Alternatively, you can export the data also to an external Excel table. Beside the described summary of line (polyline) lengths by layer, you can use similar approach also for any other object properties. You can also link the generated table with external sources (database, Excel) and extend it with lookup tables, price information, etc.

The settings specified in the wizard are stored in a DXE control file. On any change of the drawing contents (edit, adding new objects, etc.), the inserted table is updated (see the table's context menu, Update - and see the tip 8679).

The workflow (Czech version of AutoCAD 2013):

The initial state - lines in the individual layers (Beton, Chranicky, Kanalizace):

Run the extraction wizard from the ribbon:

Step 1: new or existing DXE file:

Step 2: selecting drawings and objects (all - use Settings to set more options):

Step 3: select the correct object types (here "Krivka" = Polyline) and name the columns of the future table:

Step 4: choose the displayed properties (here "Delka"=Length and "Hladina"=Layer) and name the columns:

Step 5: important - process the extracted data - either display individually or summarize them using the right-click menu option Combine Record Mode > Sum Values:

Step 6: output options - a drawing table or an external file:

Step 7: style of the schedule table:

Step 8: that's all

The resulting table ("Délky"=Lengths, "Hladina"="Layer):

Any change in the drawing or geometry will be now reflected to the table:

You can download this sample (including the DXE file) from the CAD blocks catalog.
ACAD
100% *  CAD 
8.6.2012    6687x   FAQ  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 9185:Fix problem of Areas on self-intersecting curves in AutoCAD 2013.
Tip 8679:How to invoke updates of the data extraction table?
Tip 8559:How to export AutoCAD drawing texts to Excel?
Tip 6708:How to remove unwanted references to .DXE files?
Tip 6289:How to export X-Y-Z coordinates of AutoCAD drawing blocks?


Back   All CAD Tips All CAD tips&tricks

How to invoke updates of the data extraction table? « | » Since which version does AutoCAD import Inventor IPT/IAM files?

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Link your AutoCAD texts with Excel tables/sheets. Export. Change. Import.
Try DwgText 2015 More info


Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist