Hello,
as far as I understand, the only way to manipulate the data structure of either an eagle schematic, board or library through an ULP is to collect the necessary commands in a text file and execute it using exit ("script <filename>"). This method works as long as there is a suitable filename available that is writeable. On a unix system, this would be somewhere in /tmp, on windows, this would be some other location. I have failed so far to find a way to create a temporary filename that works across all supported operating systems. I suggest to add a function to create a temporary path for exactly that purpose and to document it together with the whole approach of collecting commands to manipulate the data structure in a script and execute that script after the ULP is finished. This would have the other advantage that the script could get deleted after execution because it is intended for a single execution anyway.
What do you think about this? Does anyone has a realiable solution to create a temporary filename? I think the currently most used approach is to place the script into the same directory as the currently edited schematic or library. This works because the user usually has the rights to write to the directory of the currently edited file. But I think this is a hack because the file remains after execution and does not belong there. Another interesting idea would be to have a magic filename, for example ":memory" so the commands get stored somewhere in memory, exeuted and never become an object in the users filesystem.