This document covers the following topics:
A development object currently open in a program editor window. This 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 described in the section Predefined Node Types.
The following properties are available:
Used to navigate to the parent interface of this interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoPrograms) | Get only |
Used to navigate to the root interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoStudio) | Get only |
The source code of the development object.
Natural Data Format | Variant Type | Remark |
---|---|---|
A | VT_BSTR |
Shows or hides the editor window.
Natural Data Format | Variant Type | Remark |
---|---|---|
L | VT_BOOL |
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 |
The number of lines in the source code.
Natural Data Format | Variant Type | Remark |
---|---|---|
I4 | VT_I4 | Get only |
The following methods are available:
Catalogs the object. Applicable to program, subprogram, subroutine, function, helproutine and class.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Quiet | L | VT_BOOL | Optional |
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Checks the object. Applicable to program, subprogram, subroutine, function, helproutine and class.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Quiet | L | VT_BOOL | Optional |
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Clears the editor contents.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Quiet | L | VT_BOOL | Optional |
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Closes the editor and removes the object from the collection.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Quiet | L | VT_BOOL | Optional |
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Executes the object. Applicable to program.
Formats the source code.
Sets several modes of the object.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Structured | L | VT_BOOL | Optional |
Uppercase | L | VT_BOOL | Optional |
IgnoreTextConstants | L | VT_BOOL | Optional |
Sets structured mode. The default is determined by the Natural parameter settings.
Sets uppercase mode. The source code will then be converted to upper case during Save. The default is FALSE.
Makes sure that text constants are left untouched during upper case conversion. The default is FALSE.
Renumbers the source code.
Searches for the first occurrence of a given string.
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 |
TRUE if a match was found.
The string to search for.
Contains the start line for the search on input. Contains the line of the first match on return.
Contains the start column for the search on input. Contains the column of the first match on return.
Searches case sensitively. The default is FALSE.
Searches only for whole words that match the search string. The default is FALSE.
Searches in upward direction. The default is FALSE.
Replaces the first occurrence of a given string with another one.
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 |
TRUE if a match was found.
The string to search for.
The string which replaces the search string.
Contains the start line for the search on input. Contains the line of the first match on return.
Contains the start column for the search on input. Contains the column of the first match on return.
Searches case sensitively. The default is FALSE.
Searches only for whole words that match the search string. The default is FALSE.
Searches in upward direction. The default is FALSE.
Runs the object. Applicable to program.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Quiet | L | VT_BOOL | Optional |
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Saves the object.
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 |
Saves the object under the given name.
Saves the object in the given library.
Saves the object under the given type.
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Stows the object. Applicable to program, subprogram, subroutine, function, helproutine and class.
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 |
Stows the object under the given name.
Stows the object in the given library.
Stows the object under the given type.
If set to TRUE, the method is performed without user interaction. The default is FALSE.
Titles an untitled object.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Name | A | VT_BSTR | Optional |
Library | A | VT_BSTR | Optional |
Assigns a name to the object.
Assigns a library to the object.
Returns information about an open object.
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 |
The type of the object.
The name of the object.
The library of the object.
The system file file number of the object.
The system file database number of the object.
Deletes a block of lines from the source code.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
StartLine | I4 | VT_I4 | |
LineCount | I4 | VT_I4 | Optional |
The start line of the block to delete.
The number of lines to delete. The default is 1.
Retrieves a block of lines from the source code.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | A | VT_BSTR | |
StartLine | I4 | VT_I4 | |
LineCount | I4 | VT_I4 | Optional |
A block of source code lines. The lines are separated by carriage return / line feed characters.
The start line of the block to return.
The number of lines to return. The default is 1.
Inserts a block of lines from the source code.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | I4 | VT_I4 | |
Code | A | VT_BSTR | |
InsertAfterLine | I4 | VT_I4 | Optional |
The line number passed in InsertAfterLine increased by the number of inserted lines.
A block of source code lines to insert. The lines must be separated by carriage return / line feed characters.
Line after which the code shall be inserted. The default is 0.
Replaces a block of lines from the source code.
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 |
The line number passed in ReplaceLine increased by the number of inserted lines.
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.
The start line of the block to be replaced. The default is 1.
The number of lines to be replaced by the given block. The default is 1.