Box From Table

Create solid boxes and insert blocks based on data from an Excel table. For those who love Excel programming.

По-русски

The BoxFromTable program is intended for those who do not know how to program AutoCAD/BricsCAD, but know any programming languages ​​or are well versed in Excel formulas. You can create a table describing the model of any simple product (for example, rectangular furniture). You simply describe in numbers where and what kind of solid boxes to create. Then the BoxFromTable program will build a model using this data, arrange blocks of fasteners, drill holes, and create a block assembly.

Program features:


The command is not yet sold as a separate plugin, but is supplied only as a set in the AVC Pro collection.

The program can be supplemented according to your orders. You can create a command to access your web server instead of a table.

Operating procedure

Before calling the BoxFromTable command, create an Excel or CSV table with columns:

Columns A-J must be completed. Columns K-Q may be missing (starting from the Layer).

Instead of creating a solid, you can insert an existing block into the drawing. Then the columns mean:


Headings are not needed, but you can add them. If the program comes across lines with an unknown word in the first column, such lines will be ignored. Rows with merged cells and collapsed rows will also not be taken into account.

The Excel table will be read from the sheet specified in the settings. And if not specified - from the first sheet.

Reading lines will continue until the first line with an empty first column.

In CSV text files, use the column separator you specified in the settings. Default is comma. If you need to use this sign inside a column, place \ in front of it.

The decimal separator in numbers should be the same one that is displayed in your AVC Properties Palette. But it can be configured in Common Options. The default is dot.


If you want to pass objects serialized as JSON to the program, then it must be an array of objects with the same property names as indicated above. Look in the project on GitHub for the BoxData.cs file. It describes the structure of such a class in C#. You'll need to do something similar in your favorite programming language.


After creating the table file, you will still need to configure the BoxFromTable command. Settings on the Box From Table tab in the AVC Options Palette (AVCOptions).


Call the BoxFromTable command.

If a file request is configured, the program will open a file selection dialog. But you can configure the opening of the same file without prompting.

Next, the program will create solids and blocks in the model. Perhaps you will have time to notice them at the origin. Then the program will create blocks from them and delete the original constructions.

If necessary, the drilling program is called and will subtract all the solids of the Holes layer, including those inside the blocks.

If nothing is written in the Owner column, then blocks or groups will be created using the assembly name template from the AsmCreate command settings.

Next, blocks with Owner = Model will be inserted into the drawing. Including freshly created blocks.

You can disable block creation and enable groups. The program will simply combine the created objects into co-selection groups. In this case, the attempt will fail - the program only inserts blocks.

At the end of the work, the program can call the Expose Assemblies command.

Options

Program settings should be made before calling the BoxFromTable command. All settings are located on the BoxFromTable tab in the AVC Options Palette.

The operation of the program can also be affected by the settings of the Drilling, Assembly Creation, and Expose Assemblies programs.