IProject.SendToolMessage Method (String, String, String, UInt32, String)
- Updated2023-02-21
- 3 minute(s) read
Sends a message or command to a Workspace tool for an NI VeriStand project, as well as data required by the case that handles the command. You can use this method with any Workspace tool that registers to receive the command you specify.
Namespace:
NationalInstruments.VeriStand.ClientAPIThis instance sends string data to a tool. You also can use the other instance of SendToolMessage to send data as a byte array of 8-bit unsigned integer values.
Assembly: NationalInstruments.VeriStand.ClientAPI (in NationalInstruments.VeriStand.ClientAPI.dll) Version: 2013.0.0.0 (2013.0.0.0)
| Visual Basic (Declaration) |
|---|
Function SendToolMessage ( _ tool_path As String, _ command As String, _ data As String, _ timeout As UInteger, _ <OutAttribute> ByRef response As String _ ) As Error |
| C# |
|---|
Error SendToolMessage( string tool_path, string command, string data, uint timeout, out string response ) |
| Visual C++ |
|---|
Error^ SendToolMessage( String^ tool_path, String^ command, String^ data, unsigned int timeout, [OutAttribute] String^% response ) |
Parameters
- tool_path
- Type: System.String
The path to the tool VI.
- command
- Type: System.String
The message or command to send to the tool.
- data
- Type: System.String
The data to send to the tool. This input expects only human-readable string characters. If you send other string characters, such as a null character, this method might truncate the message during transmission to the tool. If the data you want to send contains null characters, convert the string to a byte array and use the other instance of SendToolMessage to send the data to the tool.
- timeout
- Type: System.UInt32
The time in milliseconds to wait for a response from the tool before returning an error.
- response
- Type:
System.String
%
Returns the response from the tool to the command.