Join Scott Onstott for an in-depth discussion in this video Adding flip and rotate parameters and actions, part of AutoCAD 2013: Customization Techniques.
In this video, you add flip and rotate parameters and their associated actions to a dynamic block. Go ahead and open the Dynamic Block for project file and double-click on the edge of the dynamic block to open the Edit Block Definition dialog box and click OK. Let's go to the visibility state. It says with golden spiral. Select the Parameters tab of the Block Offering pallets, and click Flip. I'd like to add the flip grip down here at the mid point of this lower horizontal edge.
However, there's nowhere to snap to that point, because that midpoint that I want is not the endpoint here of this square, nor is it the midpoint of this lower edge. Instead, it's mid way between the lower corners of the rectangle. So, to properly snap to this, I'm going to hold down Shift and right-click and choose mid between two points. Then I will snap to this lower left corner and then, the lower right corner. Move the cursor up and you can see that it's located in what looks like the right place.
The command line says, specify endpoint of reflection line. Click some arbitrary point anywhere vertically above that initial point, and you'll establish the reflection line. Next, specify the label location, perpendicular, right here. That locates this arrow grip. It has an exclamation point on it, because it doesn't yet have an action associated with it. It's merely the user interface component of this Flip Grip. Click on Actions and then, click the Flip Action, select the Flip Parameter and then, the command line says Select Objects.
Type All > Enter > Enter, the exclamation point disappears and you'll see a tiny flip action appear right here. Next, let's add a new parameter. Click Rotation, it says specify base point. Click the low left-hand corner and then, it says specify radius of parameter. Snap it here to the midpoint of this edge. The default rotation angle will be zero. So, press Enter to accept that as a default.
Again we need to associate an action, so click Rotate, select the Parameter. Now, it says select objects. So I'll Type All > Enter > Enter, and let's see if it works. Close the Block Editor, click Save the changes and tried out, select the Object, and unfortunately we don't see it here in this visibility state. That's something we'll have to correct.
Let's try it out in the width golden spiral state though. I'll click here and it works. How about the rotate grip? Let's try that next, I'll turn off Ortho, click the Rotate Grip, you can see that it works. Great, the next thing we need to do is change the visibility of these objects so that they also appear in the golden rectangle only state. So, double-click on the edge of the block, click OK. And up here, click this button to turn on the Visibility mode, so that you can see the objects which are hidden in the current state. Then click the neighboring button, Make Visible, and then select these objects. I'll make a crossing window around them and press Enter. Then close the Block Editor again, click Save The Changes, and let's see if those grips now appear.
I'll go to the golden rectangle only state and then deed they do. I'd like to rotate this back horizontally, so I'll turn on Ortho and click. I'll go back to the, with golden spiral state. So, you've successfully added flip and rotate parameters and actions to a dynamic block.
- Authoring dynamic blocks
- Configuring plotters and plot style tables for output
- Configuring the user interface
- Creating custom linetypes
- Automating tasks