Dynamic Block Stretch + Array

Dynamic Block Stretch + Array

Anonymous
Not applicable
7,747 Views
22 Replies
Message 1 of 23

Dynamic Block Stretch + Array

Anonymous
Not applicable

Hey Guys,

 

First post, been creeping in the shadows for a while. Anyways, I started messing around with dynamic blocks recently to improve my productivity, and it appears that I've hit a wall, I usually start a block then add dynamic properties to them as I need them. The idea I'm after is that I have a block which can stretch to min or max distance, but then if I want too I can have the stretched object arrayed anywhere from 1/2" to 1 inches away from the previous block. Any ideas on how to do this? One other issue I found that when I select the block attribute definition (A in the case of the attached file), it doesn't want to array it for some reason. I feel like someone has done it before, but I just haven't been able to find anything that correctly describes what I'm after.

The short description of what I want it to do.

Stretch Min = N/A Max 60" (I know that this need to just be set as a parameter in the stretch command just haven't gotten around to it)

Rotate the block and attribute separately (I already have this done so I'm hoping it can just modify the selection to work with the array once I have that figured out)

Array the stretched blocks at an increment of 1/2"-1" from the previously stretched portion separately.

 

In the future I would also like to add a dimension to this with two - three visibility filters where the first stretched block shows the dimension and adjacent gap but misses it for the remaining items except for the last gap and panel. Also maybe an overall dimension fo the entire block associated with the array. Maybe you guys could point me in the right direction to a write up where I can find out how to do this in more detail.

 

Thanks in advance for any help you guys could provide.

0 Likes
Accepted solutions (1)
7,748 Views
22 Replies
Replies (22)
Message 2 of 23

Anonymous
Not applicable

Hey,

 

I couldn't do it then I searched the board and got to this post from Libbya that talks about it.

 

As far as I understood, you want to change the column offset (panel with in your case) in the array dynamically. Well as Libbya says this is not possible unless you play with visibility state.

 

http://forums.autodesk.com/t5/dynamic-blocks/dynamic-stretch-equally-and-array/m-p/6237516#M20028

 

I played with the block for an hour but no success 😞

 

Cheers,

Behzad

 

Stretch and Array.jpg

0 Likes
Message 3 of 23

Anonymous
Not applicable

Cheers for the attempt Behzad. Yeah, I've been messing around with it on and off for the past year trying to get it to work with no luck. I ended up doing more research on it after I made my post and it looks like what I want it to do is beyond the ability of the Autocad which seems strange. In theory, the function of an array should just work based on the stretch command and whatever parameter it is set to. Maybe it's a coding issue AutoCAD never addressed, but it would increase the parametric power within the function of a block.

 

Something along the lines of:

Array distance = d1(stretch) + 1"

where d1 is the length of the panel that is manipulated by the stretch


The way I deal with it now is by stretching the block to what I need it to be and then arraying it along a path set to a distance (stretched panel size + 1"). If I could get it to work, it would improve the efficiency of the block in repetitive task since it replaces three commands every time I use the block with a unique dimension. It's a shame that the stretch action can't be added as an expression in the column offset for the array attribute.

After searching the threads the best I could find is messing around with the LISP to introduce an FSA file to create a DBR command based on (((IF IF) (THEN THEN)) ((IF) (THEN)) ((IF IF) (THEN))). Won't have time to mess around with this until later on this month.

http://forums.autodesk.com/t5/dynamic-blocks/array-variable-column-offset/td-p/1834799

I think the visibility states is an overcomplicated solution to the problem since the length of the path can be anywhere from 4' to 180' and the panels varying in size between 24 and 60 inches at 1/8 increments.

Message 4 of 23

Anonymous
Not applicable

Thanks for reply.

 

I do exactly what you said with my blocks if I want a repeat in a row. (Do all changes then array.

 

About visibility I agree that the number of possibility is so many.

 

Just one thing, why didn't you choose the base point of the rotation of the panel to be the left side at the middle? After you stretch the panel and you rotate it it goes out of base point. Just an idea and I hope you like the changes I did in attached.

 

Some changes I did:

 

1- Added names and descriptions to your parameters so I can explain below and also other users get ideas as soon as they see your block

2- Changed the centre of rotation of the panel

3- Included Flip in your Panel Rotation Parameter so after you rotate panel, Flip rotates with it

4- Included Rotate Letter Only in your Flip action so the rotating point of text flips with it

5- Included Rotate Letter Only in your Move Parameter so the text moves with stretch

6- Included Rotate Panel and Letter in Panel Width Stretch action so grip moves with stretch

 

By the way to be able to do these easier you may know that you can set bactionbarmode to 0.

 

Cheers,

Behzad

 

Bactionbarmode is zero.jpg

 

0 Likes
Message 5 of 23

DSebulsky
Participant
Participant

@Anonymous

 

I know this is an old thread, but I recently created a dynamic block with a changing column offset.

 

The trick is using Dimensional Constraints instead of Parametric Constraints. I have an array with the Columns and Column Offsets tied to equations, something you can only do when the variables are dimensional constraints. 

 

Just beware, you have to be careful not to over constrain the block. The attached drawing is after I remade the block with cleaner constraints. 

0 Likes
Message 6 of 23

bradley_minger93J6Y
Participant
Participant

@DSebulsky

 

I know this is an old post, but this is exactly what I've been looking for! The only thing I'd like to add to make it "extra perfect" would be making it so that the grips can lengthen the part in both directions instead of just one. Do you know if that is possible? I played around with it for a while but unlocking the "fixed" constraint causes weird behavior.

0 Likes
Message 7 of 23

Brock_Olly
Collaborator
Collaborator

Should be possible, though the block you refer to is constrained weirdly because they use a beginning and end block, can you share a drawing of your situation and what you want to accomplish? 

0 Likes
Message 8 of 23

bradley_minger93J6Y
Participant
Participant

I've attached my drawing - it contains 2 blocks. The bottom one ("dimensional constraints") is the one I originally asked about. I made it like DSebulsky did but just used a polyline instead of 2 end blocks. If I can get this one to stretch in 2 directions (lengthwise) it would be perfect.

 

The first one ("parameter stretching") was my first attempt at this before finding this post.

Message 9 of 23

h_s_walker
Mentor
Mentor

@bradley_minger93J6Y here you go.

You don't need two stretch parameters, just one will do with the basepoint set as the middle. See the image below and the attached drawing

h_s_walker_0-1741102144557.png

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 10 of 23

Brock_Olly
Collaborator
Collaborator

Well, turns out it was harder than I thought.
I got two versions, both not perfect. I moved the base point to the middle and divided the parameters by 2.

 

I was close to succeeding keeping the basepoint on one side with two grips but the constraints worked against me, I'm sure someone smarter than me can do it though.

0 Likes
Message 11 of 23

bradley_minger93J6Y
Participant
Participant

Hi @h_s_walker,

 

Thank you for the response. That works, but I was hoping to be able to stretch either right or left independently while maintaining the centered hole pattern. Stretching both sides of the block equally at the same time doesn't suit my use-case unfortunately

 

The hole pattern is always centered in the bottom block (dimensional constraints), but I could only get the stretch to work in one direction. Is there a way to make either of these blocks be stretchable from the right OR left and maintain the centered pattern?

0 Likes
Message 12 of 23

h_s_walker
Mentor
Mentor

If I'm sort of understanding you want the basepoint to stay in the middle of the block and when you do a vertical stretch the holes are to stay in the middle?

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 13 of 23

bradley_minger93J6Y
Participant
Participant

Sorry if I'm explaining it poorly. In my ideal world I could do the following:

1. Use a grip to stretch to the left

2. Use a grip to stretch to the right

3. Whichever direction it stretches, the holes stay 4" apart and the end holes are centered along the length of the part.

4. I don't really care where the basepoint ends up, but if it could always stay on the top left of the part that would be a bonus.

 

The trick with 1 and 2 is I want to be able to go either direction at a time, not just have 2 grips that both stretch the block outward from the center. Does that make it clear?

0 Likes
Message 14 of 23

timothy_crouse
Collaborator
Collaborator

Currently dynamic blocks do not support a dynamic array offset.  To get that sort of functionality you would have to use a standard array, array path works good for that.

 

Per Libby's post link'd another approach is to use a dynamic block with multiple visstates each having a dedicated array spacing.

 

Considering you would like to add multiple visstates for various dimension displayed you may want to consider using a "Block Properties Table"  It allows you to add STRING filters essentially allowing you to create a menu system which allows visstates to be displayed and lengths to be set of the controls included as a parameter in the table.

 

Best Regards

-Tim C.

0 Likes
Message 15 of 23

Brock_Olly
Collaborator
Collaborator

Did you check out the blocks I posted?

0 Likes
Message 16 of 23

bradley_minger93J6Y
Participant
Participant

Hi Brock,

 

I did, thank you for those. Unfortunately, they lengthen the block in 2 directions, positive and negative x, at the same time. I want to be able to control the stretching in each direction independently.

0 Likes
Message 17 of 23

doni49
Mentor
Mentor

The attached does similar to what it sounds like you're trying to do.  Maybe it'll help.

 

The length parameter set to be an INTERVAL type with the interval being 9 units.  In my world, this would be used for a parking bay on a parking lot -- we typically place the parking stripes 9ft apart.  As you use the grip, it moves in 9 unit increments and adds a line at every 9 units.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes
Message 18 of 23

j.palmeL29YX
Mentor
Mentor
Accepted solution

Try the attached attempt. 

 

[EDIT): Attachment edited - new (better?) version added.

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 19 of 23

Brock_Olly
Collaborator
Collaborator

Beautiful, well done!

0 Likes
Message 20 of 23

bradley_minger93J6Y
Participant
Participant

This is exactly what I was hoping for, thank you! Out of curiosity, what's the difference between the dynamic rotated dimension and the dimensional parameters within the block? I've tried googling and can't find a solid answer. They seem to do the same thing with the dimensional parameters having the added feature of "grips" to edit from.

0 Likes