/第一题:定义一个全局命令,功能:使用全局函数创建一个简单实体-直线,顶点由用户输
static void TESTlineCmd(){
ads采用point inputStart;
ads采用point inputEnd;
AcGePoint3d ptStart;
AcGePoint3d ptEnd;
用户输入要画的坐标
if (acedGetPoint(NULL,采用T("\nstart point"),inputStart) != RTNORM)
{
return;
}
ptStart = inputStart;
ptStart = inputStart;
ptStart = inputStart;
if (acedGetPoint(NULL,采用T("\nend point"),inputEnd) != RTNORM)
{
return;
}
ptEnd = inputEnd;
ptEnd = inputEnd;
ptEnd = inputEnd;
AcDbLine* pLine = new AcDbLine(ptStart,ptEnd);
int colorIndex = SelColor();
AcCmColor color;
color.setColorIndex(colorIndex);
pLine->setColor(color);
LoadEntity(pLine);
}
页:
[1]