![](http://thecadaddict.googlepages.com/AutoCAD_2009_icon.jpg)
Català - Castellano
Dynamic blocks are a very important resource to increase productivity. What would require several different blocks can be achieved with a single dynamic one if we know how to give the right editing properties to them.
In this first tutorial we will create a dynamic block for an escalator. The block will be able to be stretched to have different step widths, overall lengths (to cover different floor to floor heights) and some other cool properties.
First of all we have to create a standard block. I got the escalator DWG from Schindler, the block is good enough for the precise height you request it. This is the drawing we will start with.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQdO2DKsAJ14gSk1T3DEWJMlKt5ZfB61LuZb6f-YneJCUDEM_We0GJReS67w99l0pMJe9qgqnlTIPANOqP8gfmnspdPlxWcK345BFKPl9SQpPabgp0tnWCiSsp9AxTpNAvVEqFHg/s400/Escalator+01.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZgFBZsT3-3HEqbX9qqYYcFlcjT9DNIGKjSolQjA43wXzZIFXnznSzgEOupO1skwpI7CzgWTlcdwvBmDGaSy0iqk7qVV74byHMTtTYpJvfJqxZd29W54rJGrW4GzgjmtrgKBnCA/s400/Escalator+02.jpg)
- Click the parameter button
- Select Linear as Parameter Type.
- Select the two edges of one of the steps.
- Choose to show only one grip.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-YLiqHQeEfunTDRbcACEDxc3s-_ck2-S7gOc9r6AyUEAKNIzHkmlF4P1QxnOTv8-UwkpjdyPyjppMKs71c43Vr9oOhMDvS9e1HEtQmMSAzgO_LzF2rJdOwgUmIY8uIR0t50qAQ/s400/Escalator+03.gif)
- Click the Action Button
- Select the Parameter
- Choose Stretch As the Action Type
- Select the Grip
- Select the stretch Polygon (like you would select the objects using the STRETCH command)
- Select the objects to be stretched.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEseAZGyrTbABfD48DAqRdvvF-EE_-mRoMRUP-PVUD6_nMmmedc7vnC70vsdgp9iLvWqaC97KhJe7aaF1p7RxUyPcsZ32e7IHmalrBE0L9lyvzkqkA9-owwwAI8pjLem-zIvYyMA/s400/Escalator+04.gif)
Next we will make the block stretchable in length. This will require more than one action since we not only want to stretch the lines, but also make extra steps appear when we stretch the block.
We will do the following:
- Add a linear parameter to the length of the block
- Add a stretch action to stretch all the lateral lines of the escalator.
- Add an Array action to make new steps when the block is edited.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfXFBs9OygC3hIYn2wW9mK9G9TMHXqhyGqSf3tz8zsj7IdFPe4trwfb9GcgRfzxZZCjcTwz6umweUfSqtTo-SKKZeCkbOZiuet7G2SzS48AJkyqY6O0Gn3r5ZZI34FUqXTzTHf-g/s400/Escalator+06.gif)
We want the step lines to show all the way from end to end of the escalator. We need to add an array action to the same linear parameter that we are using for stretching the block in length. We follow these process:
- Click the action Button
- Select the linear parameter.
- Choose Array as the action
- Select the single step line we have when prompted to select objects
We still want to add a couple more parameters to the block. First we want text and an arrow that shows if the escalator is going down or arriving from the level below. We will use the text DN for going down, and AR for an escalator that arrives to the level we are showing. First we prepare the block for the actions we want to add.
- We type both texts AR and DN on the same exact position.
- We mirror the arrow head so we have a line with arrows on both sides.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha6AR653evgFlf_5mUzA3y-W8sueR_faPKsuw-Hcq1D2U-ctAw62aY6F0OORhMrAkkJ8lI1xkyCQxS0tBpvh8Lz_NTXtOBli5pOdRt1wUzpnsgKu4-NFF1_VNqMRREk57z7PYfjg/s400/Escalator+07.gif)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHiemKR-LU1Bya1Bn3QqYJ0TFqUtZmP4eVzxsGutiB2gOHjZWhRBpXXXNMZ2a56mkUL3pQs76-pHhyphenhyphenltE2C9PmeyAfNU_md8xGb5tECGxuWkjx2RZxPcDmEBPtg7A_VPacBmFsKQ/s400/Escalator+08.gif)
- Toggles objects on other visibility states on and off.
- Makes an object visible in the current visibility state
- Hides an object form the current visibility state
- Calls the visibility states dialog box (where we will create different visibility states)
- first we have to do is click button #4 and create a new visibility state called AR, and rename the existing one as DN.
- Having DN as active visibility state select the AR text and the arrowhead pointing to it and click button #3 to hide them. (the objects will diappear if you didn't click button #1, if you did the objects will be faded)
- Turn AR visibility state active, select DN text and arrowhead pointing away from it and hide them (button #3)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitAtu50e3z0FXkLyrVwtkuOCqENbn5fSGQ9OYGfgVdPNKo0qTzdofqdwkLAC8B1dxJ3SCBTMYrVbLj7XRm5iXIaKfVmTOf7r2dEYOa_UrPg-dSLLmG_a2XztGDSNzNLyPlkVEtFQ/s400/Escalator+09.gif)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnDEy4RU5PAHYVGSfWix3PXm9jfcAB_FMnFZz6zmocaINGKXmL05gzBGFGrNkv0aUIxXhIULT4NT5ItBT_iZZUaIOHIltLzKYDq8oTBhQ4DblkJILZSuMdlXw3vvMhTaOlMS7Vfg/s400/Escalator+10.gif)
The last edit I added to the block is a rotation aprameter and action that allows me to rotate the text to any position I want. The idea is that no matter in which angle the escalator is placed, the text should always be facing the right way. See the image below to understand what I mean..
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1y6yFzlOrsg3i0SbgYCbrv27KJgMJibYxmSBcgjp7WQTg2RCTe8dC9UhPOk2U0_VVRXGw8ao-vojxwLguqTjtRmm4yB7KOwryD2J8uhAuSGM8kkMQLFwInVTd4RXrG-Mi2yREXw/s400/Escalator+11.gif)
If you want to check the escalator file, you can download it here.
Show me more...