sch-rnd-aux knowledge pool

 

Action script to remove "pin numbers"

remove_pinnum by Tibor 'Igor2' Palinkas on 2022-03-14

Tags: howto, pin, number, label, text, remove, script, automated

node source

 

 

Abstract: The other day Erich asked for a feature to remove "pin numbers" from the drawing before export. This did not need a new feature, just a combination of existing features. This node describes the script.

  A "pin number" is really a text object within a terminal group that is marked dyntext so it can print the display/name attribute of its parent object (the terminal group). The followign script removes these objects in four steps:

The script is:


Unselect(all)
query(select, '@.type == TEXT && @.dyntext == 1 && @.parent.a.role == "terminal"')
propset(p/floater, 1)
RemoveSelected

This can be ran the usual ways, from the command entry from the GUI, or loaded from a file or from a shell using the batch HID. For more information, see the action class of pcb-rnd's scripting howto.

When ran from a shell, as an 5th step the SaveTo(sheet, filename) or the Export() action may be useful.