The edited design will be store and the LayoutEditor quit once the macro is completed. Just add the filename of the macro as parameter when starting the LayoutEditor before the design name you want to edit with this macro. If the trigger 'layoutStart' and 'layoutNew' is set, the macro is only executed once during LayoutEditor launch.Ī macro can also be triggered from the command line of your operating system. Defined triggeres on autostart macros were introduced with version 20180420. #help=example of an automatic start macroĭebug("the autostart macro was triggered by") Īutostart macros are usefull for initial setups like adjusting userunits, prepare own toolbars, adjust short cuts etc. You can detect in the macro which action has triggered the macro. Only a single macro can be set as autostart macro. The trigger and the name of the macro is set in the setup dialog. To avoid that it is recommended to do the toolbar setup inside a Autostart-Macro.Ī autostart macro is a macro that is executed on a defined trigger by the LayoutEditor in a automatic way. ![]() You need to call this command anytime after opening a new window. Like toolbar adjustment itself macros can only be added to a toolbar by macro command: layout->addMacroToolButton(string macroName, string parameter, string iconFileName) will add a new button to the toolbar Macros. ![]() So the macros folder of the LayoutEditor package is listed in the setup by default. Several feature of the LayoutEditor are realized by macros and added to the menu in the identical way. If you have stored a new macro inside the tree, you had to call Update Macros to rescan the tree for new macro or restart the LayoutEditor. During program launch these directory-tree is scanned and added to the correspondent place in the menu. Further sub-folder will be the sub-menu where it is placed. ( layout, schematic, textEdit or layout3d). The first level of sub-folder determine in which window it is placed. ![]() The location is determine by its location within this directory tree. Any macro in one of these folders will be added to the menu. In the setup macro directories can be defined. To do so the macro just needs to be stored in the correct place. So a command line sequence can look like: p 0 0Īny macro can be added to any location in the menu tree. Furthermore any braces, commas and semicolons are superfluous. You can advoid the entry of the leading layout->drawing-> and just need to enter the method name you want to execute. This command line accepts next to the full macro notation a short form of all commands of the class drawingField. In this window a single macro command can be entered. With a TAB-key click from the main drawing of the LayoutEditor or a right click on an empty toolbar area and choosing the command line a new dock window will be opened. Next to these most common ways there are several other ways to start a macro: The execution is directly started afterwards. By calling it a file dialog is opened to choose the macro that should be executed. ![]() In the layout window it is located under Utilities/Macros/Execute Macro. This will work for C++ scripts as well as for Python scripts.Īlternative there is a Execute Macro feature in the menu of most windows. Always the current displayed macro/script will be executed. The most common way to start it will be the Execute button in the integrated TextEditor after loading the macro into it. There is by far more than one way to start a macro.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |