CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 4949

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.
100% *  CAD 
8.6.2012    22353×   FAQ  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 13091:3DSolSz - list of dimensions of selected 3D solids.
Tip 11898:Automatic schedule - number of blocks in a drawing.
Tip 11896:How to drive dyn.block parameters or constraints from Excel?
Tip 9185:Fix problem of Areas on self-intersecting curves in AutoCAD 2013.
Tip 8679:How to invoke updates of the data extraction table?

Back   All CAD Tips

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   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.