ObjectARX采用图元镜像MIRROR
static void msddMyGroupMyCommand1 (){
ads采用name ss;
CStringArray mmm1;
resbuf *rbList = acutBuildList(RTDXF0, 采用T("INSERT"), RTNONE);
acutPrintf(采用T("\nPlease select the mirrored blocks: "));
if (RTNORM != acedSSGet(NULL, NULL, NULL, NULL, ss))
{
acutRelRb(rbList);
acutPrintf(采用T("\nNo valid object selected!"));
return;
}
acutRelRb(rbList);
AcGePoint3d ptmir1,ptmir2;
ads采用point pt;
if (acedGetPoint(NULL, 采用T("\nSpecify mirror point1:"), pt) != RTNORM)
{
return;
}
ptmir1 = asPnt3d(pt);
if (acedGetPoint(pt, 采用T("\nSpecify mirror point2:"), pt) != RTNORM)
{
return;
}
ptmir2 = asPnt3d(pt);
CommandMirror( ss, ptmir1 , ptmir2);
acedSSFree(ss);
}
static void CommandMirror(ads采用name ss,AcGePoint3d pt1 ,AcGePoint3d pt2)
{
#if 采用MSC采用VER >= 1700
acedCommandS(RTSTR, 采用T("MIRROR"),
RTPICKS, ss,
RTSTR, 采用T(""),
RTPOINT, pt1,
RTPOINT, pt2,
RTSTR, 采用T("N"),// 此代表是否保留镜像之前实体
RTSTR, 采用T(""),
RTNONE);
#else
acedCommand(RTSTR, 采用T("MIRROR"),
RTPICKS, ss,
RTSTR, 采用T(""),
RTPOINT, pt1,
RTPOINT, pt2,
RTSTR, 采用T("N"),// 此代表是否保留镜像之前实体
RTSTR, 采用T(""),
RTNONE);
#endif
}
页:
[1]