Remove IP route with API command

Hi!,

I’ve would like to know the way for remove an IP ROUTE.
Print command dosen’t give me any id or number, and I’ve tried to remove it by comment but it doen’t work.
Anyone could help me?
thanks a lot!.

Send(“/ip/route/remove”);
Send(“=comment=myComent”, true);

You must use queries
http://wiki.mikrotik.com/wiki/API#Queries

/ip/route/remove
?=comment=myComment

this command doesn’t work. Response is !done but the Route item is still there.

/ip/route/remove
?=comment=myComment

did you test it before?

Any other idea?

Thanks.

/ip/route/getall
=.proplist=.id
?=comment=myComment

Will return an ID
!re
=.id=*A
!done

Then use that ID to remove the route

/ip/route/remove
=.id=*A

Thanks for your reply again.

The query seems work.,

Send(“/ip/route/getall”);
Send(“=.proplist=.id”);
Send(“?=comment=myComment”, true);

but later the read() method I use, posted in http://wiki.mikrotik.com/wiki/API_in_C_Sharp doesn’t work correctly.

Any other solution? or any otrer way to read the ip route item id?

Thanks.

Debugging the Read() method I can see that the reply just return 3 strings:
1_ re!
2_ empty string
3_ !done