首页 > 其他 > 详细

使用ObjectARX 2012向导生成的自定义实体类无法捕捉的问题解决方式

时间:2019-07-30 01:05:05      阅读:179      评论:0      收藏:0      [点我收藏+]

使用ObjectARX 2012自定实体向导的时候,获取捕捉点的重写函数的向导中模板有点问题,

C:\Program Files (x86)\Autodesk\ObjectARX 2019 Wizards\ArxWizCustomObject\Templates\1033

在ArxWizCustomObject的模板中.object.h和.cpp原来是

 

	virtual Acad::ErrorStatus subGetOsnapPoints (
		AcDb::OsnapMode osnapMode,
		int gsSelectionMark,
		const AcGePoint3d &pickPoint,
		const AcGePoint3d &lastPoint,
		const AcGeMatrix3d &viewXform,
		AcGePoint3dArray &snapPoints,
		AcDbIntArray &geomIds) const ;
	virtual Acad::ErrorStatus subGetOsnapPoints (
		AcDb::OsnapMode osnapMode,
		int gsSelectionMark,
		const AcGePoint3d &pickPoint,
		const AcGePoint3d &lastPoint,
		const AcGeMatrix3d &viewXform,
		AcGePoint3dArray &snapPoints,
		AcDbIntArray &geomIds,
		const AcGeMatrix3d &insertionMat) const ;

  其中的第二个参数的类型int gsSelectionMark,在ARX2008开始使用的是,简单修改Adesk::GsMarker gsSelectionMark,

Acad::ErrorStatus [!output CLASS_NAME]::subGetOsnapPoints (
    AcDb::OsnapMode osnapMode,
    Adesk::GsMarker gsSelectionMark,
    const AcGePoint3d &pickPoint,
    const AcGePoint3d &lastPoint,
    const AcGeMatrix3d &viewXform,
    AcGePoint3dArray &snapPoints,
    AcDbIntArray &geomIds) const
{
    assertReadEnabled () ;
    return ([!output BASE_CLASS]::subGetOsnapPoints (osnapMode, gsSelectionMark, pickPoint, lastPoint, viewXform, snapPoints, geomIds)) ;
}

Acad::ErrorStatus [!output CLASS_NAME]::subGetOsnapPoints (
    AcDb::OsnapMode osnapMode,
    Adesk::GsMarker gsSelectionMark,
    const AcGePoint3d &pickPoint,
    const AcGePoint3d &lastPoint,
    const AcGeMatrix3d &viewXform,
    AcGePoint3dArray &snapPoints,
    AcDbIntArray &geomIds,
    const AcGeMatrix3d &insertionMat) const
{
    assertReadEnabled () ;
    return ([!output BASE_CLASS]::subGetOsnapPoints (osnapMode, gsSelectionMark, pickPoint, lastPoint, viewXform, snapPoints, geomIds, insertionMat)) ;
}

这样在ARX2008以上的版本就不会出现捕捉失效的问题.

使用ObjectARX 2012向导生成的自定义实体类无法捕捉的问题解决方式

原文:https://www.cnblogs.com/edata/p/11267413.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!