INatAutoPrograms

#### Search Results

Search

# INatAutoPrograms

This document covers the following topics:

- Purpose

- Properties

- Methods

## Purpose

Collection of the development objects currently open in a program editor window. This collection comprises the following development object types: program, subprogram, subroutine, function, helproutine, copycode, text and class. The types are identified by a numeric ID. The IDs of predefined types are defined in the section Predefined Node Types.

## Properties

The following properties are available:

- Parent

- Studio

- Count

### Parent

Used to navigate to the parent interface of this interface.

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

### Studio

Used to navigate to the root interface.

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

### Count

The number of development objects currently open in a program editor window.

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

## Methods

The following methods are available:

- Item

- Add

- Open

### Item

Returns a specific development object from the collection.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoProgram) |
Index | I4 A | VT_I4 VT_BSTR |
Type | I4 | VT_I4 | Optional
Library | A | VT_BSTR | Optional
Fnr | I4 | VT_I4 | Optional
DBnr | I4 | VT_I4 | Optional

> Return value

>   The development object identified by the value specified in Index.

> Index

>   Identifies a specific development object in the collection. This can be either the index of the development object in the collection (a value between 1 and Count) or the name of the object.

> Type

>   Used to identify a specific object by name (specified in Index) and type (specified in Type).

> Library

>   Used to identify a specific object by name (specified in Index), type (specified in Type) and library (specified in Library).

> Fnr, DBnr

>   Used to identify a specific object by name (specified in Index), type (specified in Type), library (specified in Library) and system file (specified in Fnr and DBnr).

### Add

Creates a new (untitled) development object and opens it in a program editor window.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoProgram) |
Type | I4 | VT_I4 |
Visible | L | VT_BOOL | Optional

> Return value

>   The newly created development object.

> Type

>   The type of object to create.

> Visible

>   Decides if the editor is opened visible or not. By default, the editor is opened visible.

### Open

Opens an existing development object in a program editor window.

#### Parameters

Name | Natural Data Format | Variant Type | Remark
--- | --- | --- | ---
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoProgram) |
Type | I4 | VT_I4 |
Name | A | VT_BSTR |
Library | A | VT_BSTR | Optional
Visible | L | VT_BOOL | Optional
ReadOnly | L | VT_BOOL | Optional

> Return value

>   The newly opened development object.

> Type

>   The type of object to open.

> Name

>   The name of object to open.

> Library

>   The library of object to open.

> Visible

>   Decides whether the editor is opened visible or not. By default, the editor is opened visible.

> ReadOnly

>   Decides whether the object is listed only instead of opened. In this case, the object is not locked and cannot be modified. If the option ReadOnly is specified, also the types dialog, local data area, parameter data area and global data area can be specified in the parameter Type. This is the case because Natural Studio lists also these object types in the program editor.

### On this page

- Purpose
- Properties
- Methods