2021-06-18
05:16 PM
- last edited on
2021-09-14
09:06 AM
by
Noemi Balogh
2021-07-08 10:46 AM
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.
2021-07-09 09:45 AM
2021-07-09 05:17 PM
2021-07-09 05:19 PM
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 ch
The 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.
2021-07-28 10:56 AM
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.