Access Layout Properties from Master Lyout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-06-18
05:16 PM
- last edited on
‎2021-09-14
09:06 AM
by
Noemi Balogh
Autotexts - work from masterlayout but can't be used to drive a script
n = request ("HomeDB_info", "", n, LayoutNumber, LayoutName, n) works only when placed directly on the layout, but not from masterlayout
LAYOUT_CHANGE_HISTORY works from masterlayout but does not contain layout id.
Thanks
- Labels:
-
Library (GDL)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-08 10:46 AM
The problem with slash in path name and similar I usually solving by replacing problematic symbol with something else (like &slash&) and creating coder (when it writes to the file) and decoder (when reads).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-09 09:20 AM
n = request ("HomeDB_info", "", n, LayoutId, LayoutName, n)in the 2d script so they are forced to redraw when I change the layout id, but that is not very elegant.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-09 09:45 AM
Are you using auto text for layout ID? I think if you are using auto text - auto update then happens instantly (it happens because GDL is not processing content of auto text - so it's actually not needed to run GDL script to see updated auto text). I'm not 100% sure about it, but try.
Auto text in GDL will look like that: <LAYOUTID> <LAYOUTNAME>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-09 05:17 PM
Update&Regenerate seems interesting, but I can't make it work the way I'd like - when I select my masterobject and press U&R it updates all the objects on the layout, but nowhere else. If I don't select anything, it resets all the values to the defaults I defined in the parameter list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-09 05:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-22 05:44 PM
strConfigFilePath = "GDL I-O config.dat" ch=OPEN ("DATA", strConfigFilePath, "MODE = WO, LIBRARY") OUTPUT ch, "strPath", 1, strPath OUTPUT ch, "strNorthArrowName", 1, strNorthArrowName OUTPUT ch, "corner_y", 1, corner_y OUTPUT ch, "corner_x", 1, corner_x OUTPUT ch, "TextX", 1, reaTextX OUTPUT ch, "TextY", 1, reaTextY OUTPUT ch, "AC_TextFont_1", 1, AC_TextFont_1 OUTPUT ch, "AC_TextStyle_1", 1, AC_TextStyle_1 OUTPUT ch, "AC_TextStyle_2", 1, AC_TextStyle_2 OUTPUT ch, "iLineSpacing", 1, iLineSpacing OUTPUT ch, "AC_TextPen_1", 1, AC_TextPen_1 OUTPUT ch, "AC_TextSize_1", 1, AC_TextSize_1 CLOSE chThe file always contains the default values from the Parameters list, not the ones I set in the object. To me it seems as if the file was write protected (open?) - sometimes it randomly started working when I changed the name of the channel variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-28 10:56 AM
When a library part gets executed is not predictable. There are cache mechanisms to re-execute only when necessary, and there is the info box which executes with the default parameters if no element is selected. The execution order can also change. Thus it is not recommended to write files relying on the rebuild of a library part.
You could add a button on the UI and write the file only when the user presses it.
Software Engineer, Library
Graphisoft SE, Budapest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-08-04 10:09 AM
Peter wrote:Ok, so that also solved the problem with writing in a file placed in the library, great.
Hi,
When a library part gets executed is not predictable. There are cache mechanisms to re-execute only when necessary, and there is the info box which executes with the default parameters if no element is selected. The execution order can also change. Thus it is not recommended to write files relying on the rebuild of a library part.
You could add a button on the UI and write the file only when the user presses it.
But now I have to do two steps when upadting my objects: go to settings and press the ui button to write to the file and then press the archicad button update & regenerate to see the changes. Is there a way to do this in one step?
- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »