You can use transactionStart and transactionEnd (see expedition automation help for more info).
It should also make it faster when doing alot of actions and also groups the actions into one undo.
Vbscript code example:
if pcbAppObj.IsDBLocked = false then
PcbDocObj.EditorControl.InteractiveDRC = true then
pcbDocObj.TransactionStart(epcbDRCModeDRC or epcbDRCModifierShowHazardGraphics)
We are able to control the checkbox that is used to switch the drc off/on, but the issue is with suppressing the windows that comes next.
1 of 1 people found this helpful
If you put all the actions between the transactionstart and transactionend you don't need to disable it in the editorcontrol.
There is also the option to use epcbDRCModeNoneWithBatchQuery to prompt the user to run DRC on saving the job.
Anyway you can disable that prompt with SuppressTrivialDialogs.
Vbscript code to toggle interactive DRC mode:
pcbAppObj.Gui.SuppressTrivialDialogs = true
PcbDocObj.editorcontrol.InteractiveDRC = NOT(PcbDocObj.editorcontrol.InteractiveDRC)
pcbAppObj.Gui.SuppressTrivialDialogs = false
Hi, i'm interesting on this.
How you run the automation?
Is like press "CTRL+D" will swith ON/OFF the DRC and pass Yes automatically?
Sorry, I don't really know about vb programming.
Where should I put the vbscript?
It is not really possible to answer your questions just like that. The answers would be very lengthy and make many assumptions which may or may not be true in your case.
The best approach for you at this point is to read the help files in Expedition Help > Automation. Perhaps start with hotkeys and keybindings. Also search here in the communities pages - I am sure that we have covered the process of setting up the files and scripts needed to implement hotkeys here. At some point you will want to set up a custom menu in your design tools - we've also covered that.
Additionally there are example scripts installed with the Mentor software. They can be found in the install tree under \SDD_HOME\standard\examples\pcb\Automation.