你有种再说一遍 发表于 2024-11-2 20:36:05

官博读后感

本帖最后由 你有种再说一遍 于 2024-11-7 22:49 编辑

# 读后感
经过艰苦卓绝的两天,我终于看完官网博客内容了.
这是它的最后一页:
https://adndevblog.typepad.com/autocad/page/170/
此处并没有kean的,可能是因为kean是专栏...
我发现他们技术写得挺分散的.
不如看惊惊的博客,那才是真正的cad博客:
https://www.cnblogs.com/JJBox

官博是混合Lisp/.NET/ARX的,通过里面文章总结:
Lisp不支持多文档,是因为SDI是多进程单文档模式,
因为ACAD的从古老的年代过来,
现在都是MDI,其实也可以C#或ARX补充的嘛...
官方支持C#就是没有比ARX好,
例如关联标注是缺失的,甚至有些内容ARX也是缺失的,
文章超多"很遗憾"这三个字.

不过不公布API不代表没有方法,
除了已知的句柄遍历全图之外,
还发现了原来桌子喜欢用一个字典存标记,
然后检索字典的引用对象.
例如,获取字段相同的全部图元用btr.GetBlockReferenceIds(),
桌子只做了这个索引组织表...

JIG为什么要反反复复克隆图元?
原来这个叫避免精度松动,
所以才不是反复用一个图元进行修改.
https://adndevblog.typepad.com/autocad/2013/01/about-gripedit-and-performance.html

解析DWG文件:
为什么遍历块表比ssget还快呢?
因为DWG是一页一页的Page,
它是堆组织表呀,能够触发CPU预读机制,
也就是循环判断比循环ssget还快.
所以大部分Lisp的人会觉得这很诡异.
堆组织表对应是索引组织表.

迄今为止的经验工程化,发现万恶之源是COM:
COM这样东西真的离远点,COM是绑定程序域的,只能封送调用,
不然会引发卸载dll错误.
所以反射调用,不要嵌入调用,没有函数提示就没有,耦合了就一堆麻烦.
经此一役,我是坚定的API党,没有宁可自己实现.
趁机记录一下我没有做的功能:
1,C#在系统变量事件遇到修改BACKGROUNDPLOT触发更新背景色.
提示我有人搞鬼!!
2,命令事件判断"undo"命令,然后如果当前有开关闭标记则关闭.

官博,比较有意思的我扒拉下来:

## 命令
命令旁边加一个表情
https://adndevblog.typepad.com/autocad/2016/03/adding-icon-next-to-custom-command.html

遍历ARX命令
https://adndevblog.typepad.com/autocad/2012/08/iterating-through-the-arx-registered-commands.html

获取载入的全部命令
https://adndevblog.typepad.com/autocad/2017/12/how-to-get-list-of-autocad-commands.html

## 三维处理
把CAD的模型切面
https://adndevblog.typepad.com/autocad/2020/09/is-it-possible-to-emulate-command-livesection-with-autocad-net-ap.html

剖面
https://adndevblog.typepad.com/autocad/2012/05/creating-transparent-planes-like-section-plane-acdbsection.html

## 块
动态块访问性...原来并非遍历句柄
https://adndevblog.typepad.com/autocad/2012/05/accessing-visible-entities-in-a-dynamic-block.html

获取动态块,怎么和我博客不太一样
https://adndevblog.typepad.com/autocad/2012/06/finding-all-block-references-of-a-dynamic-block.html

重定义块之后不是遍历全图的,是通过btr.GetBlockReferenceIds()
https://adndevblog.typepad.com/autocad/2012/05/redefining-a-block.html

这里有个更新块参照引用的方式,自己更新自己
https://adndevblog.typepad.com/autocad/2012/07/changing-block-definition-of-an-block-reference.html

## 视图
围绕实体的连续动态观察
https://adndevblog.typepad.com/autocad/2012/05/continuous-orbit-around-an-entity.html

## 解析图元
序列化到ent.data
https://adndevblog.typepad.com/autocad/2012/05/serialize-a-net-class-into-an-autocad-drawing-database.html

多行文字格式解析
https://adndevblog.typepad.com/autocad/2017/09/dissecting-mtext-format-codes.html

ARX关联标注
https://adndevblog.typepad.com/autocad/2015/03/creating-associative-dimension-in-paperspace-associated-to-a-modelspace-entity.html

图元超链接1
https://adndevblog.typepad.com/autocad/2014/01/setting-hyperlinks-to-attribute-reference.html
图元超链接2
https://adndevblog.typepad.com/autocad/2015/01/associating-hyperlink-with-blocktablerecord.html

超链接被ssget过滤
https://adndevblog.typepad.com/autocad/2012/07/identifying-entities-with-hyperlinks.html

获取字段相同的全部图元,发现这里有dxf遍历器
https://adndevblog.typepad.com/autocad/2014/07/how-to-find-all-fields-in-a-drawing.html

## 文件处理
dwg写入摘要信息
https://adndevblog.typepad.com/autocad/2012/05/creating-lofted-surface-through-point-using-objectarx.html

## 界面
如何确保 Ribbon 运行时项保持可见?
https://adndevblog.typepad.com/autocad/2014/01/how-to-ensure-your-ribbon-runtime-items-remain-visible.html

块预览图标,命令,不渲染
https://adndevblog.typepad.com/autocad/2012/05/how-to-access-or-generate-a-block-preview-icon-in-net.html

组的夹点改写
https://adndevblog.typepad.com/autocad/2013/11/overruling-grips-for-a-group.html

重绘的高亮
https://adndevblog.typepad.com/autocad/2013/11/drawableoverrule-to-highlight-entities-in-nested-block-references-and-xrefs.html

## 数学
折线自交
https://adndevblog.typepad.com/autocad/2012/05/how-to-detect-if-a-polyline-is-self-intersecting.html

平面和曲线交集
https://adndevblog.typepad.com/autocad/2012/05/intersection-between-plane-and-a-curve.html

链接2d和3d线
https://adndevblog.typepad.com/autocad/2012/05/joining-2d-3d-polylines.html

从 3D 多段线中删除顶点
https://adndevblog.typepad.com/autocad/2013/10/remove-vertexes-from-3d-polyline.html

放样曲面
https://adndevblog.typepad.com/autocad/2012/05/creating-lofted-surface-through-point-using-objectarx.html

对齐两个图元的矩阵
https://adndevblog.typepad.com/autocad/2012/04/finding-transformation-matrix-for-aligning-two-entities.html

## 杂项
弱事件,有个flag防止重复订阅
https://adndevblog.typepad.com/autocad/2015/02/using-weakeventmanager-with-autocad-events.html

图层过滤器导入
https://adndevblog.typepad.com/autocad/2014/06/importing-layer-filters.html

查核修复图纸
https://adndevblog.typepad.com/autocad/2014/03/audit-api-new-in-autocad-2015.html

恢复
https://adndevblog.typepad.com/autocad/2014/03/recover-api-new-api-in-autocad-2015-1.html

注入数据库的图纸打开提示
https://adndevblog.typepad.com/autocad/2014/02/opening-a-pid-drawing-that-was-edited-offline-avoiding-the-update-dialog.html

注入数据库id获取
https://adndevblog.typepad.com/autocad/2012/07/plant-sdk-get-objectid-by-pnpid.html

鼠标下的图元信息
https://adndevblog.typepad.com/autocad/2014/02/detecting-entities-under-cursor-while-selection-is-running.html

WCF通讯
https://adndevblog.typepad.com/autocad/2013/12/connecting-an-autocad-plug-in-to-an-external-application-using-wcf.html

ucs+v原理
https://adndevblog.typepad.com/autocad/2012/05/how-to-sync-ucs-with-current-view-like-command-ucsv.html

消息队列
https://adndevblog.typepad.com/autocad/2012/05/transfer-objects-to-autocad-through-windows-azure-queue-storage.html

真正的删除图元,移除内存
https://adndevblog.typepad.com/autocad/2012/04/reclaiming-memory-of-erased-objects.html

多线型
https://adndevblog.typepad.com/autocad/2012/04/creating-a-multi-line-style.html

鼠标嵌套实体,不安全读取
https://adndevblog.typepad.com/autocad/2012/04/retrieving-nested-entities-under-cursor-aperture-using-net-api.html

长事务模仿在位编辑器
https://adndevblog.typepad.com/autocad/2012/04/-mimic-the-workflow-of-refedit-by-long-transaction.html

在位编辑外部参照工程图文件
https://adndevblog.typepad.com/autocad/2013/10/in-place-edit-of-external-reference-drawing-files.html

创建PDF参照
https://adndevblog.typepad.com/autocad/2012/04/how-to-create-a-pdf-reference-in-autocadnet.html

更改视觉样式,有个ed....
https://adndevblog.typepad.com/autocad/2012/03/changing-visual-style-using-autocad-net-api.html

改变窗口纵横比,例如输出WMF
https://adndevblog.typepad.com/autocad/2012/03/control-the-autocad-screensize-environment-variable-in-autocad-using-net.html

像一些烂大街的Ribbon我就没记录了,毕竟,这只是我感到兴趣...具体想深入还是你们要付诸行动...

tigcat 发表于 2024-11-2 21:14:33

有毅力,支持楼主!

mgjsgs 发表于 2024-11-3 08:42:26

打开这些网,一直转圈

你有种再说一遍 发表于 2024-11-3 10:40:13

mgjsgs 发表于 2024-11-3 08:42
打开这些网,一直转圈

全国的墙不一样...我这边没有墙它

mgjsgs 发表于 2024-11-4 12:51:31

你有种再说一遍 发表于 2024-11-3 10:40
全国的墙不一样...我这边没有墙它

在内地,能上的多一些。在公鸡尾巴这个区域,绷的真紧。。。。
页: [1]
查看完整版本: 官博读后感