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!
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!
Of course, I tried to upload the script but I was too new so I’ll show you a picture of it 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)
Your image cannot be read.
Please use this as a guide.
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.
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.
You missed step 3
Sry! I misunderstood it Should work on the last picture
The previous guidance on using a String.PadLeft should work.
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
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…
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.
Does this link work? Otherwise, I’ll see if I can get it out tomorrow
Can you remove the log-in bit?
Sry, Now should it work
hmm can anyone see where I should change if I want the first decimal number to appear if it is greater than 0?
The file should work now to test