- UID
- 121629
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-4-5
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我在ARX程序中添加了一个命令PIPE,运行时发现程序中由acedcommand发出的Move命令不能正确执行,而当在AutoCad2000中执行一遍Move命令后,PIPE就能正确执行,我觉得很惊奇,不知道其原因,请大家帮助分析一下。另外,当我用acedcommand执行Rotate3d命令时,AutoCad2000报告Rotate3d为未知命令。不知这是什么原因?
// This is command 'PIPE'
void lnpupipe()
{
AcGePoint3d m_StartPoint(0,0,0),m_EndPoint(100,100,100);
double m_OuterDiameter,m_Thickness;
m_OuterDiameter=20;
m_Thickness=2;//本应提示用户输入
lnpuCPipe *m_pipe=new lnpuCPipe;//自定义Cpipe类,从acdbSolid3d导出
bool m_bool;
m_bool=m_pipe->create (m_StartPoint,m_EndPoint,m_OuterDiameter,m_Thickness);
//m_pipe->
if (!m_bool) {
acutPrintf("\n出错!");
return;
}
try
{
AcDbObjectId m_PipeID;
ARXOK(postToDatabase(m_pipe,m_PipeID));//向数据库添加实体
ads_name m_CurrentPipe;
ads_point m_BasePoint,m_SecondPoint;
//AcGePoint3d m_OffsetPoint;
double m_length=m_StartPoint.distanceTo(m_EndPoint);
m_BasePoint[X]=0;
m_BasePoint[Y]=0;
m_BasePoint[Z]=-0.5*m_length;
m_SecondPoint[X]=m_StartPoint.x;
m_SecondPoint[Y]=m_StartPoint.y;
m_SecondPoint[Z]=m_StartPoint.z;
acdbEntLast(m_CurrentPipe);
acedCommand(RTSTR,"MOVE",RTENAME,m_CurrentPipe,RTSTR,"",RT3DPOINT,m_BasePoint,
RT3DPOINT,m_SecondPoint,RTNONE);
}
catch (Acad::ErrorStatus *es) {
acutPrintf("\n出错");
delete es;
return;
}
} |
|