Assembly

По русски

Plugin AVC_Assembly for AutoCAD and BricsCAD

Combine parts into a block assembly. Give the block an automatic name based on a pattern with a sequential number.

Replace the block with a new one while maintaining the attribute values.

If you use blocks as assemblies to combine parts, then this program will help you speed up your work. The AVC_Assembly plugin includes two commands for quickly creating new blocks. 

The Create Assembly (AsmCreate) command creates a new block from a set of arbitrary objects. The program will allow you not to waste time thinking up and entering the name of the block. Blocks are named in a progressively numbered pattern. Moreover, the number of the next assembly is remembered in the properties of the drawing.

And the command New Assembly (AsmNew) creates a new block from one or more references to the old block. This command will be useful when you have already inserted many identical assemblies into your drawing, but you need to change some of them. For example, in several sections of the walls, it is necessary to make channels for an electrician, and leave all the rest unchanged. Now you can separate these sections into blocks with a separate number and all this will happen in 1 click. The command will also be useful when you have inserted mirrored or scaled assembly-blocks into the drawing, but now you want to use them for LAY or for drawing up a Sawing table. Just call AsmNew and all these assemblies will be replaced with new ones inserted at a 1:1 scale.

Features of the program:


Note: The program has nothing to do with BricsCAD Mechanical assemblies and components.

Regardless of the AutoCAD|BricsCAD localization language, you can switch the plugin to English, Russian, Italian, German, Chinese localization.


Read about downloading and installing the program here.

To run the plugin, you will have to register account and top up your account balance by making a donation or receiving bonuses.

Then you can activate one of the licenses:

Working with the Create Assembly (AsmCreate) command

If the rotation and the base point are set according to the current coordinate system, then before calling the command, you must first set up the user coordinate system (UCS) as you would like the details to be stored inside the block.This is how new blocks will be inserted later. 

Select the parts you want to combine into a block. These can be any drawing objects. But the program will not work with distorted blocks (different scales on different axes) and with objects on locked layers.

Call the AsmCreate command.

If no objects have been selected yet, the command will ask you to select objects. In the selection prompt, you will see options for quickly switching styles and for opening the customization dialog.

Further, the program can request two points to rotate objects inside the block. The points will define the X-axis direction of the block's internal coordinate system. All objects will be rotated around the Z axis. By default, these points are not requested and the program searches inside the block for a solid with the largest surface and orients itself to it as a facade.

The program can request one more point, which will be taken as the origin of the block coordinate system. It is at this point that the grip by which the block is dragged will be displayed. By default, this point is not prompted, and the program itself selects a point among all grips of all parts. Lower left grip is preferred.

Then the program itself creates a new name from the template. From the Number_of_assemblies property, the number of assemblies in the drawing is taken and added to it 1. And this number is substituted into the template instead of %row%. If such a block already exists, the program takes the next number. In any case, you do not need to enter the name of the new block.

Then the program creates a block, copies all objects into it, deletes old objects and optimizes the objects in the block.

If invalid or faulty objects are found, the program will write about it to the command line.

The program will check all solids and delete their history. Optionally, the program can convert all meshes to solids, explode all arrays and nested blocks, transfer all objects to "0" layer, glue all solids into a single one. Hole and Info layer objects do not change the layer and are not glued.

The program can measure the block and record the dimensions and weight in the attributes. In this case, the measurement is made before gluing the solids and before replacing the layer. Any mutable and constant attributes can also be added.

The program creates and places inside the block Multi-texts with the name of the block.

If required, the block is marked as non-explosive.

At the end of the work, the program inserts a new block into the drawing in place of the parts and causes drawing regeneration.

Watch the command line for important information.

Working with the New Assembly (AsmNew) command

Select 1 or more blocks that you want to make a different, new block. These can be scaled or mirrored blocks. To use them as assemblies for a LAY or Sawing Table, all parts must be transferred to a new block.

Call the AsmNew command.

If nothing is selected, the program will ask you to select the blocks. The program will not work with distorted blocks (different scales on different axes) and with blocks on locked layers.

Unlike AsmCreate, this program does not unfold the objects in the block, does not request either the X axis or the base point - the settings of the old block are always used.

The program explodes the first block of the selected ones. This way you get scaled or mirrored parts in the new block.

Then the program creates a new block according to the same rules as for AsmCreate and inserts it in place of the old one at a 1:1 scale.

The program reads all the changeable attributes of the old block and copies them into the new block.

The command will perform all the actions configured for AsmCreate: create labels with the name of the block, convert all meshes to solids, call measurement and create attributes, explode nested blocks, glue solids, change the layer of objects, lock block explosion.

Then the program goes through all the other selected blocks and does the same with each of them separately. The cycle can be interrupted by pressing Esc.

If there is another reference to the same block, and on the same scale, then the program will not create another new block, but uses the one created earlier. That is, extra assembly numbers will not be used. But if the block is inserted with a different scaling or is mirrored, then a new assembly with the next number will be created.

Dynamic blocks and BricsCAD Mechanical components will no longer be dynamic, but will become regular blocks. For each instance (variant of parameters) of a dynamic block, its own separate regular block will be created, and blocks with other parameters will remain untouched. For example, you have a drawer in the form of a dynamic block with meshes and parameters for stretching this drawer to the desired size. You will be able to insert this unit into the cabinet many times, adjust the size parameters, get several sizes of drawers. Then, select them all, call AsmNew and you will get all these blocks as normal assemblies with solids. And you can immediately call Export to DXF or design Detailing.

Watch the command line for important information.

Settings

The settings are common for both AsmCreate and AsmNew commands for creating assemblies. The command customization dialog can be invoked while selecting objects using the TUNE option. You can also customize the commands in the AVC Options Palette or through the main AutoCAD settings dialog (command _Options).

In the settings header, you see a drop-down list for selecting a set of settings (style). The style number is used to quickly switch from the command line when prompted to select objects. There is a button for adding a new style next to the list. The new style is created by copying the current one. You can create up to 9 styles. Any style, except the 1st one, can be deleted.

Initially, 3 styles were programmed: 

Style name

The name of the preset. Not used anywhere. For convenience only.

Name template

Assembly name pattern. The template must contain the %row% substitution. The new assembly number will be inserted at this location. The program uses the drawing property Number_of_assemblies and adds 1. If the name is already taken, the program will increment the number until it finds a free name. The substitution can be formatted as a Roman numeral or as an alphabetical letter. Read more about substitution formatting here. Also, the template can contain any text and any substitutions of drawing properties, date and time. For example file name or drawing number. You can also specify the properties of the objects from which the block will be created. But keep in mind that if different objects had different properties, then all options will be listed or the word Different will be substituted (depending on the settings). For the AsmNew command, you can use substitutions for all the properties of the old block, including the old block name, including you can substitute part of the old name using the substr function.

Keep block number

Save the number assigned to the block-assembly for numbering the next assembly. The number is stored in the custom drawing properties. If the option is disabled, then the program will always look for unused numbers starting from 1. This will allow using the remote assembly number and using the same numbers in different styles and different assembly name templates.

Next number

Substitute this number in the block name instead of substituting %row%. This number is stored in the drawing properties and is not associated with a settings style.

Base point

These radio buttons allow you to select the location where the origin of the new block will be placed. With the further insertion of new links to this block, this is the place where the "grip" of the block will be. These settings only work with the AsmCreate command, not with AsmNew. The AsmNew command always retains the old base point of the block.

On the bottom grip

Select base point automatically on the bottom left 'grip' of all block objects. Grips are the blue squares that AutoCAD draws on all important nodes of drawing objects. The program will go through all the grips of all objects and find the bottom one. And among the lowest ones is the point with the minimum X and Y coordinates. This method of selecting the insertion point ensures that the block handle is on one of the block objects and not in an empty space.

In the center

Select the base point automatically in the geometric center of the new block.  There may not be a single object at this point. In most visual styles, the handle at this location will not be visible behind the opaque edges of the solids.

In the center of the bottom

Select a base point automatically in the geometric center of the new block and project this point to the very bottom of the block dimensions. There may not be a single object at this point.

Base point query

The program will ask you to specify the base point of the block. The zero of the block's coordinate system will be moved to this point.

UCS origin

Set the base point of the block to zero of the current user coordinate system (UCS). The coordinate system must be adjusted BEFORE calling the AsmCreate command.

WCS origin

Assign the base point of the block to the zero of the world coordinate system. That is, do not move the base point anywhere at all.

Rotation

These radio buttons let you choose how the block will be rotated in its internal coordinate system. This is how new blocks will be inserted into the drawing. These settings also only work with the AsmCreate command. The AsmNew command always keeps the position of the objects as it was in the old block.

Facing forward

Rotate the block around the Z-axis so that the largest flat surface is turned in the opposite direction of the Y-axis. For flat blocks, the longest line will be found and it will be expanded along X. It is not recommended to use the option in complex assemblies, since it will take a long time to iterate over all faces of all solids. When choosing the largest face, preference is given to surfaces marked with a color as an front. Among surfaces of equal area, preference will be given to flat surfaces, coated surfaces, surfaces turned up in the Z axis, back in X and back in Y in the world coordinate system.

X-axis request

The program will ask for two points for the x-direction of the block's internal coordinate system. The Z axis will be taken from the world coordinate system WCS.

By current UCS

Leave the block's coordinate system as the current user coordinate system (UCS). This option allows you to create blocks with arbitrary rotation along all axes, just rearrange the coordinate system as you need. The coordinate system must be adjusted BEFORE calling the AsmCreate command.

Use WCS (do not rotate)

Leave the block coordinate system as is, without rotations,  as it is in the world coordinate system (WCS).

Label on Front

Create a multi-text inside the block with the name of the block. Place this text in front of the block in the XZ plane of the block's coordinate system. The multitext will be placed on the non-printable Info layer. Such a label will allow you to easily find blocks in the model, but it will not interfere with the printing of assembly drawings. Multitext always has the "frame" property enabled, meaning it will be outlined in a rectangle.

Flip front mark

Place the front mark on the back side upside down. An option has been made to convert dynamic wall blocks modeled in a lying position. The problem is that dynamic blocks with meshes can only be stretched in X and Y, and the walls have to be modeled lying down. When the block is verticalized, the front mark is at the bottom of the wall. When this option is enabled, the front mark will be on top of the wall.

Label on Top

Create another multi-text inside the block with the name of the block. Position this text above the block in the XY plane of the block's coordinate system. That is, the program allows you to create one or two marks in the block in different planes in order to see them from different sides.

Use Field for block name

Use an auto-updating 'field' to retrieve the block name. If the option is disabled, then the labels will contain plain text and it will not change when the block is renamed. Fields creation does not work in BricsCAD and this option is hidden. There is a known bug in AutoCAD - if a block contains text with a block name field, then the in-place block editor does not work. Therefore, if you use block editing "in place", then disable this option. If you see #### instead of a label, then issue the UPDATEFIELD field update command

Style

Text style for block labels. Enter an empty string to use the current text style.

Height

The text height for block labels. Enter 0 to have the program adjust the text height based on the block size. In this case, all labels will be of different sizes.

Block metric

Call the Block Metric command to measure the dimensions, weight and price of the block and create invisible attributes in the block, both constant and changeable.

Convert mesh to solid

Call the MeshToSolid command to try to convert all SubDMesh and PolyfaceMesh into solids. Only meshes directly included in a block are processed, but not meshes in nested blocks. This option is very useful for converting dynamic blocks with stretchable meshes into regular blocks with solids.

Save invisible objects

If there were invisible objects in the old block (disabled by the visibility parameter), then save them to the new block. The option is disabled by default so that dynamic block objects that are disabled by the visibility parameter do not end up in the new block. This allows you to create lightweight, compact drawings.

Explode all blocks

If you plan to combine other blocks or arrays into an assembly, the program can explode them all, including nested blocks.

Assign "0" layer 

The program can assign 0 (zero) layer to all objects. 0 layer is used inside blocks to inherit layer properties from a block reference. That is, instead of the ByBlock layer. After that, you can change the color of the objects by changing the layer of the link to the block. Objects of Holes and Info layers are never transferred to layer 0. If the Block Metric program was called at the same time, then further measurement will be automatically prohibited.

Unite solids

The program can combine all the solid inside the block into one big solid. This will drastically simplify the block geometry and greatly improve the performance when displaying many blocks. However, you will lose the ability to extract parts and correctly calculate the amount of materials, weight and price of an assembly consisting of different parts from different materials. If the Block Metric program was called at the same time, then further measurement will be automatically prohibited.

Forbid explode the block

Mark the block being created as non-explodeable . A>V>C> plugins treat explodeable blocks as assemblies, and non-explodeable ones as ready-made purchased items (products).

Style name

The name of the preset. Not used anywhere. For convenience only.

Name template

Assembly name pattern. The template must contain the %row% substitution. The new assembly number will be inserted at this location. The program uses the drawing property Number_of_assemblies and adds 1. If the name is already taken, the program will increment the number until it finds a free name. The substitution can be formatted as a Roman numeral or as an alphabetical letter. Read more about substitution formatting here. Also, the template can contain any text and any substitutions of drawing properties, date and time. For example file name or drawing number. You can also specify the properties of the objects from which the block will be created. But keep in mind that if different objects had different properties, then all options will be listed or the word Different will be substituted (depending on the settings). For the AsmNew command, you can use substitutions for all the properties of the old block, including the old block name, including you can substitute part of the old name using the substr function.

Keep block number

Save the number assigned to the block-assembly for numbering the next assembly. The number is stored in the custom drawing properties. If the option is disabled, then the program will always look for unused numbers starting from 1. This will allow using the remote assembly number and using the same numbers in different styles and different assembly name templates.

Next number

Substitute this number in the block name instead of substituting %row%. This number is stored in the drawing properties and is not associated with a settings style.

Base point

These radio buttons allow you to select the location where the origin of the new block will be placed. With the further insertion of new links to this block, this is the place where the "grip" of the block will be. These settings only work with the AsmCreate command, not with AsmNew. The AsmNew command always retains the old base point of the block.

On the bottom grip

Select base point automatically on the bottom left 'grip' of all block objects. Grips are the blue squares that AutoCAD draws on all important nodes of drawing objects. The program will go through all the grips of all objects and find the bottom one. And among the lowest ones is the point with the minimum X and Y coordinates. This method of selecting the insertion point ensures that the block handle is on one of the block objects and not in an empty space.

In the center

Select the base point automatically in the geometric center of the new block.  There may not be a single object at this point. In most visual styles, the handle at this location will not be visible behind the opaque edges of the solids.

In the center of the bottom

Select a base point automatically in the geometric center of the new block and project this point to the very bottom of the block dimensions. There may not be a single object at this point.

Base point query

The program will ask you to specify the base point of the block. The zero of the block's coordinate system will be moved to this point.

UCS origin

Set the base point of the block to zero of the current user coordinate system (UCS). The coordinate system must be adjusted BEFORE calling the AsmCreate command.

WCS origin

Assign the base point of the block to the zero of the world coordinate system. That is, do not move the base point anywhere at all.

Rotation

These radio buttons let you choose how the block will be rotated in its internal coordinate system. This is how new blocks will be inserted into the drawing. These settings also only work with the AsmCreate command. The AsmNew command always keeps the position of the objects as it was in the old block.

Facing forward

Rotate the block around the Z-axis so that the largest flat surface is turned in the opposite direction of the Y-axis. For flat blocks, the longest line will be found and it will be expanded along X. It is not recommended to use the option in complex assemblies, since it will take a long time to iterate over all faces of all solids. When choosing the largest face, preference is given to surfaces marked with a color as an front. Among surfaces of equal area, preference will be given to flat surfaces, coated surfaces, surfaces turned up in the Z axis, back in X and back in Y in the world coordinate system.

X-axis request

The program will ask for two points for the x-direction of the block's internal coordinate system. The Z axis will be taken from the world coordinate system WCS.

By current UCS

Leave the block's coordinate system as the current user coordinate system (UCS). This option allows you to create blocks with arbitrary rotation along all axes, just rearrange the coordinate system as you need. The coordinate system must be adjusted BEFORE calling the AsmCreate command.

Use WCS (do not rotate)

Leave the block coordinate system as is, without rotations,  as it is in the world coordinate system (WCS).

Label on Front

Create a multi-text inside the block with the name of the block. Place this text in front of the block in the XZ plane of the block's coordinate system. The multitext will be placed on the non-printable Info layer. Such a label will allow you to easily find blocks in the model, but it will not interfere with the printing of assembly drawings. Multitext always has the "frame" property enabled, meaning it will be outlined in a rectangle.

Label on Top

Create another multi-text inside the block with the name of the block. Position this text above the block in the XY plane of the block's coordinate system. That is, the program allows you to create one or two marks in the block in different planes in order to see them from different sides.

Use Field for block name

Use an auto-updating 'field' to retrieve the block name. If the option is disabled, then the labels will contain plain text and it will not change when the block is renamed. Fields creation does not work in BricsCAD and this option is hidden. There is a known bug in AutoCAD - if a block contains text with a block name field, then the in-place block editor does not work. Therefore, if you use block editing "in place", then disable this option. If you see #### instead of a label, then issue the UPDATEFIELD field update command

Style

Text style for block labels. Enter an empty string to use the current text style.

Height

The text height for block labels. Enter 0 to have the program adjust the text height based on the block size. In this case, all labels will be of different sizes.

Block metric

Call the Block Metric command to measure the dimensions, weight and price of the block and create invisible attributes in the block, both constant and changeable.

Convert mesh to solid

Call the MeshToSolid command to try to convert all SubDMesh and PolyfaceMesh into solids. Only meshes directly included in a block are processed, but not meshes in nested blocks.

Explode all blocks

If you plan to combine other blocks or arrays into an assembly, the program can explode them all, including nested blocks.

Assign "0" layer 

The program can assign 0 (zero) layer to all objects. 0 layer is used inside blocks to inherit layer properties from a block reference. That is, instead of the ByBlock layer. After that, you can change the color of the objects by changing the layer of the link to the block. Objects of Holes and Info layers are never transferred to layer 0. If the Block Metric program was called at the same time, then further measurement will be automatically prohibited.

Unite solids

The program can combine all the solid inside the block into one big solid. This will drastically simplify the block geometry and greatly improve the performance when displaying many blocks. However, you will lose the ability to extract parts and correctly calculate the amount of materials, weight and price of an assembly consisting of different parts from different materials. If the Block Metric program was called at the same time, then further measurement will be automatically prohibited.

Forbid explode the block

Mark the block being created as non-explodeable . A>V>C> plugins treat explodeable blocks as assemblies, and non-explodeable ones as ready-made purchased items (products).