13.2. Using the Library in Client Applications

Engineering Knowledge Manager

Administration Guide | Chapter 13: EKM Client API |

13.1. Installing the API Library |  | 13.2.1. Opening and Closing a Connection
Prev |  | Next

## 13.2. Using the Library in Client Applications

The following sections describe how to use the library in C#, Java, and Python. This includes covering the various features of the API. There are some differences in the library depending on which language is being used.

First, method names in the library follow the standard coding style for each language.

Java

  Methods are camelcase and start with lowercase letters. For example, findByPath

C#

  Methods are camelcase and start with uppercase letters. For example, FindByPath

Accessing attributes of objects also follows standard conventions for each language.

Java

  Attribute values are retrieved using “getter” methods. For example, someObject.getPath()

  Attribute values are assigned using “setter” methods. For example, someObject.setName(“foo”)

C#

  Attribute values are retrieved by name or “getter” methods. For example, someObject.Path or someObject.getName()

  Attribute values are set using assignment or “setter” methods. For example, someObject.Name = “foo” or someObject.setValue(“foo”)

The Python code reflects these differences depending on whether the interpreter uses Java (Jython) or .NET (IronPython).

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

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