Interfacing AutoCAD with JAVA

前端 未结 4 1849
醉话见心
醉话见心 2021-01-13 07:06

Any idea on interfacing with AutoCAD through a JAVA program. I am looking for a solution that can directly interface with an AutoCAD session (even start one), the way it wor

4条回答
  •  北海茫月
    2021-01-13 07:36

    We are working on a similar project. What we are doing is writing the integration code in C#, and the business logic for our project in Java.

    We are utilizing a C++ bridge that utilizes JNI to take Java calls down to C++, and then translates them back up to C#, and vice versa. Each function that needs to go from C# to Java has to be implemented in the bridge code. This is fairly involved, and there are some issues with getting the unmanaged C++ code to work with the C#, as well as the standard overhead of translating Jstrings into C# Strings and the like. The result is relatively fast, after we did some optimizations to insure that we aren't starting and stopping the JVM for each call into the Java layer.

    We previously used COM objects which were called by the AutoCAD plugin, so that would be another approach.

提交回复
热议问题