Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add %width% %height% as default placeholders #3327

Closed
mrjd19811 opened this issue Feb 1, 2023 · 11 comments
Closed

Add %width% %height% as default placeholders #3327

mrjd19811 opened this issue Feb 1, 2023 · 11 comments

Comments

@mrjd19811
Copy link

  • [ x ] I agree to follow the Code of Conduct that this project adheres to.
  • [ x ] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Is your feature request related to a problem? Please describe.
When using dimension measurement lines from the floorplan stencil it does not automatically put the size in the label. Such as it does in several other programs. The ability to reference %width% %height% as a place holder would remedy this.

The reason this is important is that in its current form when creating a dimension line it allows the potential of human error by putting the wrong dimension in the label, or resizing the dimension line and not changing the label to reference the new size.

Describe the solution you'd like
be able to use %width% and %height% on any object label

Describe alternatives you've considered
There does not appear to be any other than manual entry, and locking. But this still can allow human error by unlocking resizing and not changing a label.

Additional context
image

@Phrogz
Copy link

Phrogz commented Feb 14, 2023

This would only work for horizontal or vertical dimensions, not diagonal lines. Matching the spirit of the request, perhaps %length% placeholder would be preferred?

Would this request also request a scale setup for the document, or are you content labeling dimensions all at their "print" size and not what the real-world size of such a drawing would require?

@burner-
Copy link

burner- commented Jul 13, 2023

I think lack of this feature is biggest problem in drawio. Anyhow I agreee with Phrogz that %leght% for line objects would be better. That will allow add also diagonal measurement lines. Also that scale setup would be great because now I need scale up all drawings to spesific pixel or mm dimension and then calculate dimension again and again.

@PackElend

This comment was marked as duplicate.

@davidjgraph

This comment was marked as off-topic.

@davidjgraph
Copy link
Collaborator

21.8.0 adds width, height and length for edges.

@Shogutora
Copy link

21.8.0 adds width, height and length for edges.

How do you actually then add the edge label with the dynamic measurements?

@Phrogz
Copy link

Phrogz commented Nov 9, 2023

@Shogutora

How do you actually then add the edge label with the dynamic measurements?

  1. Right-click the line and choose Edit Data…
  2. At the bottom of the dialog that opens, check the Placeholders checkbox
  3. Add a label to the line that says "This line is %length% long"

When you stop editing the label, it will show you the current length.

@vpistis
Copy link

vpistis commented Feb 24, 2024

@Shogutora

How do you actually then add the edge label with the dynamic measurements?

1. Right-click the line and choose `Edit Data…`

2. At the bottom of the dialog that opens, check the `Placeholders` checkbox

3. Add a label to the line that says "This line is %length% long"

When you stop editing the label, it will show you the current length.

Hi,

I have found also in the faq: https://www.drawio.com/doc/faq/predefined-placeholders , but the %length% placeholder for a line is not working.
It's only my trouble?

thanx
Screenshot 2024-02-24 at 21 39 05

@manuelfink

This comment was marked as off-topic.

@jonasmhack
Copy link

@Shogutora

How do you actually then add the edge label with the dynamic measurements?

  1. Right-click the line and choose Edit Data…
  2. At the bottom of the dialog that opens, check the Placeholders checkbox
  3. Add a label to the line that says "This line is %length% long"

When you stop editing the label, it will show you the current length.

Does this work on the website or only on Desktop?

@greatvovan
Copy link

@vpistis ensure that you are adding the label by typing at the connector. If you double-click at a connector, it will create a bound text, which will move together with the connector but will be a different shape. Only main label supports %length%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants