INatAutoEnvironments

This document covers the following topics:


Purpose

Collection of the development environments that have once been connected during the current Natural Studio session. This includes the local environment. Remote environments are only available with Natural Single Point of Development. See also Remote Development Using SPoD.

Properties

The following properties are available:

Parent

Used to navigate to the parent interface of this interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoSystem) 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 environments in the collection.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

LocalEnvironment

Returns the local environment.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoEnvironment) Get only

RemoteEnvironment

This property is useful only for Natural system commands and utilities. If a Natural system command or utility is executed in the local environment, but is supposed to operate on a certain remote environment, this propery returns that remote environment. Otherwise it returns NULL-HANDLE.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoEnvironment) Get only

ActiveEnvironment

Returns the currently active environment. Returns NULL-HANDLE if no environment is active.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoEnvironment) Get only

Methods

The following methods are available:

Item

Retrieves a specific environment from the collection.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoEnvironment)  
Index

I4
A

VT_I4
VT_BSTR

 
Return value

The environment identified by the value specified in Index.

Index

Identifies a specific environment in the collection. This can be either the index of the environment in the collection (a value between 1 and Count) or the name of the environment. The name of the environment is the value of the property INatAutoEnvironment::Name.

Add

Maps a remote environment, adds it to the collection and activates it. Returns the environment.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoEnvironment)  
Host A VT_BSTR Optional
Port I4 VT_I4 Optional
Alias A VT_BSTR Optional
CommandLine A VT_BSTR Optional
UserID A VT_BSTR Optional
Password A VT_BSTR Optional
Quiet L VT_BOOL Optional
IgnoreWarnings L VT_BOOL Optional
Visible L VT_BOOL Optional
Return value

The newly mapped environment.

Host

The host name of the development server.

Port

The port number of the development server.

Alias

An alias name for the environment that is displayed in the library workspace. If no alias name is specified, a unique name will be generated.

CommandLine

A command line containing additional dynamic parameters under which the environment will be running.

UserID

The user ID under which the environment will be mapped.

Password

The password of the user ID under which the environment will be mapped.

Quiet

If set to FALSE or not specified, the Map Environment dialog is shown and is preset with the given parameters.

If set to TRUE, the Map Environment dialog is not shown.

IgnoreWarnings

If set to FALSE or not specified, warnings that occur during mapping are treated like errors.

If set to TRUE, warnings are ignored.

Visible

If set to TRUE or not specified, the environment is displayed in the library workspace.

If set to FALSE, the environment is not displayed.