ObjectARX_图元镜像MIRROR
static void msddMyGroupMyCommand1 (){ ads_name ss; CStringArray mmm1; resbuf *rbList = acutBuildList(RTDXF0, _T("INSERT"), RTNONE); acutPrintf(_T(" Please select the mirrored blocks: ")); if (RTNORM != acedSSGet(NULL, NULL, NULL, NULL, ss)) { acutRelRb(rbList); acutPrintf(_T(" No valid object selected!")); return; } acutRelRb(rbList); AcGePoint3d ptmir1,ptmir2; ads_point pt; if (acedGetPoint(NULL, _T(" Specify mirror point1:"), pt) != RTNORM) { return; } ptmir1 = asPnt3d(pt); if (acedGetPoint(pt, _T(" Specify 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 }
更多文章
-
用AcedGrRead()函数实现一拖多
实现代码:#include "StdAfx.h"#include "StdArx.h"#include "..\..\Common\我的类\Arc.h"#include <acedads.h>#include "..\..\Common\Entity\LineUtil.h"#include <geassign.h>#include <dbents.h>#include "..\..\Common\Others\ConvertUtil.h"#in
-
改变多段线区直
代码:#include "StdAfx.h"#include "StdArx.h"#include <dbpl.h>#include "..\..\Common\Others\ConvertUtil.h"#include <geassign.h>#include "..\..\Common\Entity\ArcUtil.h"#include "..\..\Common\Document\DwgDatabaseUtil.h"#include <afxwin.h&
-
获取任意路径Dwg文件内所有块在控件中显示并能选择插入当前模型空间
主对话框CPP内代码:#include "StdAfx.h"#include "resource.h"#include "BlockDialog.h"#include "..\..\Common\我的类\file.h"#include "..\..\Common\Document\DwgDatabaseUtil.h"#include <dbents.h>#include <dbmain.h>#include "..\..\Chapter11
-
多段线动态切割闭合区域
#include "StdAfx.h"#include "StdArx.h"#include <dbpl.h>#include "..\..\Common\Others\ConvertUtil.h"#include "..\..\Common\Document\DwgDatabaseUtil.h"#include <dbents.h>#include <dbregion.h>#include "..\..\Common\Entity\RegionUtil.h"
-
自创实体类从AcDbCurve派生,实现一些类方法并动态绘制
MyCurve.cpp:#include "StdAfx.h"#include "MyCurve.h"#include "actrans.h"#include "aced.h"//-----------------------------------------------------------------------------Adesk::UInt32 CMyCurve::kCurrentVersionNumber =1 ;//----------------------------------------