DWG Block Editor – Advanced Custom Block with Parametric Size and States

The new Custom Block Editor of ARES Commander helps you to create smarter blocks. In this video we show how to use grips and parametric actions such as Move, Scale, Stretch, Rotate, Pattern, or Mirror. You can also create custom blocks with different states having elements that are hidden or shown. Combining multiple of these grips and actions allows you to create much smarter blocks. One custom block may replace tens of the blocks you currently use which will significantly increase your productivity.

The goal of this video is to combine “Stretch”, “Pattern” and “Visibility” activities into the same custom block. In this way, not only will we be able to change the type of door, but also the fence will change accordingly, and we will keep at the same time the possibility to resize the length of the fence dynamically. Now let’s add a new type of fence. This time with iron bars that should appear only when we choose this type of doors that also contain iron bars.

With the rest of the doors, the fence that we have currently configured will be displayed.We cut the entities of the iron bar using the key combination Control + X. We edit the Custom Block with a double click, and paste it with Control + V. We open the visibility states. We are going to select the first state and we are going to turn it into the current one. If you pay attention, you will see that all types of doors are visible at the same time. This is because the first of the icons is active. We deactivate it with a click.

For example, in the first visibility state we have to hide the new fence.In the next state, the fence does not appear, so we should not change anything. We go to the third, where we also have to hide it.

In the fourth option, it is where the fence has to be seen, and we can verify that it is “hidden”. First we click on the first icon to show hidden elements. Now we select the fence and make it visible that way. Disable the option to show assets and hidden. We change to the fifth state of visibility where we do not want the new fence, nor in the last state of visibility.

The truth is that in the visibility status “Metal Door with Bars”, although we want to see the new fence, we have to hide the previous one of wood. That’s why we select the wooden fences and hide them. In its place should be the new fence with metal bars. That is why we move it to one of the places and we copy it on the other side. We close the block. We keep the changes, and we test it. We select the block and change the visibility states.

We see that the wooden fence appears with all the door options, except when we choose the door with metal bars. Since in this case, as we had anticipated, you can see the new metal fence. However, it still does not adapt to the grip that allows the wall to be resized. So using the knowledge we acquired in a previous video, we will edit the Custom Block to make the fence also grow at the same time as the wall. We edit the Custom Block with a double click.

Basically we have to do the operations we have here again.We select “pattern”, we indicate the element “Distance1”, and then we choose the elements that are part of the copy. We define the distance of the copy with 2 points, and it is resolved.

Now let’s create the “Stretch”. We indicate again the element “Distance1”, we click to indicate the point of origin of the action and now we indicate the area that will be affected by the “Stretch”. It will only be necessary to select the part located in the new fence, since the lines of the wall have their own “Stretch” applied already.

Now we select these entities.We close the block, save the changes, and test it. As you can see, it is created perfectly. Now we have to perform the same operation at the other end of the wall. We select “pattern”, we indicate the “Distance2” element, and we select the entities that are going to be copied and we indicate the distance of the copy.Now the “Stretch”. We select the element “Distance2”, we indicate the point. We define the area of the “Stretch” and select the entities. We close the block and save the changes. So we have a much more powerful block.

Now when selecting another type of door, the fence is again made of wood, but … as soon as we select the type “Metal Door with Bars” the wooden fence disappears, in favor of the fence with iron bars.

In addition, we keep with the possibility to adjust dynamically the size of the fence no matter if it is a wooden or metal one. Our custom block now combines visibility options with “Stretch” and “Pattern” actions.

To learn more about ARES Commander and other products, be sure to visit the website.