• Home
  • :
  • Community
  • :
  • Forums
  • :
  • PCB SKILL
  • :
  • How to see current color192 state by skill code?

PCB SKILL Forums

How to see current color192 state by skill code?

ichliebedich
ichliebedich 1 month ago

Hi all,

I made some code about display film,

but when user hit the "cancel" button, I want to undo the command which is return previous state of color192

so is there any embedded code for checking current color192 ?

and plus, is there skill code about "undo" command?

regard!

  • Reply
  • Cancel
  • Cancel
  • ichliebedich
    ichliebedich 1 month ago

    I found the code " axlVisibleGet()" which is saving current color film!

    and this function store current activated color list to variable, and then I can use this variable with " axlVisibleSet( variable )" 

    only I wonder about "undo" command thanks!

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • mir0mik
    mir0mik 28 days ago

    Hi,

    for UNDO - yes but it is not so simple (I recommend to you to read about this) - you need to register your code by axlCmdRegister()... then you can use axlDBTransaction functions to create restoration point/restore...

    for COLOR - I'm attaching you two of my codes (both developed for 17.2 now it can be done easier as cadence fixed the qtr signaling and now they represent real name of layer not just number that changed with number of layers)

    - set PA color will change your color (there may be issue with name of layer, but you will see) and will create a save of your settings in the brd file attachment section

    - restore will restore your settings - will restore your data from brd attachment section and apply them back...

    Note that this is custom code for our needs, so... but you can get the idea...

    Regards,

    Miro

    4477.SKILL.ZIP

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • mir0mik
    mir0mik 28 days ago

    Here some code for UNDO - this is not my code, but I used it for learning and if I remember correctly it worked, so study this if you want have undo function...

    undo.zip

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • ichliebedich
    ichliebedich 27 days ago in reply to mir0mik

    I found simple way to undo with SKILL code,  just parse command data to Allegro.  used this code : axlShell("undo") (using for statement if it needs to iterately)

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • mir0mik
    mir0mik 27 days ago in reply to ichliebedich

    Hi, yes this is the simplest way, However, this just emulates the pressing of UNDO button... It will work in some cases - depends on what your SKILL code do with the database. If this is sufficient you are in luck, if not, you can study and use the code in undo.zip

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel

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.