StefanSchippers / xschem

A schematic editor for VLSI/Asic/Analog custom designs, netlist backends for VHDL, Spice and Verilog. The tool is focused on hierarchy and parametric designs, to maximize circuit reuse.
Other
308 stars 21 forks source link

Custom cursors #227

Closed trongcuhp closed 3 days ago

trongcuhp commented 1 month ago

How do I create a mouse cursor that, when pressed, prints its properties in the terminal?

StefanSchippers commented 1 month ago

Do you mean a graph cursor that prints X axis value and waveform values at cursor position in the terminal?

trongcuhp commented 1 month ago

yeah

StefanSchippers commented 1 month ago

This simple command prints names and values at b cursor for x-axis and all graph displayed nodes of the currently selected graph when the 'd' key is pressed:

bind .drw <d> {
  foreach i "time [xschem getprop rect 2 [lindex [xschem selected_set rect] 1] node]" {
    puts "$i [xschem raw value $i {}]" 
  }
  puts {}
}

See video.

https://github.com/user-attachments/assets/ddbb03d0-ba24-42dd-8a51-b01eefd38d5d

StefanSchippers commented 1 month ago

For details about the xschem commands (getprop, selected_set, raw) see the doc here.