4.2.5. Using the CORBA Interfaces

There are two ways to include the CORBA interfaces in your client application depending on your needs and development platform.

Building From Interface Definition Language (IDL) Files

You can build the interface modules for any CORBA-enabled language by compiling the supplied Interface Definition Language (IDL) file using a suitable 3rd-party CORBA compiler. The IDL file is provided in the following location in the ANSYS install tree:

v182\fluent\fluent18.2.0\addons\corba\<ARCH>\CoFluentUnit.idl

Refer to the documentation for your CORBA implementation and development environment for details on how to compile this IDL file and include the resulting modules in your application.

Using the Pre-Built .NET Connector

If you are using .NET for your client application, you can load a pre-built DLL that contains wrappers for the CORBA interfaces. Two DLLs are available, depending on your version of .NET.

v182\fluent\fluent18.2.0\addons\corba\DotNetFramework35\DotNetCoFluentUnit.dll
v182\fluent\fluent18.2.0\addons\corba\DotNetFramework40\DotNetCoFluentUnit.dll

Including DotNetCoFluentUnit.dll makes available the following classes in the AAS_CORBA namespace.

DotNetCoFluentUnit

has as methods wrappers for each of the functions listed in ICoFluentUnit.

The DotNetCoFluentUnit class also makes available two additional methods.

void ConnectToServerFromIorFile(string p_stringIorFile);

takes as input the name of a Fluent as a Server key file and uses it to instantiate a CORBA connection to the Fluent server.

DotNetCoFluentSchemeController getDotNetCoFluentSchemeControllerInstance();

returns a Scheme controller object that makes available (through wrappers) the methods listed in ICoFluentSchemeController. When using the .NET connector, this method should be used rather than directly using the getSchemeControllerInstance method as it handles typing that may otherwise not be handled correctly.

DotNetCoFluentSchemeController

has as methods wrappers for the functions listed in ICoFluentSchemeController.

DotNetCoFluentUnitError

defines an exception for errors returned by the .NET wrappers.

DotNetCoFluentUnitError
{
long long m_iCode;
string m_stringDescription;
string m_stringInterfaceName;
string m_stringMoreInfo;
string m_stringName;
string m_stringOperation;
string m_stringScope
};


Release 18.2 - © ANSYS, Inc. All rights reserved.