Save DRC result issue

edited April 2018 in Ruby Scripting

Hi,

When I run my DRC script, I always have the line to save the result :

report("MYTECH DRC runset", "MYTECH_DRC.txt")

But, it very often does not save anything and I don't get any DRC result, but the message :

Unable to open file: MYTECH_DRC.txt (errno=13) in ReportDatabase::save in MacroInterpreter::execute
    :/built-in-macros/drc.lym:4534:in `save'
    :/built-in-macros/drc.lym:4534:in `_finish'
    :/built-in-macros/drc_interpreters.lym:29:in `execute_drc'
    :/built-in-macros/drc_interpreters.lym:67:in `execute'

What is the trick to avoid that message ?

Thank you, BRgds,

Laurent

Comments

  • edited November -1

    Hi Laurent,

    "errno=13" means "permission denied". So either the directory you're writing to does not have write permissions or the file is already there and owned by someone else.

    That's an error issued by the operating system. Maybe you can give a full path to the output file - this will avoid that you write to an unknown directory.

    Kind regards,

    Matthias

  • edited November -1
    Thank you, I use a full path and it works fine... I need to change it depending on the circuit.

    BRgds,
    Laurent
  • edited November -1

    Hi Laurent,

    there are ways to use the path of the layout you have loaded, for example

    report("My DRC", File.join(File.dirname(RBA::CellView::active.filename), "MyDRC.txt"))
    

    will use the path of the currently loaded file as the base path and write "MyDRC.txt" next to the original file.

    Matthias

  • Hi Matthias,

    I've been enjoying KLayout for over 7 years and appreciate your contribution to the community. Could you point me to a post/answer about how to output the measured error values in a DRC report?

    For example, I want to display the measured value of the error in the place of "Layer123 width < 5 um"

    layer123.width(4.um).output("Layer123 width", "Layer123 width < 5 um")

    I am outputting the DRC report here and also using the marker database browser

    report("My DRC", File.join(File.dirname(RBA::CellView::active.filename), "My DRC.txt"))

    Thanks,
    Dan

Sign In or Register to comment.