wang2006zhi 发表于 2024-9-9 10:35:15

选取对象截图

      // 选取对象截图
      // Export、JPGOUT、PNGOUT
      object oCad = Acap.AcadApplication;
      Type tpCad = oCad.GetType();
      object oDoc = tpCad.InvokeMember("ActiveDocument", BindingFlags.GetProperty, null, oCad, null);
      Env.Editor.SSGet();
      Type tpDoc = oDoc.GetType();
      object ass = tpDoc.InvokeMember("ActiveSelectionSet", BindingFlags.GetProperty, null, oDoc, null);
      var path=Environment.GetFolderPath(Environment.SpecialFolder.Desktop);//获取桌面路径
      tpDoc.InvokeMember("Export", BindingFlags.InvokeMethod, null, oDoc,
            new object[] {path, "wmf", ass});
      Env.Editor.SetImpliedSelection(new ObjectId[] { });

和尚777 发表于 2024-9-9 16:57:01

用ifox的wmf转emf后,emf就能搞到剪贴板了
页: [1]
查看完整版本: 选取对象截图