Tagged: tags labels
February 23, 2020 at 22:59 #18579Leah BellParticipant
I am trying to make a wall tag that takes the of an object element ID from a wall and looks like a text box with an arrow right next to it. I made a text box with a background fill and outline and drew in the arrow at the size I want it to be at. I deselected ‘Wrap text’ in the text properties. I saved the arrowhead and the text box as a label. When I insert the label however, the text box comes out the same width as the original text box, rather than being the width of the text in the Element ID, which is what I would prefer (see attached image). Also, I would like the label to be inserted at the point of the arrowhead, however it is inserting at the top left corner.
Can anyone instruct me on how to fix these issues?
Thank you kindly!!
February 24, 2020 at 03:59 #18581Lingwisyer GCParticipant
As far as I know, there is no way to retrieve the text length when using [i]Autotext[/i] values. If you go into the code and change it to [i]Requests[/i] you will then be able to do a follow up request for the length which can then be plugged into the textbox size.
AC18-23 AUS 4006
Self-taught, bend it till it breaks.
Win7 | E5620 x 2 | 24GB | K2200
February 24, 2020 at 15:19 #18583James MurrayParticipant
Labels saved via save as label are very inflexible. What you are trying to do requires a coded label. The box will have the length of the ID string, which can be gotten using STW. The height will come from the Height_of_style REQUEST.
April 2, 2020 at 01:20 #18674Bruce WalkerParticipant
reqNote = "Your Text Here" DEFINE STYLE 'txtStyle' LABEL_FONT_NAME, LABEL_TEXT_SIZE, 5, 0 STYLE 'txtStyle' ! Get the Height and Width of the displayed Text, convert it to model size r = request("Height_of_style", "txtStyle", _heightOfText_mm) _height = _heightOfText_mm * GLOB_SCALE / 1000 _width = STW(reqNote) / 1000 * GLOB_SCALE
April 2, 2020 at 01:21 #18675Bruce WalkerParticipant
You need to divide by 1000 as text parameters use the Real Number type
- The forum ‘Documentation elements, text handling’ is closed to new topics and replies.