# Command response openigtlink

**URL:** <https://discourse.slicer.org/t/command-response-openigtlink/25266>\
**Category:** Development\
**Created:** [September 14, 2022, 2:40pm UTC](https://discourse.slicer.org/t/command-response-openigtlink/25266 "2022-09-14T14:40:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srijeet\_Chatterjee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/srijeet_chatterjee/32/12027_2.png) [@Srijeet\_Chatterjee](https://discourse.slicer.org/u/Srijeet_Chatterjee)\
**Post date:** [September 14, 2022, 2:40pm UTC](https://discourse.slicer.org/t/command-response-openigtlink/25266/1 "2022-09-14T14:40:10Z")

</div>

Hello everyone,

My question is, how can I print a received a command message in the igtlinkremote or python interactor?

I am sending a command from slicer using:

```
    cn=slicer.mrmlScene.GetNodeByID("vtkMRMLIGTLConnectorNode1")
mc=slicer.vtkSlicerOpenIGTLinkCommand()
mc.SetCommandName("SomeCommand")
mc.SetCommandContent("{}")
slicer.modules.openigtlinkremote.logic().SendCommand(mc,cn.GetID())

```

The server after execution of the command sends reply back to the client using the OpenIGTLink. But I don’t see anything in the Openigtlink Remote responses. I have also tried adding an observer like:

```
   mc.AddObserver(cn.CommandResponseReceivedEvent,print) 

```

However, it just prints 1 and nothing on sending the command. Could anyone please help me regarding how to print the replies?

Thanks,  
Best Regards,  
Srijeet
