F
fogh
Guest
Hi All,
Does anyone have a more evolved version of the code below ? The intent is to
allow for a secundary buffer/clipboard. This is for those cases, encountered
mostly by a layouter, when he has carefully selected a number of devices to do
some operation, and only later realises that he needs to make another operation
first, which would make him loose his selected set.
I suppose this has been written before, in a better style than mine (that is a
usual assumption so please post code or dejanews references if you know any. TIA.
procedure(CmSwapAltSelect()
let((buf cv)
unless(boundp('CmAltSelectBuffer) CmAltSelectBuffer='(()) )
cv=concat('cv substring( sprintf(nil "%L" geGetEditCellView()) 4)) ;;
cv72505388 instead of db:72505388
buf=setof(x geGetSelectedSet() x && type(x)=='dbobject)
geDeselectAll()
foreach(x get(CmAltSelectBuffer cv)
geSelectObjectNoFilter(x)
)
putprop(CmAltSelectBuffer buf cv)
)
)
foreach(key '("<Key>grave" "<Key>F12")
foreach(app '("Layout" "Schematics")
hiSetBindKey(app key "CmSwapAltSelect()") ))
Does anyone have a more evolved version of the code below ? The intent is to
allow for a secundary buffer/clipboard. This is for those cases, encountered
mostly by a layouter, when he has carefully selected a number of devices to do
some operation, and only later realises that he needs to make another operation
first, which would make him loose his selected set.
I suppose this has been written before, in a better style than mine (that is a
usual assumption so please post code or dejanews references if you know any. TIA.
procedure(CmSwapAltSelect()
let((buf cv)
unless(boundp('CmAltSelectBuffer) CmAltSelectBuffer='(()) )
cv=concat('cv substring( sprintf(nil "%L" geGetEditCellView()) 4)) ;;
cv72505388 instead of db:72505388
buf=setof(x geGetSelectedSet() x && type(x)=='dbobject)
geDeselectAll()
foreach(x get(CmAltSelectBuffer cv)
geSelectObjectNoFilter(x)
)
putprop(CmAltSelectBuffer buf cv)
)
)
foreach(key '("<Key>grave" "<Key>F12")
foreach(app '("Layout" "Schematics")
hiSetBindKey(app key "CmSwapAltSelect()") ))