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:
Works with Excel files, text files (CSV, TSV), JSON.
The table can be taken from any sheet in an Excel workbook.
Column separators in text files can be selected: comma, semicolon, tab.
Creates solids in the form of boxes, cylinders, cones, pyramids, spheres at a given point.
Creates 2D curves: lines, rectangles, arcs, circles and ellipses.
Create MText objects.
Inserts block references into the drawing.
Rotates created objects in three axes.
Assigns properties to objects: color, layer, material, name, kind, info.
If non-existent layers or materials are specified, the program will look for them in the drawing template or automatically create new ones.
Drills holes in solids using the Drill command.
Creates new blocks or named groups. For blocks, use the Create Assembly (AsmCreate) command. And these blocks can immediately be inserted into the model at specified points.
Can invoke the Expose Asseblies command on created blocks.
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.
Before calling the BoxFromTable command, create an Excel or CSV table with columns:
A Shape: solid shape: Box, Cone, Cylinder, Pyramid, Sphere, Block. Another word is the line is ignored.
B X-coordinate of insertion of the minimum point of the box or the center of the base of other shapes.
C Y.
D Z.
E SizeX: dimensions of the solid along the X axis. For a block, this is the scale along the X axis. A scale less than zero is a mirror block.
F SizeY.
G SizeZ.
H RotateX: rotation of a solid or block around the X axis relative to the insertion point. degrees,
I RotateY.
J RotateZ.
K Owner: name of the group or new assembly block for this part. To insert into model space, specify Model.
L Layer: layer.
M Color: name of the color. Look in the AVC Properties Palette to see how indexed or RGB colors are described in text.
N Material: material. Can change the solid color if the AVC Properties Palette is configured to assign color by material.
O Texture (Grain): Specify along which side of the part the material pattern (wood grain) is directed: "along" or "across". Texture names depend on the plugin localization and are configured in the Common Options. You can also specify the coordinate axis along which the texture should be directed (before the solid is rotated): x or y or z. An empty cell means no texture. Any other word means the texture will be assigned depending on the Grain property of the material.
P Name: The name for the part or the name of an existing block to insert.
Q Kind: grade/type/kind of part. Not used for blocks.
R Info: description of the part. Not used for blocks.
S Commands: list of commands to call for this solid. List the commands separated by commas without spaces. The following commands are implemented: SInt, SUnion, DDJ, TabSlot, DRI. They are executed for all marked objects in the block simultaneously. The order of listing the commands is not important, they will be executed as programmed. You can order the modification of the program to call the commands CRS, FP, IC (for curves), CUnion, CInt, MSL, OSL, ReduceW, AZone.
Columns A-J must be completed. Columns K-R may be missing (starting from the Owner).
Instead of creating a solid, you can insert an existing block into the drawing. Then the columns mean:
Shape = Block.
SizeX, SizeY, SizeZ - block insertion scale. Preferably 1. Less than zero - mirror block.
Owner - the name of the old block (or Model) where the specified block should be inserted
Name - the name of an existing block to insert or the name of a block from a dwt template.
Kind, Info - not used.
All other columns - like for solid.
2D shapes are created in a plane parallel to XY (except for the line). The thickness and type of lines should be set using a layer. Columns for 2D curves:
Shape = Arc, Line, Rectangle, Circle, Ellipse
X, Y, Z - the first point of a line or arc, one of the corners of a rectangle, the center of a circle.
SizeX, SizeY - the relationship of the end point of a line or arc from the first point, distance to second point of the rectangle diagonally, the diameter of a circle, the diameters of an ellipse.
SizeZ - used only in lines and arcs. But the arc is still constructed in the XY plane, and SizeZ is used as the Bulge curvature parameter. For other figures, you can leave the cell empty.
All other columns - like for solid.
To create MText, you must specify the following data:
Shape = Text
X, Y, Z - text insertion point (lower left corner).
SizeY - font height. You can leave it at 0 to use the drawing settings.
Info - content. May contain string formatting characters. For example, \P is a line break in AutoCAD.
SizeX, SizeZ, Name, Kind - not used.
All other columns - like for solid.
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.
The program finds solids that have additional processing commands specified and runs these commands. The Drilling command (DRI) can be called for all solids without any indications in the Commands column.
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. The Expose call should only be used when you are creating blocks (specified by Owner, not Model). But the table does not include insertion of these blocks into the model. In any case, the Expose ignores the setting for counting assemblies in the model and always writes quantity = 1. If you need an Expose of assemblies with real quantities, disable this option and call the Expose command separately. If you do not insert assemblies into the model through the table and disable Expose Assemblies, then you will not see the results of the command: new assembly blocks will be visible only in the list of the block insertion command.
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. However, the object filtering settings of the Expose Assemblies command will be ignored.
Some settings on this page only affect the BoxToWall command.