• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Getting path for loaded skill file

Stats

  • Replies 6
  • Subscribers 161
  • Views 16512
  • Members are here 0
More Content

Getting path for loaded skill file

Ejlersen
Ejlersen over 14 years ago

Hi

Is there an easy way to get the path of a loaded skill file?

Best regards

Ole

  • Sign in to reply
  • Cancel
  • aCraig
    aCraig over 14 years ago

    Try this to get the first location:

    found = nil
    paths = getSkillPath()
    while(paths && !found
        path = car(paths)
        paths = cdr(paths)
        when(isFile(strcat(path "/" skillFileName))
          found = t
        )
    )

    Use foreach to get the last location.

    Craig
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 14 years ago

    Hi Craig

    Thanks for the answer, althoug it is in line with what I already do.

    Suppose a skill file exist in several places, then the search needs to take the load preceedence into order. So I was hoping for an axl function to retrieve the path.

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 14 years ago
    Hi Ole, I suspect that, once the code is loaded and in memory, it is not possible to tell where it is loaded from. The Skill developers reference manual has a "whereIs" function. I'm not certain whether this would help you but does indicate that this information might be available in debug mode. A method to resolve this might be to put some code in the utility to identify the load path on load but I can't think how to do that without hijacking the load command. I can see how this could be useful. Please let us know if you find a good solution. Dave
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • aCraig
    aCraig over 14 years ago

     Hi Ole,

    I did find a Skill command "which" which does essentially what my sample  code  does. I agree with Dave on once it's loaded you don't really know where it was loaded from, unless you always use the Skill path to do the search for the file.

     

    Craig

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • PCB George
    PCB George over 14 years ago

    I typically add a printf statement as the last line of code.  Since it is outside the functions of the code, it prints out the routine name, version, and date when the code is loaded.  I use it as a sanity check to make sure the proper version is loading from the site skill path, You could probably use something like that to include the path if you wanted to.

    ~~

    George

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information