Version 6.3.13 for Windows
 —  Extending Natural Studio with Plug-ins  —

INatAutoEnvironment

This document covers the following topics:


Purpose

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

Top of page

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 (INatAutoEnvironments) Get only

Studio

Used to navigate to the root interface.

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

Local

TRUE if this is the local environment.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Active

TRUE if this is the active environment.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Connected

TRUE if this environment is currently connected.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Name

The name of the environment. This name can be used in the method INatAutoEnvironments::Item to identify a specific environment uniquely.

Natural Data Format Variant Type Remark
A VT_BSTR  

Host

The host name of the development server.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Port

The port number of the development server.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

Alias

The alias name of the environment as displayed in the library workspace.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

CommandLine

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

Natural Data Format Variant Type Remark
A VT_BSTR Get only

UserID

The user ID under which the environment is mapped.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Parameters

Returns an interface to the NATPARM parameters of this environment.

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

SystemVariables

Returns an interface to the system variables of the environment.

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

Top of page

Methods

The following methods are available:

Activate

Makes this environment the active one. An environment cannot explicitly be deactivated. An environment is implicitly deactivated when another one is activated.

This method is not applicable to environments that are disconnected.

Parameters

Name Natural Data Format Variant Type Remark
Visible L VT_BOOL Optional
Visible

This parameter can be used to temporarily activate a different environment and then reactivate the previous environment, without affecting the user interface.

If set to TRUE or not specified, the newly activated environment is selected in the library workspace.

If set to FALSE, the previously active environment stays selected.

Disconnect

Disconnects the environment and closes the development server session. If this environment was the active one, the previously active environment gets activated.

This method is not applicable to the local environment.

Connect

Reestablishes the connection to a previously disconnected environment. Activates the connected environment.

Parameters

Name Natural Data Format Variant Type Remark
Password A VT_BSTR Optional
Quiet L VT_BOOL Optional
IgnoreWarnings L VT_BOOL Optional
Password

The password of the user ID under which the environment was previously connected.

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 connecting are treated like errors.

If set to TRUE, warnings are ignored.

Unmap

Unmaps the environment, disconnects it and closes the development server session. If this environment was the active one, the previously active environment gets activated.

This method is not applicable to the local environment.

Top of page