Kate, I'm interested to understand what that function is usefull for. Regarding your second point; That means that every time you stop routing und start routing again trace width will increase?
However.
"How can I distinguish Plow mode and how to get the trace obj selected for plow?"
One approach could be to use the commandlistener. ( preoncommand and PreOnMouseClk ) With a global variable you can store the command-ID.
33064 for plow mode and 33070 for plow mode changed.
set com = app.gui.commandlistener
Call Scripting.AttachEvents(com, "com")
Function com_PreOnCommand(name, id)
LastID = ID
End function
function com_PreOnMouseClk(eButton, eFlags, dX , dY)
dim mtraces
if LastID = "33064" or lastid = "33070" then
set mtraces = ExpActiveDoc.traces(epcbSelectSelected)
if mtraces.count = 1 then MsgBox mTraces.item(1).Geometry.LineWidth 'do what ever
end if
Maybe it helps. I'm sure there are other way's to solve,...