Introduction to the API
This chapter provides an introduction to the Creo Schematics Application Programmer’s Interface (API).
Introduction
The Creo Schematics Application Programmer’s Interface (API) enables you to create applications using the functions provided.
The API contains the following packages:
• Component (rsdesign.component)
• Design (rsdesigner.design)
• Uiextension (rsdesigner.uiextension)
The Utils class has methods that can be used to trace connections, check design rules, or hook tool methods to Java buttons in
Creo Schematics. For more information on the Utils class, refer to
Class Utils.
Examples for using the Java API can be found in the installation directory, <install>\Schematics\creoschematics\java_examples.
Using an External Application to Debug a Java Class
You can use a 3rd party application to debug the Java API methods.
Before running Creo Schematics, set the following environment variables on your computer:
• DEBUG_JAVA=true
• CLIENT_CLASSPATH to point to the folder where the class files are stored.
Run Creo Schematics. When the application starts the line Listening for transport dt_socket at address: 54348 is displayed in the console window. The number is the port number to be used in the debug application.
|
To run the application with a console window you must select the Display console window check box in the Environment page of the Creo Schematics Options dialog box. For more information search the Help.
|
Connecting from an External Application
In the external application, create a connection with the following settings:
1. Connection Type: Standard (Socket Attach)
2. Host: LocalHost
3. Port: use the port number displayed in the console window