Data Table
AVC_DataTable plugin for AutoCAD and BricsCAD.
Extract properties from any objects, including names and descriptions, attributes and parameters. Writing tables in a drawing, Excel, CSV, XML. Calculation of total results.
The command is similar to DataExtraction, but interacts with other A>V>C> plugins: it works with the names of solids and lines created by the A>V>C> Properties Palette; and can extract solid metrics, including descriptions of surface and edge bandings.
Features of the program:
Extract basic properties of all drawing objects: 2D, 3D, annotations, materials.
Work with the names of lines and solids. And with all other object properties that are available in the A>V>C> Properties Palette.
Work with the metric of solids, with dimensions of parts, their materials, coatings, edge bandings, weight and price.
Combine data on blocks and solids in one table, thus creating complete bill of materials (BOM).
Filter only the necessary objects from all selected by layer, by type of object, by manufacturing technology.
Create a single table from objects from different drawings (dwg or dxf).
Process all objects visible through the viewport or ModelDoc=ViewBase view (selecting by view).
Read objects from inside assembly-blocks, dynamic blocks, external references.
The program can сount how many assembly-blocks are used in model space, no matter how many you have selected.
Use AutoCAD Fields to easily update tables.
Numbering, write down names as numbers in order. Group numbering or continuous, numeric or alphabetical. This numbering can later be used by the Smart Leader (ALD) program.
Customize any kind of table, with any columns, using the Substitutions system.
Create combined columns from multiple part parameters.
Format numbers and any data using substitution formats. Each column can be formatted differently.
Group table rows into sections and insert group names.
Sort rows in ascending or descending order.
Combine identical lines into one, count the number of combined lines.
Distinguish objects not only by the extracted data, but also geometrically, by the drawing.
Count sums in concatenated rows.
Multiply the number of parts by a given multiplier. This will allow you to count the number of parts for a series of products in one drawing.
Calculate mathematical formulas from single row data, including trigonometric functions.
Calculate totals by group and across the entire table.
Assist with cost and weight estimates for solid parts assemblies.
Save results in dwg tables or texts.
Split long tables into multiple sheets.
Save results in Excel, CSV, XML files.
Automatically pick the folder and name for the spreadsheet file according to your settings.
Save results to the clipboard for pasting into any programs.
Quickly switch between multiple presets (styles).
Work in 1 click - select a table to insert data along with objects to retrieve data.
Customize all these features in a convenient dialog box.
With the program free of charge the command works with tables "Paste To Table" (PTT) and "SplitTable". As you know, you cannot just copy the cells from Excel and paste them into AutoCAD. This defect is partly compensated by the command "Paste To Table". With its help, you can insert in the AutoCAD table any texts separated by tabs and line breaks. Including data copied to the clipboard using the DataTable command. And the command "SplitTable" will help to send to the printer a table that does not fit into one layout.
The AVC_DataTable plugin comes with a command to update all tables: TableUpdate.
Read about downloading and installing the program here.
To run the plugin, you will have to register account and top up your account balance or receiving bonuses.
Then you can activate one of the licenses:
Annual license - 20 EUR.
Unlimited license - 100 EUR. Free updates for 1 year.
The trial period is 20 days.
Also the DataTable command is part of the A>V>C> Pro collection.
If you did not find the property you need or you need help in setting up - write to avc.programming@gmail.com and offer your price. If you need to export a data to a SQL database or web application, this can also be done.
Command list
DataTable - Extract properties from any objects, including names and descriptions, attributes, and parameters. Writing tables in a drawing, Excel, CSV, XML.
PTT - Paste to Table: Inserting text tables from the Windows clipboard into the AutoCAD table.
TableSplit – Split the table into sheets. Updating the split.
TableUpdate - Refill the drawing tables with the old settings, extracting data from the same objects.
Data Table operating procedure
If you plan to insert data into a dwg-table, then it can be prepared in advance. For example, take a sheet with an assembly view and a sawing table from your template. The program is able to insert data into existing dwg-tables, while maintaining the design of the cells.
If you are configured to receive data from DWG files, a file selection dialog will open.
The program can use drawing objects selected before calling the DataTable command. In this case, you will not see any prompts or options. If nothing is selected, the program will ask you to select objects. You can select one or several viewports on the sheet - the program will process all objects visible in them. If some of the objects in the viewport are invisible due to the use of clipping planes (3dClip command), then objects that are at least partially visible will be extracted.
If extraction of data from inside blocks-assemblies is configured, and the block is only partially visible in a viewport (hidden behind the edge of the viewport or behind clipping planes), then absolutely all internal objects of the block will be extracted, even completely invisible ones. It's not a bug, it's meant to be. If you need to ignore some of the objects inside the block - use the filter of ignored layers.
You can also select one existing empty table - if a output to the dwg-table is configured, then this table will be filled, without any questions. Thus, you can fill in tables on sheets in 1 click.
Do not worry if annotations and other unnecessary objects fall into the selection frame - the program will work only with suitable objects specified in the filtering conditions. After running the program, the selection can be saved - use the A>V>C> Common Options. In the selection prompt, you will see the command options:
SwitchStyle: Quickly switch between presets by number.
Customize: Opens the program settings dialog
Then the program can ask for a Multiplier. This will multiply the number of parts found by the production lot size (series of products). May not ask - see Multiplication Request setting. The multiplier is stored in the drawing properties. Even if it was not requested, the amount will still be multiplied by it. By default, the multiplier is 1.
Then the program starts working:
Compiles a list of objects to process. These will be the objects of the drawing you have selected, as well as objects extracted from blocks (if configured to extract from assembly).
Discards inappropriate objects according to the filter settings. If the program writes to the command line that there is no suitable object, then just change the filtering conditions.
If the command is configured to process solids, then the metric update procedure will be invoked for each solid. In the process of work, the program displays the obtained sizes of solids to the command line.
Retrieves object properties for all substitutions for the group header and for all configured columns.
Concatenates identical rows (if required). Moreover, the program can check the geometric differences of objects and not combine them together, even when all the columns are the same.
Calculates formulas, counts sums and totals.
Asks, if necessary, in which dwg-table to write the results. This is already running the Paste to Table program.
Inserts data into a table, text, file or clipboard.
If the dwg-table is larger than the sheet, it creates new sheets with table sections.
Watch the console - all program messages are displayed there.
Customizing the Data Table
The command settings dialog can be called during the selection of objects using the TUNE option. You can find the settings for these commands in the A>V>C> Options Palette.
In the header of the Preferences window, you see a list of Saw Table styles. The program allows you to store several sets of settings (styles) and quickly switch between them while selecting objects. The number in front of the style name is used for quick switching from the command line. By default, several styles are configured to demonstrate the various uses of the Datasheet. You can edit them or delete and create your own styles.
Next to the list of styles there are buttons for adding a new style (a copy of the current style is created) and deleting an extra style. And also a button to return the settings of this style to their default values.
Setting up a table
Table name
The table name is used as the style name for easy selection of a style from the list. You can configure the program to insert the table name in the first line. The name is also used in the name of the file into which the table is saved. You can use drawing property substitutions and current time substitutions in the name.
Group
The group title is set here. If you want the table to be divided into groups, then in this field you must enter the substitutions of the properties used for grouping. The program can create only one-tier division into groups, it is impossible to include subgroups in groups. But grouping can be done by any number of properties - just insert multiple substitutions into the group header. They can, for example, be separated by a fraction /. And then a new group will be created every time any of these properties change. Groups are always sorted alphabetically, in ascending order. If groups are not needed, leave the field blank. As soon as you put the focus in this field, the substitution button will appear immediately. It calls the substitution selection dialog. The result will be inserted at the current cursor position in the field and can replace the selected text fragment.
Column list
It is necessary to make as many entries in the list as there will be columns in the future table. (confuses a little that now they are placed as rows, but it is more convenient to edit it). You can set each column:
Header - any text, no substitutions. It is not at all necessary to save the text that the program has substituted for you.
Data substitutions - Insert one or more substitutions here. Any symbols can also be here - they will simply be repeated in each cell of the table. There should be only one substitution to calculate sums and totals. But you can write an entire math expression with parentheses and functions - just start with the equal symbol = and the program will try to calculate the result from the substituted numbers. The following functions can be used in mathematical expressions: ^ + - / ÷ * × cos sin exp ln tan acos asin atan cosh sinh tanh sqrt cotan fpart acotan round ceil floor fac sfac abs log % > < && == != || ! >= <=. Constants are also available: euler, pi, nan, infinity, true, false. The priority of operations is taken into account, but it can be changed using parentheses (). Please note that in Excel and in the dwg-table, the result will be written, not the formula (if only it can be calculated). To see the substitution selection button, enter the edit mode for this field (double click or Enter).
Sorting - select the sort order of the data: alphabetically (ascending) A-Z or vice versa (descending) Z-A. Properties that can be converted to numbers are sorted as numbers, regardless of formatting. Note that sorting is done in column order. That is, only rows with the same values in the first column are sorted by the second column.
Sum - In the same field as sorting, there are two more options. If you assign a column to Sum, then sorting by it stops. Moreover, with this setting, objects with different values of the substitutions of this column will be considered the same and all will be written in one line. The substitution values will be summed up and in the table cell you will see not a property of one object, but the sum. When summing, the program will discard all texts except the first substitution. If the property is text, then instead of the sum, all different values of this property will be listed, separated by the fraction symbol /. The program automatically adds the word "Sum:" to the heading of the summary column, but you can fix it.
Total - You can summarize any Sum columns. That is, sum up all values in the group (if there are groups) and in the entire table. The program will create a special row in the table immediately after each group and write there all the totals for all columns marked as "Sum + Total". Of course this only works with numbers. If a string is found that does not look like a number, then the value is considered equal to zero. Totals cannot be calculated on sorted columns, only Sum. The program cannot do any other final calculations, except for the summarize. For them, you will have to write formulas late in a ready-made dwg-table or in Excel.
Below the list of columns there are buttons for adding a column to the current position, deleting the current column, and moving a column left-right. A maximum of 150 columns is allowed.
Filter of selected objects
Filtering is needed to discard drawing objects that accidentally fall into the selection frame. It is easier to select all the objects of the model in a row, and let the program select only the necessary ones from them. But the main task of filtering is the selection of objects from within the blocks. If you set up the program to use objects "Inside assemblies", then you have no other way to discard unnecessary objects, AutoCAD does not support selection of objects within blocks. Only filtering will help you.
Inside assemblies
Pull objects out of assembly blocks, arrays, xrefs, and dynamic blocks. All explodable blocks, except annotative ones, are considered assemblies. If you do not want the block to be used as an assembly, then simply uncheck it "Explodable". This checkbox is available in the block editor (_bedit) and in the A>V>C> Properties Palette. If the block is scaled, the line lengths will also be scaled up by the scale factor. But if a block is distorted by different scaling along different axes, then the program will ignore such a block. Solid metrics do not work with scaling, so if you extract information about solids, then all blocks with scaling will be ignored.
Parts from mirrored blocks (with scaling along one of the axes = -1) can participate in the counting of parts (and the LAY command will mirror the parts). However, I strongly discourage the use of mirrored blocks to avoid confusion. It is better to explode such a block and assemble from it another block with a different name.
Blocks can be nested in other blocks, the program will correctly count the number of parts, but the Block property (assembly name) will be taken from the deepest nested block (which actually contains the parts). If you want to write to the Data Table top-level assemblies (which have no parts, but only other assemblies), then enable Blocks in the filter of the object type.
Count Assemblies
When you set up a search for objects inside assembly blocks, then calculate and take into account how many blocks you inserted into the model space. The number of parts to be machined will be multiplied by this number of assembly blocks. It doesn't matter how many blocks you select - all blocks of the model will be used for the calculation.
Solids in mirrored blocks will be counted separately as mirrored (and mirrored by the LAY program).
You can exclude some of the blocks from the count using ignored layers.
This option is useful for compiling tables by assembly view when only 1 block is visible in the viewport.
Excluding selected
When counting assembly blocks in model space, do not count the assemblies that you select or that are visible in the viewport. Use this option when you have made an extra copy of the assembly only for the assembly view and does not need to be produced.
Not annotations
Ignore all annotations. This filter works both by type of objects and by layer.
Will be excluded:
annotation objects (texts, attributes, leaders, dimensions, tables, views, hatches, center marks). But not the AutoCAD verticals add-in objects.
all objects on layers Annotation, Hatching, Axes, Viewport
annotative blocks
Continuous Only
Ignore objects with dashed line types (linetype = hidden, dash, dot ...). Only continuous line objects will remain.
Object Types
Only the marked types of drawing objects will be processed. To edit the list, click on the "..." button. You can check the required types:
Block - any types of blocks, xrefs, arrays, center marks. But some of the blocks can be filtered out using the "Not annotation" filter
Solid - 3D solids only
Polyline - regular polylines, 2d and 3d polylines
Line - regular lines and MLine multi-lines
Circle
Arc
Spline
Ellipse - closed ellipses and elliptical arcs
Point
Ray - Ray and XLine
Surface
Mesh - All mesh types and Body
Region - flat surfaces: Region, Face, Solid (not the one that is 3d-Solid, but flat)
Text - texts, attributes and multi-texts. Ignoring the texts does not prevent you from retrieving attribute values as block properties.
Dimension - all kinds of Dimensions
Leader - multi-leader MLeader
Table
Other - all drawing objects except those listed above. This includes views, viewports, view labels, section planes, vertical specific objects, proxy objects, zombies, lights, image inserts, pdf, OLE and everything else.
Ignored Layers
Objects from the listed layers will be discarded. You can write layer names directly in the field, separated by commas. Or you can select them by check-boxes from the list. But only the layers of the current drawing are listed. You can use an asterisk * in layer names. This means "any text in this place". For example, "*Sketch*" means to ignore objects from the "Wireframe Sketch" and "Part Sketches" layers, and the like. When you make a copy of the assembly for the assembly view, then transfer it to one of the ignored layers and then you can safely select the entire model. The program can automatically add annotation layers to the list of ignored ones (see "Not annotations")
Technology filter
If solids are selected in the list of object types, the program will give you the opportunity to select only parts with the required manufacturing technology. Technologies are selected from the list by check-boxes. The technology is set by the program for calculating the metric of solids. The names of technologies themselves are configured in the Common Options.
Data Source
Select objects - Specify drawing objects from which information for the table will be retrieved. The program will require the user to select objects in the drawing. You can select viewports (but not ModelDoc views) - then the table will contain data on visible objects inside the viewport. You can also select a DWG table - then the program will fill it. You can select objects before calling the DataTable command.
All model objects - Extract data from all model objects that match the filtering conditions. There will be no request to select objects.
Select View or Viewport - Process all objects that are visible in one view ModelDoc=ViewBase or in one viewport. When called from the model - request a selection of objects. Extracting objects from ModelDoc views only works in the latest versions of AutoCAD, not in BricsCAD. ModelDoc views can only be selected by clicking a point above them, pre-selection is blocked by AutoCAD developers. But the table into which the results will be inserted can be selected before running the command.
Layout Viewports - Extract data into a table from all objects that are at least slightly visible in any viewport or ModelDoc view of the current sheet. There will be no request to select objects. If the command is called from a Model, then data about all objects in the model will be retrieved. It is unacceptable to have different layer property overloads configured in different sheet viewports. Otherwise, grouping objects by these properties will give chaotic results.
DWG Files - Extract data into a table from all objects of all models from multiple drawings. The program will prompt you to select DWG or DXF files. In the current version, the selection dialog allows you to select files from one folder only. In case of numbering or reindexing of materials, all files will be changed and resaved. In this case, the results can be saved to the DWG table of the currently open drawing only. Carefully configure the filtering conditions for objects - you will need to manually enter the ignored layers for all drawings, although in the drop-down list you will only see the layers of the current drawing.
Options
Numbering - For a description of the numbering setting, see here.
Merge the same data - Do not write identical rows to the table, but concatenate the data into one line. Only sorted columns are checked for similarity; summary columns are ignored. The number of objects in the concatenated string can be shown using the %count% substitution
Appearance similarity - When combining rows, program should consider not only the sorting columns, ut also color, layer, linetype, material of the solids and covers. Cover material is checked only for solids with metric.
Geometric similarity - When concatenating rows, consider not only the sort columns but also the geometry of the drawing objects. Geometrically different objects should be written on different lines. Geometry is checked only for lines, curves and solids. Geometry check ignores the position and rotation of objects in space.
Descending size - Sort objects in the table and in numbering in descending order of size, from large to small. This option is only used if all the sorted columns of the Data Table are the same. The lengths and areas of curves, the volume and dimensions of the solid, the scale of the blocks are taken into account. If you turn off the option, then first there will be small details, and then large ones.
Separate Mirrored - Write mirrored polylines and solids separately, in a separate table row. Use the A>V>C> Palette to keep the Mirror mark on the solids. If this option is disabled, right and mirrored polylines and solid will be placed in one row of the Data Table. In this case, you can use the %countright% and %countmirror% substitutions.
Multiplication Request - Query the number by which the amount of objects will be multiplied. Use to calculate the amount of parts in a batch. The multiplier is stored in the drawing properties. Even if it was not requested, the amount will still be multiplied by it.
Convert number to string
When a program finds a substitution and replaces it with an object property, it needs to know how to format numbers, how many characters to write. It is possible to write the format into each substitution. But if you did not specify the format in the substitution, then these settings will be used.
Format for size
This setting is used only for converting size numbers to a string. It does not apply to areas, volumes, prices and other figures. The format can always be overridden in the substitution itself. The format is ignored when substituting AutoCAD fields.
The format specifies how many decimal places to write and whether to write insignificant zeros. Use the characters 0 and # in the format. 0 is a digit or 0, # is a digit or nothing.
For example, the number 1.111111 formatted as 00.00 will be displayed as 01.11. And formatted 0.#### will be displayed as 1.1111. And the number 1.0034 formatted as 0.## will be displayed as 1.
There are special, AutoCAD-only, formats:
CU – how the units are configured in the current drawing (via the _units dialog)
AR – Architectural
EN – Engineering
FR – Fractional
After AR, EN, FR you can write precision (0-8) Do not use these special formats when pasting data into Excel.
Decimal separator - Replace the decimal point with this character in all numbers and in all substitutions. When saving CSV and XML files, it is important to use the delimiter as configured in your Windows localization. And there is may be a comma. But in dwg tables a dot is always required.
Special Characters - Use special characters such as ¼ ¾ ½. And after the corners, prices, areas and volumes, units of measurement will be affixed. It is impossible to evaluate mathematical expressions with such symbols. And not all fonts contain these characters.
Use Fields - Use AutoCAD Fields instead of substituting property values. Fields only work in AutoCAD tables. The program is not yet able to create fields in BricsCAD tables due to errors in its API.
Numbering
See the numbering settings here.
Inserting data
Destination
Choose where to insert the extracted data:
Dwg Table - insert into a table in the same drawing. You can create a new table or use the old one. A special dialog will be displayed for easy selection. If you have selected objects before calling the DataTable command and there is one dwg-table among the objects, then the program will not query anything, but will insert data into this table.
Dwg Text - insert into the same drawing as MText. Each detail is on a new line. Column separators can be selected. You can draw a frame around the text.
Excel - create a new Excel file.
CSV file - Create a Comma Separated Values file. You can configure whether to separate fields or (as may request Excel) semicolons.
XML file - create an XML file. Each group and each column will be written according to the rules for creating XML records. Table headers are not used. Email me if you need a special XML recording format. Offer your price.
Clipboard - writing a table as text to the Windows clipboard according to TSV (Tab Separated Values) rules. Such a table can be inserted into almost any program, such as Cutting3, Google Sheets, or into an existing Excel document. But you will have to set up the decimal separators and the field separator correctly.
If you need to export data to a database using SQL or to web applications using POST requests, this can be done. Write me. Negotiable price.
Table filling
Title - insert the table title first. The program will merge the cells of this row and assign the first row the TITLE style. If disabled, the insert command will skip the first line if it already has the Title style.
Headers - insert column headings into the second row of the table. The line will be given the HEADER style. If disabled, the program will skip the line with the "Heading" style and start writing data from the next line.
Group Titles - write down the group title. All cells in this row will be merged. Such lines are also assigned the TITLE style.
Clear style - all old cell settings of the old dwg-table will be reset. The table cell will look as configured by the _TableStyle command.
Auto width - change the width of the table columns so that the text fits without hyphenation.
Merge Titles - all cells will be merged in title rows.
DWG Table
Settings for filling tables in the current drawing itself.
Show dialog - call the table selection window. If you turn it off, the program will silently search for a table by name (even if the Title checkbox is not checked) or demand to select a table on the current sheet.
Clear columns - if the inserted data is not enough to fill all the columns of the old table, then the last columns should be cleared.
Split Table - call the Split Table command after inserting data.
Delete rows - if there are less data than there were rows in the old table, the program will delete extra rows at the end.
Style - The table style for inserting new tables. The list contains only table styles for the current document. When calling the command, this style must be in the drawing, otherwise the current style will be used. It is recommended to leave the field empty - then the current table style will be used. As you know, a table style can be set to a table template. This allows you to predefine the table title, headers, and column widths. But you will need to turn off header replacement and column width auto-adjustment. Styles are configured with the _TableStyle command. The setting does not affect the filling of old tables - they will retain their style as it was.
Text settings
These settings are used only if the data will be inserted into the drawing as multi-text. But the field separator is also used in CSV files.
Field Separator - A character to separate columns in each row. Although by the standard the fields of a CSV file should be separated by commas, Excel takes the Windows localization settings and may requires a semicolon.
Text Style - Style for the new MText. Leave the field blank to use the current text style from the TextStyle system variable.
Height - The size of the font. Assign 0 to use the TextSize system variable.
Frame - A rectangular frame around the text. Only available in the latest versions of AutoCAD / BricsCAD.
File creation
Folder - The name of the folder for storing files. If you leave the field empty, the dwg-file folder will be used. You can use drawing and time substitutions in the folder name.
File - A string for your own filename mask. You can use drawing and time property substitutions. Leave this field blank to use the dwg file name and table title.
Dwg folder - Create a subfolder in the specified folder with the same name as the drawing.
Open file - Run the program associated with this file type.
Replace old files - If the file with the table already exists, replace it. If you do not enable this option, the program will save the old file, and the new table will have a version number at the end of the name.
And besides, the Common Options s of all plugins A>V>C> are available in the Data Table settings dialog.
The settings are saved in the Windows registry under the current user section. Therefore, they will work the same in all drawings and in all versions of AutoCAD and BricsCAD. Settings can be transferred to another computer only by exporting a registry key.