1. gcad执行快捷键有问题?
    尝试修改Setvar("autocompletemode", "19");原因是’输入按键时显示建议列表’这个项打钩了,这里首先捕捉的是lisp定义的命令,而不是pgp.
  2. 设置了系统变量:Dynmode,0动态输入,这个参数将导致zoom缩放的时候,鼠标会发生跳动,并有一定几率停留在边界.
    一定要多用zoom测试,即使不设置这个参数也是有一点几率发生鼠标跳动,只是设置了更容易看见这个问题,并且会产生停留.

  3. gcad的net的选择集参数有误. (最新的2019已经解决)
         //定义选择集选项
    
          PromptSelectionOptions pso = new PromptSelectionOptions
    
          { 
    
           // SingleOnly = true,                   //不需要空格确认,但是浩辰会变成鼠标单框
    
              SelectEverythingInAperture = true,   //鼠标单框
    
          };
    #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();
    }
    }
    }
    }
  4. gcad的net的组块问题,这里将导致图元出现不可选择的问题..
    这里是一个很严重的问题,我的习惯是先生成图元到内存中,然后进行矩阵移动,最后再添加到数据库内.acad是允许这样操作的,这样操作也很符合常规思维,
    如果不能修复这个问题,那么将要先计算好再生成或者先生成到数据库再进行矩阵变换,
    前者编程思维要改变,代码改动很大,后者用户操作时候会发生卡顿等.
  5. #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;
    #else
    using GrxCAD.DatabaseServices;
    using GrxCAD.EditorInput;
    using GrxCAD.Geometry;
    using GrxCAD.ApplicationServices;
    using GrxCAD.Runtime;
    #endif
    using System;
    using static JingJingBoxDD.CadSystem; public class Command_jjline
    {
    [CommandMethod("LL", CommandFlags.Modal | CommandFlags.DocExclusiveLock)]
    public static void LL()
    {
    Database db = HostApplicationServices.WorkingDatabase;//当前的数据库
    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; try
    {
    PromptPointOptions ppo1 = new PromptPointOptions("\n指定第一点:");
    PromptPointResult ppr1 = ed.GetPoint(ppo1);//用户点选
    if (ppr1.Status != PromptStatus.OK)
    {
    return;
    } PromptPointOptions ppo2 = new PromptPointOptions("\n指定另一点:")
    {
    UseBasePoint = true,
    BasePoint = ppr1.Value
    };
    PromptPointResult ppr2 = ed.GetPoint(ppo2);//用户点选
    if (ppr2.Status != PromptStatus.OK)
    {
    return;
    } //生成xline
    using (Transaction tr = db.TransactionManager.StartTransaction())
    {
    //块表
    BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForWrite);
    Line line = new Line
    {
    StartPoint = ppr1.Value,
    EndPoint = ppr2.Value,
    };
    //添加一个新的块表记录,这个记录将存放块参照的所有图元
    BlockTableRecord btrNew = new BlockTableRecord { Name = "test", Origin = line.StartPoint };
    btrNew.AppendEntity(line);
    bt.Add(btrNew);
    tr.AddNewlyCreatedDBObject(btrNew, true);//添加新创建的数据库对象 //新建块参照加入到当前空间
    BlockReference br = new BlockReference(line.StartPoint, btrNew.ObjectId)
    {
    ScaleFactors = new Scale3d()
    }; //当前空间的块表记录
    BlockTableRecord btrCu = (BlockTableRecord)tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite);
    var brId = btrCu.AppendEntity(br); //加入块表记录 //※※※※※※※※※※※※※※※※※ tr.AddNewlyCreatedDBObject(br, true); //这句如果在变形之后,将导致浩辰不可以选择块 //计算变换矩阵
    Matrix3d mt = Matrix3d.Rotation(Math.PI, Vector3d.ZAxis, line.StartPoint);
    Entity ent = (Entity)brId.GetObject(OpenMode.ForWrite);
    ent.TransformBy(mt); tr.AddNewlyCreatedDBObject(br, true); //这句如果在变形之后,将导致浩辰不可以选择块 btrCu.DowngradeOpen();
    br.DowngradeOpen();
    tr.Commit();
    }
    }
    catch (System.Exception e)
    {
    ed.WriteMessage(e.Message);
    throw e;
    }
    }
    }

    gcad.net与acad不同的地方,新建文字样式的时候如果用到.TTF字体,直接写字体名称就好了,不能够写"新宋体.TTF"不然浩辰出现以下情况:
    看上去是乱码的一坨东西,和文字样式面板的字体名多了个.TTF.SHX(X)
    而acad需要写".TTF".后缀名.那么此时是不是没有区分shx和ttf呢?

  6. 注册表问题:  string KEY = HostApplicationServices.Current.RegistryProductRootKey; //这里浩辰读出来是空字符串

  7. 注册表问题:  gcad一个注册表问题浩辰注册表在net4.0及以上工程获取注册表会出现以下问题,而用这在net3.5是没有的..

    要将代码改成以下获取:

    var copys = Registry.CurrentUser.OpenSubKey(@"Software\\Gstarsoft\\GstarCAD\\R19\\zh-CN\\");
    var b = copys.GetValueNames(); foreach (var item in b)
    {
    string sz = copys.GetValue(item).ToString();
    sz = sz.Remove(sz.IndexOf('\0'));
    Console.WriteLine(sz);
    }

一些浩辰设置及它的bug?的更多相关文章

  1. [易飞]设置导入导出规则-小BUG

    易飞系统在系统设置中-有设置导入导出规则,进行数据导入导出. 测试一:导入录入交易对象.从A账套导出到B账套,OK没有问题. 测试二:设置采购单单据性质. 导出结果: 怎么回事?把所有单据性质都导出了 ...

  2. cad.net 复制图元的时候按下多次esc导致复制中断的bug,令REGEN,REGENALL更新图元无效.

    浩辰没有这个bug !!!!!!! 如上述动图所示,cad在复制一个多图元的操作时候,多次按下esc键中断复制操作, **注意例子要有足够多的图元(大概一万个图元),才能很好展示这个bug,而且这个b ...

  3. ASP.NET MVC+EF框架+EasyUI实现权限管理系列(22)-为用户设置角色

    ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇)   (1):框架搭建    (2):数据库访问层的设计Demo    (3):面向接口编程   (4 ):业务逻辑层的封装    ...

  4. margin的BUG

    在进行简单的div盒子嵌套时,发现设置margin-top时存在bug,然后就去谷歌搜索了一下,发现margin确实存在bug. bug的现象是父子元素嵌套时,如果子元素是块元素时,对块元素设置mar ...

  5. 【原创】基于禅道的Bug管理操作规范

    1. 禅道简介 禅道是一个基于"敏捷开发"模式的软件开发全生命周期管理软件,在国内的软件开发公司里占据了超过70%的份额,从大公司到小公司,都能适用. 禅道官网:http://ww ...

  6. 【原创】Bug管理操作规范个人经验总结

    1. 禅道简介 禅道是一个基于“敏捷开发”模式的软件开发全生命周期管理软件,在国内的软件开发公司里占据最大的份额,从大公司到小公司,都能适用. 笔者使用禅道多年,根据自己的经验总结了一套Bug管理的方 ...

  7. 本地IP,掩码,网关,DNS设置

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  8. 无需SherlockActionbar的SlidingMenu使用详解(一)——通过SlidingMenu设置容器并解决滑动卡顿的问题

    想必很多人都听过这个开源框架,一年前真的是风靡一时.只是它的配置较为繁琐,还需要sherlockActionbar的支持,我这里下载了最新的开源库,并且在实际用套用了AppCompat的官方库,这样就 ...

  9. 【iOS开发-56】案例BUG:button的enabled、控件的userInteractionEnabled以及两种提示框UIAlert和UIActionSheet

    接上述案例找BUG:[iOS开发-51]案例学习:动画新写法.删除子视图.视图顺序.延迟方法.button多功能使用方法及icon图标和启动页设置 (1)BUG:答案满了就不能再点击optionbut ...

随机推荐

  1. 得到一个Object的属性

    private static object GetPropertyValue(object obj, string property) { System.Reflection.PropertyInfo ...

  2. [C#.Net]对WinForm应用程序的App.config的使用及加密

    我们在写C#应用程序时,在工程文件中放置一个app.config,程序打包时,系统会将该配置文件自动编译为与程序集同名的.exe.config 文件.作用就是应用程序安装后,只需在安装目录中找到该文件 ...

  3. [C#]this.Invoke和this.BeginInvoke的区别

    private void button1_Click(object sender, EventArgs e) { "; this.Invoke(new EventHandler(delega ...

  4. HttpMethods(C#.net)

    HttpMethods  (C#.Net) using System; using System.Collections.Generic; using System.Linq; using Syste ...

  5. Python之生成器及内置函数篇4

    一.可迭代对象 #1.什么是迭代?:迭代是一个重复的过程,并且每次重复都是基于上一次的结果而来 #2.可迭代的对象:在python中,但凡内置有__iter__方法的对象,都是可迭代的对象 #3.迭代 ...

  6. Bootstrap之javascript组件

    一 模态框 模态框放在body标签里面的,是body标签的子元素 静态实例: <div class="modal fade" tabindex="-1" ...

  7. 黑白二值图像周长测量--C#实现

    假设是单像素线白色用1(对应RGB(255,0,0))表示,背景用0(对应RBG(0,0,0))表示. 考虑3种类型的边界 水平方向  0->1  1->0   类似垂直方向也是0-> ...

  8. 使用spring boot +WebSocket实现(后台主动)消息推送

    言:使用此webscoket务必确保生产环境能兼容/支持!使用此webscoket务必确保生产环境能兼容/支持!使用此webscoket务必确保生产环境能兼容/支持!主要是tomcat的兼容与支持. ...

  9. PHP时间范围:本周、本月、下月等简写

    在阅读TP5.1源码,发现其在时间范围上的写法很特别,个人第一次见,做一次记录 $timeRule = [ 'today' => ['today', 'tomorrow'], 'yesterda ...

  10. sizeof新用法(c++11)

    1.概念 1)sizeof是关键字,也是运算符,用来求对象占用空间的大小,返回字节数 2)c++11允许使用作用域运算符(::)来获取类中成员的大小,以前只允许先创建一个类的对象,通过类对象访问成员得 ...