INatAutoDataArea

#### Search Results

Search

# INatAutoDataArea

This document covers the following topics:

- Purpose

- Properties

- Methods

## Purpose

A data area open in a data area editor window. This comprises the following development object types: local data area, global data area and parameter data area.

## Properties

The following properties are available:

- Parent

- Studio

- Source

- Visible

- Type

- LineCount

### Parent

Used to navigate to the parent interface of this interface.

Natural Data Format | Variant Type | Remark
--- | --- | ---
HANDLE OF OBJECT | VT_DISPATCH (INatAutoDataAreas) | Get only

### Studio

Used to navigate to the root interface.

Natural Data Format | Variant Type | Remark
--- | --- | ---
HANDLE OF OBJECT | VT_DISPATCH (INatAutoStudio) | Get only

### Source

The source code of the data area in the syntax of the `DEFINE DATA` statement.

Natural Data Format | Variant Type | Remark
--- | --- | ---
A | VT_BSTR |

### Visible

Shows or hides the editor window.

Natural Data Format | Variant Type | Remark
--- | --- | ---
L | VT_BOOL |

### Type

The development object type. The type is identified by a numeric ID. The IDs of predefined types are described in the section Predefined Node Types.

Natural Data Format | Variant Type | Remark
--- | --- | ---
I4 | VT_I4 |

### LineCount

The number of lines in the source code.

Natural Data Format | Variant Type | Remark
--- | --- | ---
I4 | VT_I4 | Get only

## Methods

The following methods are available:

- StartEdit

- EndEdit

- Catalog

- Check

- Clear

- Close

- Search

- Replace

- Save

- Stow

- Title

- GetInfo

- DeleteLines

- GetLines

- InsertLines

- ReplaceLines

### StartEdit

This method should be called before calling a series of editing methods in order to increase editing performance. It converts (internally) the data area into source code according to the syntax of the `DEFINE DATA` statement.

### EndEdit

This method should be called after having called `StartEdit` and a series of editing methods. It converts (internally) the source code back into the data area editor.

### Catalog

Catalogs the data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Quiet | L | VT_BOOL | Optional

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Check

Checks the data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Quiet | L | VT_BOOL | Optional

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Clear

Clears the data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Quiet | L | VT_BOOL | Optional

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Close

Closes the editor and removes the data area from the collection.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Quiet | L | VT_BOOL | Optional

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Search

Searches for the first occurrence of a given string in the source code (in the syntax of the `DEFINE DATA` statement).

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | BOOL | VT_BOOL |
SearchString | A | VT_BSTR |
Line | I4 | VT_I4 | By reference
Column | I4 | VT_I4 | By reference
CaseSensitive | L | VT_BOOL | Optional
WholeWords | L | VT_BOOL | Optional
Up | L | VT_BOOL | Optional

> Return value

>   TRUE if a match was found.

> SearchString

>   The string to search for.

> Line

>   Contains the start line for the search on input. Contains the line of the first match on return.

> Column

>   Contains the start column for the search on input. Contains the column of the first match on return.

> CaseSensitive

>   Searches case sensitively. The default is FALSE.

> WholeWords

>   Searches only for whole words that match the search string. The default is FALSE.

> Up

>   Searches in upward direction. The default is FALSE.

### Replace

Replaces the first occurrence of a given string in the source code (in the syntax of the `DEFINE DATA` statement) with another one.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | BOOL | VT_BOOL |
SearchString | A | VT_BSTR |
ReplaceString | A | VT_BSTR |
Line | I4 | VT_I4 | By reference
Column | I4 | VT_I4 | By reference
CaseSensitive | L | VT_BOOL | Optional
WholeWords | L | VT_BOOL | Optional
Up | L | VT_BOOL | Optional

> Return value

>   TRUE if a match was found.

> SearchString

>   The string to search for.

> ReplaceString

>   The string which replaces the search string.

> Line

>   Contains the start line for the search on input. Contains the line of the first match on return.

> Column

>   Contains the start column for the search on input. Contains the column of the first match on return.

> CaseSensitive

>   Searches case sensitively. The default is FALSE.

> WholeWords

>   Searches only for whole words that match the search string. The default is FALSE.

> Up

>   Searches in upward direction.

### Save

Saves the data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Name | A | VT_BSTR | Optional
Library | A | VT_BSTR | Optional
Type | I4 | VT_I4 | Optional
Quiet | L | VT_BOOL | Optional

> Name

>   Saves the object under the given name.

> Library

>   Saves the object in the given library.

> Type

>   Saves the object under the given type.

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Stow

Stows the data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Name | A | VT_BSTR | Optional
Library | A | VT_BSTR | Optional
Type | I4 | VT_I4 | Optional
Quiet | L | VT_BOOL | Optional

> Name

>   Stows the object under the given name.

> Library

>   Stows the object in the given library.

> Type

>   Stows the object under the given type.

> Quiet

>   If set to TRUE, the method is performed without user interaction. The default is FALSE.

### Title

Titles an untitled data area.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Name | A | VT_BSTR | Optional
Library | A | VT_BSTR | Optional

> Name

>   Assigns a name to the data area.

> Library

>   Assigns a library to the data area.

### GetInfo

Returns information about an open object.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Type | I4 | VT_I4 | By reference
Name | A | VT_BSTR | By reference
Library | A | VT_BSTR | By reference
Fnr | I4 | VT_I4 | By reference
DBnr | I4 | VT_I4 | By reference

> Type

>   The type of the object.

> Name

>   The name of the object.

> Library

>   The library of the object.

> Fnr

>   The system file file number of the object.

> DBnr

>   The system file database number of the object.

### DeleteLines

Deletes a block of lines from the source code (in the syntax of the `DEFINE DATA` statement).

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
StartLine | I4 | VT_I4 |
LineCount | I4 | VT_I4 | Optional

> StartLine

>   The start line of the block to delete.

> LineCount

>   The number of lines to delete. The default is 1.

### GetLines

Retrieves a block of lines from the source code (in the syntax of the `DEFINE DATA` statement).

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | A | VT_BSTR |
StartLine | I4 | VT_I4 |
LineCount | I4 | VT_I4 | Optional

> Return value

>   A block of source code lines. The lines are separated by carriage return / line feed characters.

> StartLine

>   The start line of the block to return.

> LineCount

>   The number of lines to return. The default is 1.

### InsertLines

Inserts a block of lines from the source code (in the syntax of the `DEFINE DATA` statement).

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | I4 | VT_I4 |
Code | A | VT_BSTR |
InsertAfterLine | I4 | VT_I4 | Optional

> Return value

>   The line number passed in InsertAfterLine increased by the number of inserted lines.

> Code

>   A block of source code lines to insert. The lines must be separated by carriage return / line feed characters.

> InsertAfterLine

>   Line after which the code shall be inserted. The default is 0.

### ReplaceLines

Replaces a block of lines from the source code (in the syntax of the `DEFINE DATA` statement).

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | I4 | VT_I4 |
Code | A | VT_BSTR |
ReplaceLine | I4 | VT_I4 | Optional
LineCount | I4 | VT_I4 | Optional

> Return value

>   The line number passed in ReplaceLine increased by the number of inserted lines.

> Code

>   A block of source code lines to replace the block that is defined by ReplaceLine and LineCount. The lines must be separated by carriage return / line feed characters.

> ReplaceLine

>   The start line of the block to be replaced. The default is 1.

> LineCount

>   The number of lines to be replaced by the given block. The default is 1.

### On this page

- Purpose
- Properties
- Methods