how to get the path of the skill script itself

Discussion in 'Cadence' started by Marcel Preda, Aug 31, 2009.

  1. Marcel Preda

    Marcel Preda Guest


    Is it possible to get the path of the current running skill script ?
    (it's not a context file)

    What I mean:
    Let's suppose that i do:
    I'm interested to get that "/pth/to" because on that path I have some
    other skill and NON_skill files that I use .

    I know that the best idea is to set an environment variable set before
    running the script and read it,
    but I want to distribute the code to some other people and very often
    they forget to set the proper path before running icfb/virtuoso .

    In some other languages (e.g. Perl) we have some constants like
    __FILE__ which tells the "current file".

    Marcel Preda, Aug 31, 2009
  2. Marcel Preda

    Riad KACED Guest

    Hi Marcel,

    There is a Cadence internal variable for this, it is called 'piport'.
    piport is the standard input port from which user input is read. This
    information is available from the SKILL Language User Guide.
    The 'piport' tells the name of the current file when it's being
    So if you try the following at the top of your file:
    and then use the fileBeingLoaded variable to calculate the dir and
    thus load other files.

    Does this help ?
    Riad KACED, Aug 31, 2009
  3. Marcel Preda

    Marcel Preda Guest

    Hi Riad,

    This is EXACTLY what I want :)

    Thanks a lot.

    Marcel Preda, Aug 31, 2009
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.