Jump to content
amosweing

Dynamic block Array numbering

Recommended Posts

amosweing

hi i"m trying to create a dynamic plan-staircase with step numbers,

the stairs are added by an array command and i could count the total number of stairs by dividing the total distance by width of step.

 

 

stair2.dwg

 

but i want a number on each step ! (using autocad 2014)

Share this post


Link to post
Share on other sites
Dana W

There is something wrong in the drawing. It wants me to open the drawing in the block editor. I cannot save, close the block editor, and insert the block. Once I save the block definition, and close the block editor, stair2 does not exist anywhere. Then, I cannot open the block editor again, at all. The only way I can view or edit the block again is to close without saving and re-open the drawing again.

 

The block testing function does work, however. I am impressed with the bi-directional stretch.

 

I wonder if there is a way to include an attribute in the array that contains a field with the current array element count, or simply an incremental value on each step.

Share this post


Link to post
Share on other sites
dbroada

When I last tried this I couldn't find a way either, although there may be one I haven't discovered so I will continue to watch.

 

I ended up doing much what you have done, just put a total by putting the formula in an ATTDEF and move it with the distance parameter.

Share this post


Link to post
Share on other sites
amosweing

nothing wrong with the file: its an external block (created with wblock) so it has to be called up by a different file to work normally (or just use "test block")

antway, another thought is to use SLtext with field instead of attdef - that way you don't get the useless user-prompt.

but my problem remains: what field defines array number or current distance from start?

Share this post


Link to post
Share on other sites
steven-g

I'm impressed with the block, so I will let you play with this idea, attached is just a simple block that increments a number depending on an array stretch, arraying attributes just on there own is a problem so this uses a nested block. Try and see if you can use the idea.

Counter.dwg

Share this post


Link to post
Share on other sites
Madruga_SP

Fantastic Steven! :)

 

How could you increment a numbers?

 

Congratulations :notworthy:

Share this post


Link to post
Share on other sites
dbroada

yet again, very nice steven. Where do you get all your ideas?

Share this post


Link to post
Share on other sites
steven-g

I just hate not being able to do something so I keep trying, I was one of those kids that took things to pieces, I still do :oops:

Share this post


Link to post
Share on other sites
dbroada
I was one of those kids that took things to pieces,
we've all done that. How were you at putting them back together afterwards?

Share this post


Link to post
Share on other sites
steven-g
we've all done that. How were you at putting them back together afterwards?

You're supposed to put them back together ! :unsure: That sounds novel,

 

 

 

 

 

 

(I do pretty well at that too)

Share this post


Link to post
Share on other sites
amosweing

Thanx Steven!

I finally managed to use your idea by reffering to the Y position of a point in the arrayed block and dividing by the increment.

it took a long time, but i think its finnaly working.

stair3.dwg

i attached the file for anyone who wants (the only constants are the step size=28, and min number of flight=3)

Share this post


Link to post
Share on other sites
steven-g

I'm impressed you did that nicely, glad I could contribute in some small way.

Share this post


Link to post
Share on other sites
Deodar311

How did you do it Steve? I took your file and twisted it every way I could, but I can't figure it out. I see the nested fields within the block, but I cannot duplicate your methods.

 

I would like to change the shape of the block, the direction (vertical) and center the text. I can change some things, but not everything.

 

Could you outline the process?

 

Thanks!

Share this post


Link to post
Share on other sites
Deodar311

Steve - Making progress, but how did you determine the circle (field) should be divided by 20? Every time I try to change the circle to a triangle or other shape, the field returns a null value (#). I have reset the field to polyline (it's a triangle) and divided the field by 3 (the number of sides of the polygon), but still not working.

 

What am I missing?

Share this post


Link to post
Share on other sites
steven-g

The problem you are having is presumably you are deleting the circle. The block shown above has a field formula inside another field and it uses the center point of the circle (a selected object) and it just reads the x value of the circle's position. If you are changing to another type of object then you will need to use that object to read the properties from, the number 20 is just the distance that the array is set to, so the first circle center is at x=20 to make that read 1 it's easiest to just divide by 20 (20/20 = 1) the second circle in the array is then at 40 (40/20 = 2) so the numbers you see are the result of that simple math, it doesn't actually increase the number it just does some math and shows the result, if you want to go vertical then use the Y value of the object and array vertically.

 

If you are changing to a triangle then that isn't a built-in object type but you could read the properties for the end of a line or just place a point as the object to be arrayed.

Share this post


Link to post
Share on other sites
Deodar311

I finally made it work, but it wasn't easy... and it's crude. The trick is copying the block the same distance it will be duplicated. The field I used was POSITION, and then locking the "Y" axis. However when the block is drawn and dragged down, the position resulted in a negative number.

 

To correct this I multiplied it by -1. So the field now looks like this: (-10/10)*-1

 

Thanks for your help Steve!

Share this post


Link to post
Share on other sites
steven-g

Your welcome, it's always nice to hear when someone can further develop and make changes to ideas.

Share this post


Link to post
Share on other sites
iconeo

Interesting approach Steven. I'll keep this one in mind.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...