Start a Job via PRO API using C#
Prerequisites
Get a C# environment for developing applications. Here we assume you’re using Visual Studio.
If you don’t have Visual Studio installed, you may get it on Microsoft’s website: Install Visual Studio.
Get AIMMS PRO API via AIMMS PRO Portal
Log into AIMMS PRO
Go to Help > getting started
Download AIMMS PRO API
Move it to a convenient location, and unzip the archive
Running the Example
First publish the example application.
You can find the example model in
.\pro-api-complete\examples\AimmsModel\PROApiExampleApplication.aimms
. Create an aimmspack, sayPROApiExampleApplication.aimmspack
, and publish it on your AIMMS PRO system, for instance using the namePROApiExampleApplication
and version1
.Adapt application details presented on lines 14 - 30.
Line 14,
PRO_ENDPOINT
: this might also bewss://your-cloud-name.cloud.aimms.com
when connection encrypted, start with
wss
(cloud systems are always encrypted).when connection not encrypted, start with
ws
Lines 32-34,
PRO_ENVIRONMENT
,USERNAME
, andUSER_PASSWORD
should have been supplied by your AIMMS PRO administrator.Lines 38-39,
PRO_APPLICATION_NAME
,PRO_APPLICATION_VERSION
, the name and version of the app as it is published.
Build the application using Visual Studio Menu > Build > Build.
Run the application.
Output
The output is the same as when using Java. See Start a Job via PRO API using Java.
Further Reading
See also the manual on PRO API.