失效链接处理 |
Creo 二次开发JAVA接口使用向导,说明书 PDF 下载
本站整理下载:
相关截图:
主要内容:
Setting Up Your Machine
See Java Options and Debugging on page 704 for more information about
supported Java Virtual Machines and how to setup Creo application.
Setting Up a Synchronous Creo Object
TOOLKIT Java Program
A synchronous Creo Object TOOLKIT Java application is started and managed by
Creo application. Control belongs to either Creo or the application, but not both at
the same time.
All Creo Object TOOLKIT Java applications must be packaged as a jar. The
.class files will be ignored, even if their locations are present either in the
java_app_classpath field in the registry file, or in the classpath. Refer to
the section Unlockin on page 23, for more information.
You can run synchronous Creo Object TOOLKIT Java programs as standalone
applications or model-specific programs. Most of the required settings for these
two programs are independent of the programs themselves. This enables you to
convert an application program to a model program, or vice versa.
Standalone Applications
You can start the Creo Object TOOLKIT Java application independently at any
time, regardless of which models are in session. A registry file contains key
information regarding the execution of the program.
Using application programs you can make additions to the Creo user interface,
gather or change data associated with the models in session, or add session-level
ActionListener routines.
Registry File
A registry file contains Creo-specific information about the standalone application
you want to load.
The registry file called creotk.dat or protk.dat is a simple text file, where
each line consists of one predefined keyword followed by a value. The standard
form of the creotk.dat or protk.dat file is as follows:
name java_demo
startup otk_java
toolkit object
creo_type direct
java_app_class MyJavaApp
java_app_classpath <full path to the application classes
and archives>
java_app_start start
14 Creo Object TOOLKIT JavaUser’s Guide
java_app_stop stop
allow_stop true
delay_start true
text_dir <path to text directory used by
message and menu related commands>
end
The fields of the registry file are as follows:
• name—Assigns a unique name to this Creo Object TOOLKIT Java
application. The name identifies the application when there is more than one
in the creotk.dat or protk.dat file. The maximum size of the name is
31 characters for the name, plus the end-of-string character. • startup—Specifies the method Creo should use to communicate with the
Creo Object TOOLKIT Java application. For Creo Object TOOLKIT Java
applications, set startup to otk_java. • toolkit—Specifies the name of the Toolkit which was used to create the
customization. The valid values for this field are object and protoolkit.
An application created in Creo Object TOOLKIT Java must always have the
value of this field set as object.
|