• 大小: 896KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-08
  • 语言: Java
  • 标签: java  CAD  AutoCAD  调用cad  

资源简介

利用Jacob调用AutoCAD接口绘图,实现绘制图形,不是调用Windows绘制图形界面,是真正的调用AutoCAD绘图,只是给了测试代码,具体功能自己摸索

资源截图

代码片段和文件信息

package com.jacob;

import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;

public class JavaToCad {

public static void main(String[] args) {
//此程序会创建一个新的AutoCAD实例
        ComThread.InitSTA();//开启线程
        ActiveXComponent axc = new ActiveXComponent(“AutoCAD.Application“);
        axc.setProperty(“Visible“ new Variant(true));
        Dispatch os = axc.getobject();
        Dispatch activeDocument = Dispatch.call(os “ActiveDocument“).getDispatch();
        Dispatch modelSpace = Dispatch.call(activeDocument “ModelSpace“).getDispatch();
        double[] centerPoint={100.0100.00.0};
        double radius=100.0;
        double[] startPoint = {100100200};
        double[] endPoint = {

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4008  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\allclasses-frame.html

     文件       3448  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\allclasses-noframe.html

     文件      49657  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\ActiveXComponent.html

     文件      17796  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\ActiveXDispatchEvents.html

     文件      15032  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\ActiveXInvocationProxy.html

     文件      10591  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\class-use\ActiveXComponent.html

     文件       6002  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\class-use\ActiveXDispatchEvents.html

     文件       6012  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\class-use\ActiveXInvocationProxy.html

     文件       1202  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\package-frame.html

     文件       6742  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\package-summary.html

     文件       6880  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\package-tree.html

     文件       6783  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\activeX\package-use.html

     文件       7552  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\ComException.html

     文件       5912  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\ComFailException.html

     文件       5842  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\ComThread.html

     文件      10692  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\Currency.html

     文件       5882  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\DateUtilities.html

     文件      46713  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\Dispatch.html

     文件       7599  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\DispatchEvents.html

     文件       5932  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\DispatchIdentifier.html

     文件       5882  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\DispatchProxy.html

     文件       7578  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\EnumVariant.html

     文件      11101  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\InvocationProxy.html

     文件       6012  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\InvocationProxyAllVariants.html

     文件       9793  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\JacobException.html

     文件      16305  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\Jacobobject.html

     文件       5912  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\JacobReleaseInfo.html

     文件       5882  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\LibraryLoader.html

     文件       7529  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\MainSTA.html

     文件       5982  2011-10-02 11:37  Java调AutoCAD接口\jacob-1.16-M1\jacob-1.16-M1\docs\api\com\jacob\com\class-use\NotImplementedException.html

............此处省略99个文件信息

评论

共有 条评论