drawio
drawio copied to clipboard
Support the length of a line
-
It will be very useful if I could get the length of lines without calculating it using e.g 10pt grid and scale 1pt=1cm which works for horizontal and vertical lines but for other line orientations is hard.
-
Add length to (x,y) popup when dragging a line will be helpful. http://cogito-ergo-sum.ru/line.png https://desk.draw.io/a/tickets/11151
indeed this would be quite must have feature
Was this feature request dropped? i do not see the display of line length in the latest release.
It was rejected yes. If you prefer I can reopen the issue and nobody implement it.
It was rejected yes. If you prefer I can reopen the issue and nobody implement it.
Quite grumpy way to take attitude for good and proper feature request. Is that project dead or what is reason that it wont go to implementation?
Lol the last chat is comment is only 10 hours old.
Some questions:
- Does anyone know how many story points this feature would require to deploy annnnnd effort to maintain?
- Do you know how much it would be to crowd fund this feature on something like https://gitcoin.co/?
- Do you think I it will be easier to make a tampermonkey script to fill in this gap? This was my original plan (keep all the automation abstracted (maybe add a bar to the top of the screen to show live numbers and for measurement input, the just push the change once you release the mouse drag is released)
Quite grumpy way to take attitude for good and proper feature request. Is that project dead or what is reason that it wont go to implementation?
We are fully entitled to decline a feature request. I closed the issue to reflect the fact that we don't want to implement this. Reopening it is pointless, as we don't wish to implement the feature.
Your attitude is extremely entitled. Continue and I will ban you from the project for breach of the code of conduct.
to support the suggestion, that is what I did in PowerPoint, adding some auxiliary lines to draw the structure.
As I can define the length of the lines in mm at least that task is quite simple in PowerPoint
In draw.io I have to misuse shapes
Use %length% placeholder.
Use %length% placeholder.
Can I ask you to explain exactly what needs to be done? Where to write %length% ?
-
Draw an Edge or Line: First, draw the line or connector for which you want to display the length.
-
Select the Edge or Line: Click on the edge or line to select it.
-
Access the Text Label: With the edge or line selected, look for the text label area. This is usually activated by double-clicking on the line or edge itself.
-
Enter the Placeholder: In the label area, enter
%length%
as the text. This serves as a placeholder that will be replaced by the actual length of the line or edge in your diagram. -
Adjust Units (Optional): By default, the length is shown in pixels. If you wish to change the unit of measurement, you might need to use custom properties or look for settings in draw.io that allow changing the default unit of measurement. This might not be directly supported as a feature through placeholders, and could require additional steps or scripts.
-
View the Length: Once you've entered the placeholder, draw.io should automatically calculate and display the length of the line or edge in place of the
%length%
placeholder. As you adjust the size or shape of the line, the displayed length should update automatically.
- Enter the Placeholder: In the label area, enter
%length%
as the text. This serves as a placeholder that will be replaced by the actual length of the line or edge in your diagram.
I have just tried it but only shows the text, the placeholder is not replaced. Does it work for anyone else?
- Enter the Placeholder: In the label area, enter
%length%
as the text. This serves as a placeholder that will be replaced by the actual length of the line or edge in your diagram.I have just tried it but only shows the text, the placeholder is not replaced. Does it work for anyone else?
It didn't work for me either, even though I'm sure I'm doing everything right.
Which version draw.io?
24.2.3. If you're using desktop, you just need to wait for a new release.
24.2.3. If you're using desktop, you just need to wait for a new release.
Thanks!
24.2.3. If you're using desktop, you just need to wait for a new release.
I am using web version v24.2.3 but It is not replacing with actual length when I use placeholder.
Is that the default label of the edge, or a new label you added to the edge?
Please attach a test case.
No length support in desktop version 24.2.5
Test case:
- Draw new line using "General" shapes library
- Double click on the new line (or press F2) - to start editing line label
- Enter "%length%" (without quotes) and clicking outside line
- ER: %length% macro is replaced with real line length value
- AR: plain text "%length%" exists
Just select the line and type that label. If you add a new label to the connector, it's a child shape and doesn't support that property. And make sure you enabled placeholders on that edge.
Thank you. Now succeed!
It was unclear that "placeholders" must be enabled. Correct flow I've found is:
- Draw new line
- Press Ctrl+M and enable "placeholders" for the line
- Use %length% macro
See gif below
any chance that the length is shown in paper dimension (mm, inch etc.)?