We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-10-06 12:50 AM
I'm messing around with the Change Marker object and need to get the width of the Change ID, so that the width of the frame can change depending on the length of the Change ID string. By using the REQUEST function I am able to get the width of the string, but changing the ID does not change the width of the frame. I'm assuming this is because of the auto text that is grabbing the actual Change ID, which is the string "<CHANGEID>", so the REQUEST function is grabbing the width of the literal string "<CHANGEID>" as opposed to the actual ID.
Is there a way to get the length of the auto text after it has been "calculated" so to speak? Or a way to grab the Change ID through a variable or parameter from the object? I don't see any global variables that would point to the ID. Below is the current result of my change marker with two different lengths of IDs.
Thanks!
Solved! Go to Solution.
2022-10-06 04:31 PM
I'm afraid you cannot "request" an Autotext. Autotext can be used in GDL but it will just passing through. GDL cannot grab the value of the Autotext so you can't manipulate any of it.
2022-10-06 03:52 AM
Could you use the LAYOUT_CHANGE_HISTORY global? If there is another string to figure out how many Changes have been made, you might then be able to use it much like you do WALL_SKINS_PARAMS?
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-10-06 07:34 AM
There is a function in GDL to return the length of a string:
STW
STW (string_expression)
Returns the (real) width of the string in millimeters displayed in the current style. The width in meters, at current scale, is STW
(string_expression) / 1000 * GLOB_SCALE.
2022-10-06 04:31 PM
I'm afraid you cannot "request" an Autotext. Autotext can be used in GDL but it will just passing through. GDL cannot grab the value of the Autotext so you can't manipulate any of it.
2022-10-10 05:26 PM
I can get a list of all of the change id's from LAYOUT_CHANGE_HISTORY but I can't figure out a way to match the specific marker's change id to that list. If there was only a way to get the information of the marker's linked change other than using the autotext "<CHANGEID>" then we would be good
2022-10-10 05:29 PM
I was already able to get the width of the string by using REQUEST("TEXTBLOCK_INFO", ...) but I wasn't aware of the STW function, it's much simpler to use for this case, thanks!
2022-10-10 05:31 PM
This is what I was afraid of. If there was only a way to grab the information of the change the marker is linked to then everything would be much simpler, but for now I'll just have to put a "width" parameter a user can change manually. Thanks for your response