Dynamic Block Array Numbering

Dynamic Block Array Numbering

noe_pardoen
Contributor Contributor
1,349 Views
13 Replies
Message 1 of 14

Dynamic Block Array Numbering

noe_pardoen
Contributor
Contributor

Hi everyone,

 

I have a question about automatically numbering an array within a Dynamic Block in Autodesk. I want to shift a line by 500 mm using the array, with the numbers updating automatically so it's easy to see the number of points—think of it like a ruler.

 

The numbering should start at 0 and continue in both directions: up to -15 to the left and up to 130 to the right. I'd like the numbers to update automatically without needing to adjust them manually.

 

Could someone explain how to set this up in a Dynamic Block? I’d really appreciate any help!

 

Thanks in advance!

0 Likes
1,350 Views
13 Replies
Replies (13)
Message 2 of 14

h_s_walker
Mentor
Mentor

Try one of the two threads below for an idea

Solved: AUTO NUMBERING FOR DYNAMIC BLOCK CAR PARKING - Autodesk Community - AutoCAD

Solved: auto-number array in dynamic block - Autodesk Community - AutoCAD

 

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 3 of 14

noe_pardoen
Contributor
Contributor

Thanks for the response! Unfortunately, I still don’t fully understand the instructions. When I try to follow the steps and adjust the drawings as described, all the numbers reset back to 1 instead of continuing the count.

 

Could someone explain this in a different way or provide more details on how to keep the numbers in sequence within the array?

 

Thanks again for the help—I really appreciate it!

 

0 Likes
Message 4 of 14

noe_pardoen
Contributor
Contributor

I keep reading about using formulas, but I honestly have no idea how they work or where I’m supposed to enter them.

I can’t seem to get the tab to open either.

0 Likes
Message 5 of 14

h_s_walker
Mentor
Mentor

@noe_pardoen Look at the drawing in the post below and the explanation in the later post as well

Solved: Re: AUTO NUMBERING FOR DYNAMIC BLOCK CAR PARKING - Autodesk Community

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 6 of 14

noe_pardoen
Contributor
Contributor

Hello,

I’ve tried to solve this by using the Enhanced Attribute Editor and Field with a formula, but I don’t understand why the numbering isn’t working. Here’s what I’ve done so far:

I selected the object (the block of the girder line).
Then, I set the distance to 1.
After that, I used the field to input the formula 500 - 499 so that it can start counting, but I’m not sure what to do next.
Can you help me figure out why the numbering isn’t moving forward as expected and guide me on the next steps?

0 Likes
Message 7 of 14

j.palmeL29YX
Mentor
Mentor

The following video should give you an understandable start for your work. 

 

 

 

HTH

 

 

 

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

0 Likes
Message 8 of 14

noe_pardoen
Contributor
Contributor

Thanks for your suggestion!

I’ve successfully implemented the attribute with the field, and the formula is working just as I want. However, I’m encountering an issue with the field marker (the gray background). Even though I set FIELDDISPLAY to 0 and save the drawing, other users still see the marker when they open the drawing on their computers.

My question now is whether it's possible to make the field background permanently transparent, so others don’t see the marker when they open the drawing. It’s fine if the marker remains visible within the block, as long as it is hidden outside the block.

Additionally, I want to adjust the horizontal lines, which are currently 50 mm long by default. I want them to have different lengths based on an associated number:

  • 100 mm long for numbers like 0, 10, 20, etc.
  • 75 mm long for numbers like 5, 15, 25, etc.
  • 50 mm long for other numbers (such as 1, 2, 3, 4, etc.).

All lines should be drawn from the center, so they should not shift left or right.

Now, I have an additional question: I don’t want the length to start from 0. For example, if I only want to show a specific part of the line, such as between 120 and 140, the line should stretch from 0 to 140, which takes up too much space. This is not ideal as it makes the display too large. How can I adjust this so that the line does not stretch to the full length, but only shows the specific range?

Thanks again for your help! If you have any tips regarding the field marker or how I can adjust the lines, I’d appreciate it!

2024-12-13_15h56_51.png

0 Likes
Message 9 of 14

j.palmeL29YX
Mentor
Mentor

Unfortunately you posted your last comments (and new requests) twice - here (post #8) and additional in another thread   (Dynamic Block Array count Field). I have decided (for me) to continue the discussion here. To avoid a chaos (caused by this crossposting) you should please post an appropriate hint in the other thread. [EDIT: in the meantime I did it myselve]

 

 

1.: Fielddisplay

The environment variable FIELDDISPLAY is stored in the Registry of the computer where AutoCAD runs. It is not stored in the drawing, so each user must set the whished value on its computer themselves.

 

2.: Partial ranges

In the attached new attempt I posted a new version, so you free can change the range to be displayed. Is this what you expect? (I'm not yet sure how the user shall handle this block). And of course the user must REGEN the file after changing the length left or right. 

 

3.: adjust the horizontal lines, which are currently 50 mm long by default. I want them to have different lengths

This is a complete new requirement. Before I spend time to this issue I'd like to hear if the current suggestions until now meet your goal. (BTW: You write about horizontal lines and "they should not shift left or right". Either you mean the short vertical lines or I do not yet understand what you want. And additional, I find they currently with a length of 100 instead of 50 as you wrote. Please clarify all this.)

 

 

 

 

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

0 Likes
Message 10 of 14

noe_pardoen
Contributor
Contributor

Hi,

I am really happy that I'm getting proper help now and that I feel like I'm being listened to. Thank you for your assistance!

I have a few points I'd like to discuss:

  1. Setting FIELDDISPLAY
    I understand that it's difficult to change the FIELDDISPLAY setting, as this is something specific to the administrator and the computer itself. But is it possible to insert a sort of LISP that would automatically turn it off when the drawing is opened? Or could something be done within the block itself, perhaps with an additional tab, so that it can be quickly turned off?

  2. Ruler for ships
    When we create a drawing, we always need to use the same type of ruler for the ships, as this is tied to the number of reinforcements in the ship. This makes it much easier for the people using the drawing to see where they need to be in the ship. However, we don't want to take up too much space in the drawing. Therefore, it would be helpful if we could shorten the vertical lines (the small lines with numbers) near the frames, so the drawing looks cleaner and is easier to read.

  3. Dimensions and display of vertical lines
    The display now looks much better. I tried to recreate exactly what was shown in the video, but either there is a setting that wasn't configured correctly, or I missed something. The size of the lines is quite important. For example, when working at a scale of 1:50 on an A0 sheet, everything needs to be clearly visible. The purpose of the size of the vertical lines (the numbering) is that it should be quickly obvious where everything is located. So, if someone says “frame 124,” I need to be able to find it within 5 seconds. Therefore, it would be helpful to apply a difference in the length of the vertical lines so the numbering becomes clearer and easier to find.

I hope this all makes sense. Thank you for your help, and I look forward to your feedback!

0 Likes
Message 11 of 14

j.palmeL29YX
Mentor
Mentor

@noe_pardoen wrote:
  1. Setting FIELDDISPLAY
    ... it's difficult to change the FIELDDISPLAY setting, as this is something specific to the administrator 


 

No. Each user can type in the command line "FIELDDISPLAY" to set this variable to the value of his need. 

If that is too much "stress" for you  😉 , you can put a small macro in a Tool Palette , or you can (auto)load a small LISP and - in the following example - launch the command "FD" to toggle the variable on an off, or ... 

(defun c:fd (/)
  (setvar "Fielddisplay" (- 1 (getvar "Fielddisplay")))
  (command "regenall")
  (princ)
)

 

But that all is IMO not worth the trouble. Type the name in the command line and set it on or off. Done. 

 

 


@noe_pardoen wrote:
  1. Ruler for ships
    we don't want to take up too much space in the drawing. Therefore, it would be helpful if we could shorten the vertical lines


Why you don't draw a shortener vertical line in the sub block? 

BTW: Perhaps you can solve this issue if you set the sub block and/or the Attribute to "Annotative". (Not tested). 

 

 


@noe_pardoen wrote

 

3. Dimensions and display of vertical lines
I tried to recreate exactly what was shown in the video, but either there is a setting that wasn't configured correctly, or I missed something.

The video (Post #7) shows how to create the block which is embedded in the Spoiler.dwg. Creating the block as shown in Ruler - pa.dwg differs a little. I hope if you analyze his block you will see what I did. 

 

And again: For the moment I don't have a solution how to adjust the length of the vertical lines.  Sadly, now I can no longer devote myself to this topic. 

 

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

0 Likes
Message 12 of 14

noe_pardoen
Contributor
Contributor
 
Thanks for your detailed response, Jürgen!

I understand your point about the FIELDDISPLAY setting. However, if there’s no way to automatically turn it off for all users, then unfortunately, I won’t be able to use this block for clients. Many of them are not familiar with adjusting such settings manually, and it could cause confusion. So, unless there’s a way to ensure the field background doesn’t display for others, this block becomes less useful for practical applications.

Regarding the numbering and vertical lines:
I’ve created another block to demonstrate what I want to achieve. This new block contains three numbering examples:

  • 100 mm vertical lines repeating every 5000 mm from their point in the drawing.
  • 75 mm vertical lines repeating every 5000 mm as well.
  • 50 mm vertical lines repeating every 2500 mm.

However, if you look closely at the drawing, you’ll see that the blocks shift every 2500 mm, instead of aligning properly according to their set spacing. I can’t figure out what I’ve done differently from your example, except that I’ve added five more parameters and linked separate stretches.

As for your suggestion about shortening the lines: I understand the idea of drawing a shorter vertical line in the sub-block, but this isn’t the solution I’m looking for. It would limit the number of vertical lines, and I want the flexibility to specify a starting number (e.g., 40) and let the vertical lines continue from there.

To clarify, I want the numbering to start at a specified value when the block is inserted or adjusted via properties. For example, if the starting number is 40, the vertical lines should begin there instead of showing 0. Ideally, the numbering formula would look something like this:
Center / 500 = 0 + (Number of Vertical Lines) = Starting Point.

Do you have any insights into how I can achieve this? And any idea why my new block’s spacing behaves differently?

Thanks again for your help!

0 Likes
Message 13 of 14

j.palmeL29YX
Mentor
Mentor

@noe_pardoen wrote:

... if you look closely at the drawing,


Which drawing? I can't find a dwg file attached here. 

 

 

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

0 Likes
Message 14 of 14

noe_pardoen
Contributor
Contributor

Sorry for the confusion! It seems my drawing didn’t get attached to my previous post. I’ve reattached it here for reference.

Thank you for your patience, and I look forward to your feedback!

0 Likes