Showing posts with label Dynamic Blocks. Show all posts
Showing posts with label Dynamic Blocks. Show all posts

Saturday, May 2, 2009

Creating Dynamic Block

Create a Dynamic Door

Insert tab > Block Definition panel > Create Block


Pick lower-left as a base point
Select the door
Make sure "Open in block editor" is checked
Assign Parameter
 

Block  Authoring Palettes - Parameter tab - Linear
 

Position the Linear patameter from left to right
(Sumulates the stretching direction)
 
Block Authoring Palettes - Parameter tab - Flip
 

Shift + Ryght-click - Mid Berween 2 Points
 
Pick point 1 & 2, position the label near point 3
 
BlockAuthoring Palettes - Parameter tab - Alignment

 
Pick point 1, then point 2 to define alignment axis

 
Adjust Value Set
 
Select Distance parameter
 
Distance Description: Adjust door width

Dist type: Increment
Dist increment: 2.0
Dist minimum: 24
Dist maximum: 36
Number of Grips: 1
 
BlockAuthoring Palettes -  Action tab - Scale
 
Select the Distance parameter, Flip State parameter, Arc
[Enter]
Position the Scale label
 
BlockAuthoring Palettes - Action tab - Stretch
 
Select Distance parameter, select the grip on the right

 
Pick 2 points to specify the stretch frame

 
Select 2 vertical lines of the door panel
 
Position the Stretch laber
 
Select the Stretch action
 
Angle offset: 90
 
Douck-click on the Flip State parameter label to assign Flip action
 
Select all objects and parameters
 
Position the Flip action label near the center of Distance parameter
 


Rotate & Flip diverter valve

On the ribbon, Blocks & References tab, Block panel, click Block Editor

  1. In the Edit Block Definition dialog box, select Diverter Valve. Click OK

       2. On the Block Authoring Palettes, Parameters tab, click Rotation Parameter

       3. To specify the base point, select the center of the valve

       4. To specify the radius of the parameter, select a point near the one shown

Right-click anywhere in the drawing. Click Base Angle

        5. To specify the base angle, enter 315

        6. To specify the default rotation angle, enter 90

        7. To specify a label location, position the Rotation parameter, as shown

        8. Select the Angle parameter. On the Properties palette:
  • Under Properties label, for Angle Description, enter Adjust valve position
  • Select List from the Ang Type list
  • Click [...] in the Ang Value List field
        9. In the Add Angle Value dialog box:
  • Enter the values, as shown

  • Click Add
  • Click OK

        10. Press ESC to clear the selection set

        11. On the Block Authoring Palettes, Actions tab, click Rotate Action to add a Rotate action to the Angle parameter

        12. To specify the parameter, select the Angle parameter

        13. To specify the objects to rotate, select the diverter valve object as shown. Press ENTER to end selection

        14. Position the Rotate action, as shown

Add a Flip Parameter Set

  1. On the Block Authoring Palettes, Parameter Sets tab, click Flip Set
  2. To specify a base point for the reflection line, select the endpoint of the centerline

        3. To specify an endpoint of reflection line, select a point on the center line directly above the base point

        4. Position the label as shown

        5. On the Properties palette, for Flip Description, enter Flip valve body position to describe the Flip parameter

        6. Double-click the Flip1 action. Use a window to select all objects and parameters. Press
ENTER to end selection

        7. On the ribbon, click Close Block Editor
        
        8. In the AutoCAD warning dialog box, click Yes to save changes to the Diverter Valve

Use Diverter Valve
  1. In the drawing area, select the block to display its grips
  2. On the status bar, verify that the Ortho mode is turned off
  3. In the drawing area, select the Adjust Valve Position grip

        4. To experiment with different angles, move the cursor around. Notice the value position locks to the angle markers
        
        5. Select the Flip Parameter grip


Using Parameter Set


Using parameter sets is not very different from individually applying parameters and actions

  1. On the basis of the required types of parameters and actions, select the appropriate parameter set

       2. Specify the start point, the end point, and other items required by the parameter set
         

       3. Adjust the parameter and action properties, as required
          

       4. Test the dynamic block
         

Parameter Set Types



Parameter Set

Streamline 简化 the creation of parameters and actions by using a single command to place the required parameter and action


Linear Stretch parameter sets named Stretch and Stretch1 
Linear Move parameter sets named Move and Move1 are added

Associating Actions and Parameters

1. On the Block Authoring palette, click Stretch Action.
2. Select the parameter on the drawing to associate with the action.

3. Click near the parameter point to associate the action with the parameter indicated by the red node symbol

4. Click two points to define the stretch crossing window

5. Select the objects to include in the stretch

6. Select a point to locate the action

NOTE: Verify that the dynamic block is completed.

7. Close the Block Editor to return to the drawing

8. Insert the block into the drawing

9. Select the block, and select the arrow grip
NOTE: The linear parameter is displayed, showing its current value

10. Drag the cursor in the direction of the stretch


Guidelines for Actions

  • Assign at least one action to a dynamic block, Parameters will not function without actions being first assigned to them
  • Base point, alignment, and visibility parameters can be edited dynamically in the block without an action being associated
  • Avoid assigning two or more actions of the same type to the same point on a parameter
  • Use chain actions if the parameter want to be part of an action’s selection set
  • To enable geometry within the block to rotate around a point, set the Base Type property for the rotate action to Independent


Friday, May 1, 2009

Actions Example

It is possible to assign more than one action to a single parameter


Both a Scale action and a Stretch action associated to the Door Width linear parameter
When the Door Width parameter is dynamically edited, it automatically triggers all the actions associated with the parameter

Lookup Action


Enables the creation of a lookup parameter table and the ability to activate a specific line in a lookup table by clicking the associated parameter grip
Parameter associated: Lookup

Flip Action


Allows to flip the block geometry by clicking the associated parameter grip
Parameter associated: Flip

Rotate Action


Allows to rotate the block geometry by dragging the associated parameter grip
Parameter associated: Rotate

Array Action


Enables arraying of block geometry by dragging the associated parameter grip
Parameter associated: Linear, Polar, XY