Line up the text that comes after dimension number?

Hi!
I’m a beginner at Dynamo so I mostly copy ready-made scripts and edit them the way I want it.
I have found a script that ROCKS engineering has written for flooring that fit perfectly to my request to get the layer name with the dimension in one tag.
But now to my question:
How can I get the Text to line up even when there are different numbers in the dimension?

Welcome to the forum patric! :slight_smile:

Hard to say without a screenshot showing what you’re seeing. Sounds like some degree of geometric interop is going to be required, perhaps the middle of the source layer’s bounding box? Or maybe something else?

Post an image or a link to sample files for review and the community will certainly help out!

1 Like

Of course, I tried to upload the script but I was too new so I’ll show you a picture of it :slight_smile: Thanks for the quick reply

So I want the text to start aligning at the red line no matter how many numbers there are (the red line is just for visualization)

image

Your image cannot be read.
Please use this as a guide.

1 Like

I have done as the guide :thinking:
I can read the picture.

I’ll try to post it again here:

Zoom tight to in on a node before you use the export image command - the entire canvas is captured even the nodes which are not displayed. :slight_smile:

My guess is that the ‘thickness’ section needs the value converted to a string (String.FromObject) and then to be padded with a String.PadLeft node. You may have to remove extra decimal values after converting to a string. String.Replace can manage that - likely you’re already doing this in the graph at some point though.

1 Like

You missed step 3

1 Like

Ahh, Thx!

1 Like

Sry! I misunderstood it :pray: Should work on the last picture

1 Like

The previous guidance on using a String.PadLeft should work. :slight_smile:

1 Like

As I said, I’m completely new to this, but with your info, I’ve tried to test myself and come much closer to the goal :raised_hands:
If you look at the picture, you can see the text lines up much better, but the text moves a little bit for each number I put in, but not so it becomes completely zigzag

I’m not entirely sure that I’ve pulled all the strings right… :face_with_peeking_eye:

Can you post a sample file and your current .dyn somewhere for review? If you can’t post here onedrive, Google drive, docs, Dropbox, etc all work.

Hard to get more specific without those.

1 Like

Does this link work? Otherwise, I’ll see if I can get it out tomorrow

Can you remove the log-in bit?

1 Like

Sry, Now should it work :pray: