BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

MultiLine Text in Script

Anonymous
Not applicable
Hello,
Is it possible to get a "return" to work so I can have another
line of text below what I've shown in the attached script?
Thanks
lec

Heliocopter-1.png
8 REPLIES 8
Anonymous
Not applicable
Two ways I know of:

1. Use the PARAGRAPH statement and associated text functions. I found these to be complicated to get working correctly but once I sorted it out they worked nicely.

2. Parse the text procedurally. This goes something like:
FOR i = 1 TO STRLEN(string_parameter)
    char = SUBSTR(string_parameter, i, 1)
    IF char = " " THEN   ! find space character
        ! do something
    ENDIF
NEXT i
The details of course depend on what you want to do. This is the method I used before the multi-line text functions were introduced. I still use it in simple cases or where I need special control over parsing the text.

EDIT: Three ways...

3. Use two parameters. One for line one and the other for line two.
Rod Jurich
Contributor
lec1212 wrote:
/.......Is it possible to get a "return" to work so I can have another
line of text below what I've shown in the attached script?
If memory serves me well it was ML who suggested to us \n as shown in attached

Works in 99% of cases. Not custom dimensions or label ID

Add for a 3rd line works also. ---\n---\n---
Multi line text.png
Rod Jurich
AC4.55 - AC14 INT (4204) |  | OBJECTiVE |
Anonymous
Not applicable
Hi Rod
Thanks for simple approach as I'm not a gdl guy.
However so far I've only got the box shown in screen shot.
And I have tried many variations (spaces-no spaces etc) (just for fun) with no success yet.
Thanks for the idea though.
lec
Untitled.png
Barry Kelly
Moderator
I think this may be because it is 3D text and not 2D as in Rod's example.
Interestingly \t works (tab).
But then that is not forcing a new line.
Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
Yep works fine if you add the text to the 2D view.
Must just be a 3D thing.
Barry.
text.jpg
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Thanks for additional info Barry.
lec
Anonymous
Not applicable
I am having a related problem. I have read in a string from an external source. The string had a return/new line in it. It is showing up in the library part as the square shown above, so I know that it is there. I am looking to Parse the string and seperate it into 2 strings based on the new line. Shouldn't be a problem, however when I search the string for either "\n" or "\new line" it returns 0 (not found). Is there something I am missing or is it just not possible to search for the new line character.
Anonymous
Not applicable
I ended up using a workaround of searching for all alpha-numeric characters and if the character was not one, then just assuming that that is the new line character. Not the best solution, but it will work for now.
Learn and get certified!