I have an issue with the axlGetFindFilter() command. I have a small SKILL script for Find & replace text in the DB. In the code below I was trying to get the initial Find Filter setings and backup them, before I change it to TEXT, how ever it only returned nil, so I'm not able to backup them.
Second issue is that axlSetFindFilter(...) will not work when I execute my script when another command is actually running in the PCB editor (e.g. move). Is there any command whit which I can get the state of the PCB Editor, so I will be able to notice the user that another command is runnig and he need to close it first, before execute the script?
moFindFilterEnabled = axlGetFindFilter(nil) > this returns nilmoFindFilterButtons = axlGetFindFilter(t) > this returns nil println( moFindFilterEnabled) - just for check println( moFindFilterEnabled) - just for check axlSetFindFilter( ?enabled list( "noall" "text" "invisible") ?onButtons list( "noall" "text")) axlAddSelectAll() moAllTexts = axlGetSelSet()
REST OF THE CODE
) > sets only the TEXT as enabled and on
Thanks again for quick reply. I've registered the function with the axlCmdRegister() and it works fine for closing the running command.
But I still have issues with the Find Filter. I use the filter to get dbids of all texts in the DB for my SKILL code. If there is another way how to avoid using the filter to get the dbids of all texts in the whole design this will solve the problem too.
If I understand it correctly, there is no way how to preserve the setting of the Find Filter for the Idle mode of PCB Editor?
Now my SKILL code behave like this in relation to Find FIlter.
- there are some setting (user selected before)- after executing my SKILL code, the code change the Find Filter settings to text only (enabled and on_button)- then when the code ends and return to the PCB Editor, the Find Filter settings remain set to text only available option- user need to execute some another command e.g. move, slide, etc., then done the command and after this the Find Filter enables all usually enabled options- how ever the on_button stay on text only
Even the code work I would like to fix this behavior to make it more user friendly.
If there is interest, attached is the SKILL code. After loading the code it is necessary to run it by typing mo_bfr to the command line.