一些桌子的问题移步去: cad问题小百科_Acad (浩辰可能和桌子具有相同的问题,所以建议你也去看)

若大家对以下问题有更好的解决方案,可以评论中用 #20071编号 的进行评论,以便更好沟通~

 

系统变量: autocompletemode,19

原因是"输入按键时显示建议列表"这个项打钩了,这里首先捕捉的是lisp定义的命令,而不是pgp.

 

#102 鼠标跳动

系统变量: Dynmode,0

动态输入,这个参数将导致zoom缩放的时候,鼠标会发生跳动,并有一定几率停留在边界.

一定要多用zoom测试,即使不设置这个参数也是有一点几率发生鼠标跳动,只是设置了更容易看见这个问题,并且会产生停留.
国产篇 cad问题小百科_Gcad

 

#103 gcad.net选择集参数有误.

gcad2019已经解决

//定义选择集选项
      PromptSelectionOptions pso = new PromptSelectionOptions
      { 
          // SingleOnly = true,                //不需要空格确认,但是浩辰会变成鼠标单框
          SelectEverythingInAperture = true,   //鼠标单框
      };
国产篇 cad问题小百科_Gcad
#if !HC2019
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.DatabaseServices.Filters;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.GraphicsInterface;
#else
using GrxCAD.DatabaseServices;
using GrxCAD.EditorInput;
using GrxCAD.Geometry;
using GrxCAD.ApplicationServices;
using GrxCAD.Runtime;
using GrxCAD.Colors;
using GrxCAD.GraphicsInterface;
#endif
using System.Collections.Generic;
using System.Linq;

namespace JJBoxGstarCad_2019
{
    public static class Test
    {
        //请先先用gcad测试test1和test2,可以看到两段代码的作用是一样的.
        //然后再用acad测试test1和test2,可以看到test2中的SingleOnly的作用.
     
        // SingleOnly = true的作用应该是"选择了图元后不需要空格确认"立马成为一个选择集,而不是成为一个鼠标单选框.
        // SelectEverythingInAperture = true,为鼠标单框.
         
        [CommandMethod("test1", CommandFlags.Modal | CommandFlags.UsePickSet)]
        public static void Test1()
        {
            Database db = HostApplicationServices.WorkingDatabase;//当前的数据库
            DocumentCollection doc = Application.DocumentManager;
            Editor ed = doc.MdiActiveDocument.Editor;
           
            //定义选择集选项
            PromptSelectionOptions pso = new PromptSelectionOptions
            {
                AllowDuplicates = false,  //重复选择
               // SingleOnly = true,        //不需要空格确认,但是浩辰会变成单选
                SelectEverythingInAperture = true,   //鼠标单框
            };  
            var ssPsr = ed.GetSelection(pso);
            if (ssPsr.Status != PromptStatus.OK) return;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                foreach (var id in ssPsr.Value.GetObjectIds())//遍历选择集亮显测试用
                {
                    var ent = (Entity)id.GetObject(OpenMode.ForRead);
                    ent.Highlight();
                } 
                tr.Commit();
            } 
        }

        [CommandMethod("test2", CommandFlags.Modal | CommandFlags.UsePickSet)]
        public static void Test2()
        {
            Database db = HostApplicationServices.WorkingDatabase;//当前的数据库
            DocumentCollection doc = Application.DocumentManager;
            Editor ed = doc.MdiActiveDocument.Editor;
 
            //定义选择集选项
            PromptSelectionOptions pso = new PromptSelectionOptions
            {
                AllowDuplicates = false,  //重复选择
                SingleOnly = true,        //不需要空格确认,但是浩辰会变成单选
               // SelectEverythingInAperture = true,   //鼠标单框
            };
            var ssPsr = ed.GetSelection(pso);
            if (ssPsr.Status != PromptStatus.OK) return; 
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                foreach (var id in ssPsr.Value.GetObjectIds())//遍历选择集亮显测试用
                {
                    var ent = (Entity)id.GetObject(OpenMode.ForRead);
                    ent.Highlight();
                }
                tr.Commit();
            }
        } 
    }
}
View Code

相关文章:

  • 2021-05-14
  • 2022-02-08
  • 2021-12-25
  • 2022-01-15
  • 2021-11-24
  • 2022-12-23
  • 2021-10-21
  • 2021-11-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案