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-06-19 10:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-06-21 03:53 PM
So what I am doing is defining these parts of layout through gdl (position, size of the logo) which is fine for me, but doesn't really work as a user solution - I can't expect everyone in the office to be able to open the gdl script of the object to change the font size or position everytime they want to change the layout.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-06-29 08:47 AM
Software Engineer, Library
Graphisoft SE, Budapest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-06 07:03 PM
I can program these things in GDL and place the object on a master layout, but then I can't have the object change according to the layout number, because I can't access it from master layout.
Or I can place the object on each layout, but then I can't change the position on all layouts at once, as the parameters are saved per object.
I just tried using MVO but that obviously also doesn't work in layouts.
A slightly different example of what I want: the object opens a file and displays data read from the file. I need a different part of the file on each layout, but I want to be able to set the path to the file in one place, not per layout.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-06 07:50 PM
In my research I finally came to conclusion, that placing title block as an object on each layout and keep master empty more beneficial in any case - it just gives more options to control. Also you can program the title block the way that user would not able move, rotate or mirror the object, only place or delete. Well, you actually do move the object, but GDL returns position of the object back.
Also you can use txt files (or files with GDL extension, that is txt file but can be a macro), or XML, placed into embedded library as small data base and point if exchanging information between library parts. This way you can control change of several objects by changing only one of them.
And don't forget - you can develop a tool, that is working, but not completely perfect because of GDL limitations - but later you can infill the gaps with new GDL commands and possibilities, when they will be introduced in the future or using C++ or Python.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-06 08:19 PM
Instead I have them in worksheets and I place them.
Mostly on the master layouts, still. But on the other hand I really don't need to have every layout be different.
Maybe this is an XY Problem?
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-07 10:19 AM
runxel wrote:I apreciate your comments, but have you read my description of the problem? I need every layout to be different, that is the task, that is what I am paid to do. I want to automate this, because it seems simple enough - I have a database mit data and a large number of layouts with unique IDs. I need to show different data from the database on each layout - depending on the layout ID. (Layout 1 - row 1 from the database, Layout 2 - row 2 from the database and so on.)
What I do myself is, that I neither have my title blocks on the layout or the master layout.
Instead I have them in worksheets and I place them.
Mostly on the master layouts, still. But on the other hand I really don't need to have every layout be different.
Maybe this is an XY Problem?
I know how to do this, but here comes the real issue: I need the displayed information to be configured in a user friendly way, because it changes from project to project. The suggestion from @podolsky with the configuration file is the closest thing to what I am trying to achieve. I will try it out and see how the users in our office ract to this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-07 11:03 AM
jan.filipec wrote:I did, but it was not comprehensible. 🙂
I apreciate your comments, but have you read my description of the problem?
See, I think you have a bunch of different problems there which you're conflating into one.
Of course you know your problem best. But we can't this easily see all the possible caveats. So sometimes the forum is more of a collective "brainstorming" to get you to have the right idea. 😉
Back to the multiple problems:
So, you need something, that is the same, except for the parts that aren't. Also it needs to be flexible.
You already discovered that there is no easy solution.
And you really want this to be
One clean solution, until the Python connection can place elements, I can see is a custom made add-on.
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-08 09:30 AM
Podolsky wrote:(I said position ON the layout-sometimes we have to add some information to the layout and move the block a bit-that means clicking through hundreds of layouts and moving them manually right now)
Also you can use txt files (or files with GDL extension, that is txt file but can be a macro), or XML, placed into embedded library as small data base and point if exchanging information between library parts. This way you can control change of several objects by changing only one of them.
I tried to work with your solution and it seems to be pretty much exactly what I need, but I would appreciate some help still.
- I can imagine building this in a one of two ways:
Either one master object, placed somewhere being invisible, in which I set the variables, it writes them to the config file and a different object placed on every layout, reading the config file. I tried this and it seems to work ok.
Or only one object, placed on all layouts, always writing any change to the variable to config first and then changing everywhere. I tried this but it seems to lead to conflicts and crashing archicad.
Can the single object version work? - I tried the text and data add-ons, the both remove \t from any text, even if I set the separator to ";" is there a way around this? (I need to pass directory path i.e. "C:\temp")
- I created an empty config file and manually added it to the library first, is there a way to check if the config file exist in the library and create it if it doesn't?