读文档readarx.chm
readarx.chm
《Tips and Techniques》
Incremented AutoCAD Registry Number
Ideally, a change of registry number should have no impact on your application's code, because this number should not be hard-coded anywhere. Instead, if your application needs to know the correct registry key at runtime, you should use the appropriate APIs. ObjectARX applications (in other words, those with an .arx extension) should use the AcDbHostApplicationServices::getUserProductRegistryRootKey() and
AcDbHostApplicationServices::getMachineProductRegistryRootKey() function or the acrxProductKey() global function. ObjectDBX modules (in other words, those with a .dbx extension) should use the acrxObjectDBXRegistryKey() global function to get the correct registry key. These functions always return the correct registry key for the host application's version.
AcDbBlockReference的继承类不能appendAttribute(),调用为引起错误eIllegalEntityType。故意设计成这样子的。
In the ownership hierarchies for your custom objects, be sure to call setOwnerId() to properly establish every object's owner backpointer. A future version of AutoCAD/ObjectDBX may cease writing objects with NULL owner IDs in incremental saves.
自定义对象要确保使用setOwnerId()方法……
Dimension definition points and text position are all subject to the layout requirements of the dimension. With any of the following functions, the position passed in may be changed to fit within the layout needs of the dimension as determined by the dimension type and the current dimvar settings.
AcDbDimension::setTextPosition()
AcDbAlignedDimension::setDimLinePoint()
AcDbRotatedDimension::setDimLinePoint()
AcDb3PointAngularDimension::setArcPoint()
AcDb2LineAngularDimension::setArcPoint()
For example when DIMFIT = 3, for radial dimensions with the definition points such that the radial line is less than or equal to fifteen degrees from the X-axis, the text position's X coordinate can be set, but the Y coordinate will always be adjusted to locate the text along the radial line of the dimension.
木看懂。神马意思?
Freeing Strings Returned as Non-const Pointers
When calling methods that return non-const string pointers (for example, AcDbSymbolTable::getName(char&* pName)), you should free the memory occupied by the returned string.
对返回字符串指针的函数,要手动释放。
If you spawn multiple threads in your application, make sure that no more than one of the threads at a time invokes anything in the ObjectARX system.
不支持多线程
The header files acdb.h and dbidar.h contain an #ifdef section which selects a header to #include based on ACAD_OBJID_INLINE_INTERNAL. Applications should never #define this value. There are parallel headers for the lightweight ID types, some of which are for internal AutoCAD use only. Applications that attempt to #define ACAD_OBJID_INLINE_INTERNAL will not compile successfully.
取消定义宏ACAD_OBJID_INLINE_INTERNAL
Certain interactions between transactions, the UNDO command, and the Object Property Toolbar (OPT) can put AutoCAD in an unstable condition. To avoid such situations, your ObjectARX application should always remove the pickfirst selection prior to aborting transactions, as shown here:
acedSSSetFirst(NULL, NULL);
actrTransactionManager->abortTransaction();
Tabbed dialog boxes should use the base classes defined in the acui18.lib MFC extension DLL library. Do not use the MFC classes CPropertySheet and CPropertyPage. Use CAcUiTabMainDialog and CAcUiTabChildDialog instead. See the ObjectARX Developer's Guide and ObjectARX Reference for details.
Using the __declspec(dllimport) construct on a class exported to other applications can cause vtables to reside in all DLLs that instantiate that class. If any of these instantiating DLLs is unloaded, all instances created by that DLL become invalid. Subsequent attempts to access virtual functions on these invalid instances triggers a memory fault.
Consequently, the only safe way to use this directive with classes derived from AcDbObject, for example, is to mandate that no application that instantiates the class may be unloadable. To enforce this mandate, you must either document it clearly and visibly, or supply a pseudo-constructor that resides in a DLL or application that cannot be unloaded. The best policy is to avoid using this construct altogether.
The only exception to this warning applies if the class exports a static data member. In this case, you must use __declspec(dllimport) on that data member only, but you should avoid applying the construct to the entire class. Exporting static data members is not recommended.
This warning applies only to __declspec(dllimport). It does not apply to __declspec(dllexport).
The recommended usage is as follows:
#pragma warning( disable: 4275 4251 )
#ifdef POLYSAMP
#define DLLIMPEXP __declspec( dllexport )
#else
#define DLLIMPEXP
#endif // The "DLLIMPEXP" is only required for exporting a poly API or using
// the exported API. It is not necessary for any custom classes that
// are not exporting an API of their own.
//
class DLLIMPEXP AsdkPoly: public AcDbCurve
{
public:
ACRX_DECLARE_MEMBERS(AsdkPoly);
//*****************************************************************
// Constructors and destructor
//*****************************************************************
If you include any of the standard C++ headers while the _DEBUG preprocessor symbol is defined, then the debug C++ runtime is forced via pragmas. (Look at use_ansi.h in Visual C++.) You don't want to use the debug C++ runtime in an ObjectARX application.
To avoid this, apply the following workaround:
#ifdef _DEBUG
#undef _DEBUG
#endif
挺怪的,为什么我不想?
----update 2013/12/5---------
在官网提供的一个ppt里面看到的3张图解释了这个问题。



因为ARX申请的内存空间,交付给AutoCAD后,AutoCAD会在使用结束后调用delete来释放。
如果这些空间是申请在debug堆上,则会引起crash。
关于debug heap,可以参考下面2处的文章。
http://www.codeproject.com/Articles/6489/Debug-Tutorial-Part-3-The-Heap
----------------------------------
AutoCAD may occasionally demand load an application that defines a class, even when there is no object of that class in the DWG or DXF file being loaded. If you observe this and wish to prevent the unnecessary demand loading of .dbx and .arx applications, simply save the drawing in either the DWG or DXF format and then reopen the file. This procedure can be done with or without the application available.
Use a complete open, followed by a full save, before reloading the file.
没看懂。Application到底是指arx还是dwg或dxf?
------------update 2013/12/6 ---------------
应该是指arx。
------------------------------------------------
In previous releases, the proxy graphics DWG data structure could not handle the complexity of the pline primitive. This limitation has been addressed as of AutoCAD 2004. As a result, the AcGiGeometry::pline() function now supports the proxy graphics context.
读文档readarx.chm的更多相关文章
- help文档制作 chm
程序中的help文档制作 所用工具:HTML Help Workshop 文件包括:各个html文档,帮助页面的具体内容 hhc文档:help的目录文件 hhk文档:help的索引文件 MAP文件夹中 ...
- IDEA生成doc文档-生成chm文档
首先,打开IDEA,并找到Tools -> Generate JavaDoc- 可供查询的chm比那些HTML页面好看多了. 如果您用过JDK API的chm文档,那么您一定不会拒绝接受其它第三 ...
- 通过jd2chm工具将html文档生存chm文档方法
1.下载jd2chm.exe工具 2.下载后解压缩后先安装htmlhelp.exe 3.将jd2chm.exe文件拷贝到index.html所在文件夹中 4.打开命令行进入到index.html所在文 ...
- 关于python logging模块读文档的几个心得
1. logger是分层级的,root是所有logger的祖先. 2. root这个logger在执行logging.warning() 等一系列方法和basicConfig()的时候才会被初始化ha ...
- Sandcastle方法生成c#.net帮助类帮助文档chm
Sandcastle方法生成c#.net帮助类帮助文档即chm后缀的文档,其实是通过C#文档注释生成的XML文件来生成帮助文档的.因此,第一步就是生成XML文档, 步骤1生成XML文档 1.打开VS- ...
- c#帮助文档chm打不开的问题
c# 帮助文档,chm 格式, 不可以放在含有字符 # 的文件夹下(包括当前文件夹和上级文件夹),文件名也不可以含有 # 字符, 否则会打不开.
- [daily][troubleshoot][archlinux][wps][font] wps文档中的图内容无法显示中文
序 用linux作为工作生产环境的几个需要解决的问题之一是:文档协作,即如何兼容Micro$oft Office格式的文档. 我一般的工作方式是:在linux下创建一个win7的虚拟机,安装常用的wi ...
- 较全的IT方面帮助文档
http://www.shouce.ren/post/d/id/108632 XSLT参考手册-新.CHMhttp://www.shouce.ren/post/d/id/108633 XSL-FO参考 ...
- 转一篇:文档笔记之Django QuerySet
这个放着,说不定以后作一些更深入的查询时,用得着的. http://www.rapospectre.com/blog/7/ 今天刚刚答完辩体完检就跑来更新博客了!!! 先补上第一篇: 一般情况下,我们 ...
随机推荐
- python3 对文件的查找、替换、删除
python 版本 3.5 实现对文件的查找,替换,删除 #Author by Andy #_*_ coding:utf-8 _*_ #定义查找函数 def find(): Keywords=inpu ...
- Oracle job定时器的执行时间间隔学习汇总
Oracle job 定时器的执行时间间隔也是定时器job 的关键设置,在这一设置上,开始还没掌握,总是不知道怎么写,现总结如下,其实主要是使用了TRUNC.NEXT_DAY .ADD_MONTH ...
- C# 判断字符是否中文还是英文
private static bool IsHanZi(string ch) { byte[] byte_len = System.Text.Encoding.Default.GetBytes(ch) ...
- Android文字跑马灯控件(文本自动滚动控件)
最近在开发一个应用,需要用到文本的跑马灯效果,图省事,在网上找,但老半天都找不到,后来自己写了一个,很简单,代码如下: import android.content.Context; import a ...
- Windows Store App 近期访问列表
Windows 8系统在管理用户的文件时,会将用户近期访问的文件添加到对应应用的近期访问列表中,所有的Windows应用商店应用都有各自的近期访问列表,根据文件的上一次访问时间,可以在列表中对文件进行 ...
- 2个集合比较——最高效解法(Java实现)
优点:时间复杂度为O(n)级别: 缺点:只适用于Int,以及Int的数字不能过大,集合元素数量不能过多. 理论分析: 两个集合的元素之和以及之积相同则,这两个集合相等.(前提是两个集合的数量一致) 证 ...
- NPOI 操作Excel
关于NPOI NPOI是POI项目的.NET版本,是由@Tony Qu(http://tonyqus.cnblogs.com/)等大侠基于POI开发的,可以从http://npoi.codeplex. ...
- php大力力 [040节] 买了一天域名,整了一天后台,新网后台不懂啊
php大力力 [040节] 买了一天域名,整了一天后台,新网后台不懂啊]]] 还有万网那些域名要备案,备案,备案中...................wqnmlgb 今天摩托车的前后轮被扎了,tnn ...
- PC缺少一个或多个网络协议 qq可登录(win10)
打开适配器连接 1打开网络适配器 2卸载microsoft 3 网络客户端 4重启
- 域环境下装SQL SERVER的一次惨痛经历
SQL SERVER 2008 R2 其实sql server不建议装在域环境下的,但sharepoint必须用域用户来连接.这本来也不是个什么大问题,但是,这一次相当的不顺利哦. 我有单独的域控,单 ...