obj_highlight_net
Highlights a named net in the focused schematic or PCB document, clearing old highlights by default and optionally forcing schematic or PCB context for accurate visual net tracing.
Instructions
Highlight a net by name in the focused schematic or PCB document.
PCB path sets IPCB_Net.IsHighlighted on the matched net (the documented property). Schematic path walks net labels / power ports / ports / sheet entries on the active sheet and marks those whose name matches as Selection=True, the closest thing Altium exposes to a "highlight" on schematic without interactive commands.
If a schematic is the focused document, this paints the
schematic even when a PcbDoc is also open. Pass
context="pcb" or context="schematic" to force one side.
The previous behaviour always preferred the PCB whenever any
board was loaded, which made a schematic Find-Net look like it
did nothing.
Args:
net_name: Exact net name to highlight (e.g., "VCC", "GND",
"NET_D0"). Returns NOT_FOUND if the net doesn't exist
on the PCB, or highlighted=0 on schematic if no
primitive carries that net name on the active sheet
(check other sheets).
clear_existing: Clear existing highlights first (default True).
context: Empty (default, follow the focused document),
"schematic", or "pcb".
Returns:
Dict with success, net, context ("pcb" or "schematic"), and
highlighted (count of matches, 1 for PCB, N for sch).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | ||
| net_name | Yes | ||
| clear_existing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||