Published by Jessica Masters – Latest update on 28/07/2021
ID: TN013
Relevant product(s): L-Edit
Operating systems: Windows 10, Linux RHEL 6 and above
Versions affected: 2020.1 and above
Relevant area(s): Automation
Summary
L-Edit can be launched from the command line, and various arguments can be used to launch a macro. This comes in handy when a user wants to open a design and run a macro automatically without performing GUI operations.
Details
The flow described below performs the following actions using the command-line and without user GUI interaction.
- Open L-Edit
- Open the design
- Fill the design using a macro
- Save the design
- Close L-Edit
The syntax of the required command is as below:
ledit64.exe -d <\path\to\lib.defs>?<name_of_top_library> -U <file_name_of_UPI_macro>
For example:
More information about supported L-Edit command line arguments can be found in the L-Edit user manual.
Ensure you include UPI functions that save the design or close L-Edit when macro execution completes.
For example:
To save the design
LFile_Save(pTDBFile);
Close L-Edit after the macro completes
LApp_ExitAfterCompletion(LTRUE);
Issue 1: The system cannot find the file specified
The following error message is given when specifying long filenames or paths with spaces within the command line:
The system cannot find the file specified
C:\Programs\Tanner tools\ledit64.exe -d C:\Documents\My Design\Example\lib.defs?Example -U C:\Documents\My Design\macro.cpp
Resolution
Filenames or directory names require quotation marks around them when they are specified in a command prompt operation. Failure to use the quotation marks results in an error message.
The correct syntax is:
“C:\Programs\Tanner tools\ledit64.exe” -d “C:\Documents\My Design\Example\lib.defs?Example” -U “C:\Documents\My Design\macro.cpp”
Useful references
[1] Tanner L-Edit Reference Manual: https://docs.sw.siemens.com/en-US/product/862138555/doc/DC202101015.docs.ledit_ref.en_us/html/idf5a6180d-2ea4-40e5-b220-09362f5f53b6
[2] Tanner L-Edit User’s Manual: https://docs.sw.siemens.com/en-US/product/862138555/doc/DC202101015.docs.ledit_user.en_us/html/idf443ef58-b3cd-44b9-94c0-a4660b622b02