Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Block Input Value?

Status
Not open for further replies.

mfleming

Technical User
Jul 2, 2003
65
CA
Hello.

AutoCad 2006/2007
I want to use dynamic blocks to switch between the plate sizes we use by getting the user to enter width and heights of steel flat plates.


All plates need to have the base point in the centre.

Is there a way so I can get the user to enter the size of plate he wants ie valueX, valueY?

I have over 20 plates and we keep adding more so I don't want to use the visibility, I'm looking at the Lookup with Stretching or scaling.


I'm sure this can be done easily but I can't seem to figure it out.

Any suggestions?


Matt
 
So if I understand you correctly, you have the different sizes of blocks, but you want to access these different size plates? First of all this ISN'T a super-easy process and I can describe one process.

Double click on the existing block, Edit Block Definition dialog box comes up. make sure your block is highlighted. Also hover your cursor over these new tools that open up. Make sure Block Authoring palette is up.

1)Enter one plate at 0,0 and select explode block in the dynamic block editer. 2)On the paramters tab, click linear parameter. 3) Click on the center of the plate (onsnaps help) 4) Click on the outer edge of the plate. 5)Pull up to and left click to place the distance dimension.

You will see an exclamation point. This means you need to place information in the block to work.

6)Go to the actions tab. 7)click on Scale and it asks to select parameter (which is the distance parameter you added). 8) Select objects which is everything. 9)left click somewhere outside of the block to place the lightning bolt.

9)Left click on the distance dimension and then right click and choose properties. 10) Scroll to the bottom and the two heading in the properties palette you are looking for is "Value Set" and "Misc". 11)Under Value Set, click in the Dist type field and change thru a pulldown to List. 12) Now click in the field below called Dist Value list. 13) You will see three small dots to the right of tht blank field, click on the small button. 14)Add distance dialog box comes up. Enter a number in and click Add. 15) When you are done adding numbers, click Ok. 16) Go down to the next heading called "Misc" and change number of grips to 1 insted of 2.

If you entered several diameters for the plate, click Close block editor button just below the typical CAD toolbars. Save. Now left click on the block so that the grips appear. Left click on the grip and drag it a bit, now type a number which is one of the pre-defined numbers you entered in the properties palette. It will automatically scale.

There is another process, if this isnt what you are after I can tell you of the other.
 
That doesn't work exactly how I was thinking.

The plate sizes we use are ie 4"x6", 4x4, 4x7, 2x7, 3x5 ect. scaling doesn't really work on this.

I'm looking to have to have the plate have and width(X distance) and height(Y distance) so it will adjust the plate from the mid point of the place to the proper distance by selecting/typing in the X (width of plate) and Y (height of place) so I can enter 5,7.. and it will come out as a 5x7 plate. If its too hard to be modified from the centre I could deal with it being modified by the bottom lower left of the plate.

Thanks
 
So you would still place a linear parameter on the X and then the Y, and set a stretch action. Or a XY stretch box parameter set . On each of the properties of the linear dimensions you could enter the several different values. Left click on whichever grip you want and type one of the values you already entered in the properties.

You could also insert all the blocks on top of each other using the visibility parameter. While you couldnt just type in the numeric value, you could select the specific box by using the pulldown menu. Are you aware of how the visibilty states work? I am rather fond of this method. Hopefully this can help. Take Care.
 
I'll try using the xy stretch. I don't want to use visibilty for this particular block because we sometimes use special size plates so then I will have to manualy edit the block to add that to the dynamic block. I love using visibilty state, but not for this.

Thanks
 
I almost have what I'm looking for.

What I have drawn:

Rectangle 1"x1"
Node: (Centred in plate)

Block:
Linear - Distance1 = X (incremental 1") (Bottom of Rectangle)
Action = Stretch1

Linear - Distance2 = Y " " Top of Rectangle
Action = Stretch2

Base Point Paramter = Mid point of 1"x1" plate.


Problem:
When I make the plate bigger using either grips my base point (grip that was centred in plate) moves with the grip I'm using to make it a different size. How do I keep that mid point "grip" centred in plate doesn't matter what size it stretches to?

Thanks

Matt
 
Here is an idea after talking with an associate of mine

1. You can set a pt move parameter set in the node (or center)of the plate.
2. Associate the point move parameter with the node.
3. Redefine the stretch action to include the point move parameter.
4. Click on the point move parameter and select properties and under Misc there is a heading called Chain Actions. Select Yes and Number of grips select 0.

So now you have associated the point move with the stretch action. We need the node to go half the distance when we stretch.

5. Highlight the move action (the lightning bolt) and go to properties. For the Overrides heading, there is a field called Dist Multiplier. Enter -0.500.

I have given you an example only one one side even though you are using two. Hopefully this will steer you in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top