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?
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!
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...
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...
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)
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