Skip to content

Aimsun Next API Log Window Display

In C++ and Python

Explanation

Print a string in the Log Window.

Format
void AKIPrintString(char *string);
Parameters:
  • string: String to display.
Output
  • None

In C++:

Explanation

Print a Unicode string in the Log window.

Format
void AKIPrintAsUNICODEString(const unsigned short *string);
Parameters
  • string: the string to be printed
Output

None.

In Python:

Not Available.

Convert a Unicode string to ASCII string

In C++ and Python:

Explanation

Converts a Unicode string to char* . The returned string must subsequently be deleted.

In Python APIs, all strings should be Ascii so all the functions returning a Unicode string (i.e. const unsigned short *) should be passed through the AKIConvertToAsciiString function to get the proper string.

Format
const char *AKIConvertToAsciiString(const unsigned short *string, bool deleteUshortString, bool *anyNonAsciiChar);
Parameters
  • string: Unicode string.
  • deleteUshortString: True to delete the parameter string.
  • anyNonAsciiChar: Returns true if there was any non-convertible character.
Output

The converted string.

Convert ASCII string to Unicode string

In C++:

Explanation:

Convert an ascii string into a Unicode string.

Format
const unsigned short *AKIConvertFromAsciiString(const char *ascii);
Parameters
  • ascii: The ascci string to convert.
Output

The converted string

In Python:

Not Available.

Delete a Unicode String

In C++:

Explanation

Deletes the memory allocated for string either having previously called the AKIConvertFromAsciiString function.

Format
void AKIDeleteUNICODEString( const unsigned short *string );
Parameters
  • string: The string to delete.
Output:

None.

In Python

Not Available.

Delete an ASCII String

In C++:

Explanation

Deletes the memory allocated for string either having previously called the AKIConvertToAsciiString function.

Format
void AKIDeleteASCIIString( const char *string );
Parameters
  • string: The string to delete.
Output

None.

In Python:

Not Available.