Referencing Text Anchor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-10 08:44 AM
Is there a way to reference a text anchor?
eg. I have variable length text anchored on point 7 and I want to put something defined by a (sub)routine after it based on where the text ended, anchor 9.
eg2. I have a editable text box that I want to offset a square from.
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-10 09:15 AM
REQUEST ("TEXTBLOCK_INFO", textblock_name, width, height)If it is just text then you can use STRLEN to get the length.
STRLEN (string_expression)Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-10 09:15 AM
REQUEST ("TEXTBLOCK_INFO", textblock_name, width, height)If it is just text then you can use STRLEN to get the length.
STRLEN (string_expression)Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 03:39 AM
TEXTBLOCK "papersize" 0, 7, 0, 1, 1, 0, "Hello" x2 = REQUEST ("TEXTBLOCK_INFO", "papersize", width)Regardless of the text defined by "papersize". Both width and height return "2".
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 03:59 AM
You must request both at the same time.
x2 = REQUEST ("TEXTBLOCK_INFO", "papersize", width, height)
Does that make any difference?
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 04:01 AM
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 04:20 AM
The sizes are actually put in the height and width variables.
So it is those that you need to use.
You may need to convert to mm or m depending on how you set up your textblock.
I use a fixed_height parameter of '1' in my textblock and I do this when I use height and width to convert them to a usable dimension to suit the current scale.
height*(A_/1000)
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 04:32 AM
So why is there a need to use it as a definition? In this case, "x2" becomes a dead variable...
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-05-11 04:44 AM
0 means not successful.
It will return a number of successful results - depending on the request itself.
Not sure why this gives 4 - I would have thought 2.
I don't think it is explained well in the GDL guide that you need to use this return value when using a REQUEST command.
Anyway it doesn't really matter as it is the actual requested values that you want.
Quite often you will see ...
Dummy=Request(.......)
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11