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?
jan.filipec wrote:I did, but it was not comprehensible. 🙂
I apreciate your comments, but have you read my description of the problem?
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.
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.
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.
Peter wrote:Ok, so that also solved the problem with writing in a file placed in the library, great.
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.