|
- // 对选中的实体逐个实现镜像功能
- ads采用name ents;
- ads采用point pt1, pt2;
- if (acedSSGet(NULL, NULL, NULL, NULL, ents) != RTNORM) {
- return;
- }
- if (acedGetPoint(NULL, L"Pt:", pt1) != RTNORM) {
- return;
- }
- if (acedGetPoint(pt1, L"Pt:", pt2) != RTNORM) {
- return;
- }
- ads采用name singleEnt;
- long len = 0;
- acedSSLength(ents, &len);
- for (int i = 0; i < len; i++)
- {
- ads采用name entname;
- acedSSName(ents, i, entname);
- acedSSAdd(entname, NULL, singleEnt);
- #if 采用MSC采用VER >= 1700
- acedCommandS(RTSTR, 采用T("MIRROR"),
- RTPICKS, singleEnt,
- RTSTR, 采用T(""),
- RTPOINT, pt1,
- RTPOINT, pt2,
- RTSTR, 采用T("N"), // 此代表是否保留镜像之前实体
- RTSTR, 采用T(""),
- RTNONE);
- #else
- acedCommand(RTSTR, 采用T("MIRROR"),
- RTPICKS, singleEnt,
- RTSTR, 采用T(""),
- RTPOINT, pt1,
- RTPOINT, pt2,
- RTSTR, 采用T("N"), // 此代表是否保留镜像之前实体
- RTSTR, 采用T(""),
- RTNONE);
- #endif
- acedSSFree(singleEnt);
- }
- acedSSFree(ents);
复制代码 |
|