> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/neovi-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/neovi-api/win32-api-overview-intrepidcs-api/deprecated-functions-overview-intrepidcs-api/coremini-script-interface-overview-intrepidcs-api/scriptreadappsignal-method-intrepidcs-api.md).

# ScriptReadAppSignal Method - neoVI API

This method is used to read an application signal from a script running on a neoVI device.

{% tabs %}
{% tab title="C/C++ Declare" %}

```cpp
int _stdcall icsneoScriptReadAppSignal(void * hObject, unsigned int iIndex, double *dValue);
```

{% endtab %}

{% tab title="Visual Basic .NET Declare" %}

```vbnet
Public Declare Function icsneoScriptReadAppSignal Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iIndex As UInt32, ByRef dValue As Double) As Int32
```

{% endtab %}

{% tab title="C# Declare" %}

```csharp
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptReadAppSignal(IntPtr hObject, UInt32 iIndex, ref double dValue);
```

{% endtab %}
{% endtabs %}

**Parameters**

hObject

\[in] Specifies the driver object created by [OpenNeoDevice](/neovi-api/win32-api-overview-intrepidcs-api/basic-functions-overview-intrepidcs-api/openneodevice-method-intrepidcs-api.md).

unsigned int iIndex

\[in] The index value of the transmit message to read

double \*dValue

\[in] Contains the current value of the application signal.

**Return Values**

1 if the function succeeded. 0 if it failed for any reason. [GetLastAPIError](/neovi-api/win32-api-overview-intrepidcs-api/error-functions-overview-intrepidcs-api/getlastapierror-method-intrepidcs-api.md) must be called to obtain the specific error. The errors that can be generated by this function are:

NEOVI\_ERROR\_DLL\_NEOVI\_NO\_RESPONSE = 75

NEOVI\_ERROR\_DLL\_SCRIPT\_INVALID\_APPSIG\_INDEX = 225

NEOVI\_ERROR\_DLL\_SCRIPT\_NO\_SCRIPT\_RUNNING = 226

**Remarks**

The script containing the specified application signal must have been successfully downloaded to the neoVI using [ScriptLoadScript](/neovi-api/win32-api-overview-intrepidcs-api/deprecated-functions-overview-intrepidcs-api/coremini-script-interface-overview-intrepidcs-api/scriptload-method-intrepidcs-api.md). The script must also have been started using [ScriptStart](/neovi-api/win32-api-overview-intrepidcs-api/deprecated-functions-overview-intrepidcs-api/coremini-script-interface-overview-intrepidcs-api/scriptstart-method-intrepidcs-api.md). This function will fail if [ScriptStop](/neovi-api/win32-api-overview-intrepidcs-api/deprecated-functions-overview-intrepidcs-api/coremini-script-interface-overview-intrepidcs-api/scriptstop-method-intrepidcs-api.md) has been called. The valid index values for application signals within a script can be found in the <mark style="color:orange;">cmvspy.vs3cmb.h</mark> file that is produced by Vehicle Spy. Please see Vehicle Spy documentation.

### Examples

{% tabs %}
{% tab title="C/C++ Example:" %}

```cpp
int iRetVal;
unsigned long lLastErrNum;
double dValue = 0;

iRetVal = icsneoScriptReadAppSignal(hObject, App_Signal_1, &dValue);
if(iRetVal == 0)
{
    printf("\nFailed to read the application signal.);
}
else
{
    printf("\nApplication signal = %f\r\n", dValue);
}
```

{% endtab %}

{% tab title="C# Example:" %}

```csharp
Int32 iResult;
Double ValueToSet=0;

//Read App signal
iResult = icsNeoDll.icsneoScriptReadAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex),ref ValueToSet);

if (iResult == 0)
{
    txtAppSigVal.Text = "Problem!";
}
else
{
    txtAppSigVal.Text = Convert.ToString(ValueToSet);
}
```

{% endtab %}

{% tab title="Visual Basic .NET Example:" %}

```vbnet
Dim iResult As Int32
Dim ValueToSet As Double

'//Read App signal
iResult = icsneoScriptReadAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex), ValueToSet)

If iResult = 0 Then
    txtAppSigVal.Text = "Problem!"
Else
    txtAppSigVal.Text = Convert.ToString(ValueToSet)
End If
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/neovi-api/win32-api-overview-intrepidcs-api/deprecated-functions-overview-intrepidcs-api/coremini-script-interface-overview-intrepidcs-api/scriptreadappsignal-method-intrepidcs-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
