Support Forum

Executing Macro "change unit" (D:/layout Editor/autostart_A3.layout)

Ho
LayoutEditorFull
Friday 4th June 2021
Hello, this is a company using layout editor. When registering autostart macros in Utilities -> setup -> Macro and re-running layout editor, the following error occurs Executing Macro "change unit" (D:/layout Editor/autostart_A3.layout). Errors: 1 NULL pointer (row 10) 1 Executing abort. Strong warnings: 1 main function exit code: 1 May I know what the problem is?
Jürgen
LayoutEditorFull
Friday 4th June 2021
Without the code I can only guess what happened. My guess is that the window you want to modify is not yet created. In the setup you can set which event should trigger the autostart macro and the triggering event can be read out with the [class macro](https://layouteditor.org/layoutscript/api/macro). In the event *start of the LayoutEditor* you can access the layers, but the main layout window does not yet exist. So to set the default user units for example you need to react on the event *new layout windows* instead.