├── .gitattributes ├── .gitignore ├── .vs └── ArxProject2 │ └── v14 │ └── .suo ├── 2dCode ├── 2dCode.cpp ├── 2dCode.vcxproj ├── 2dCode.vcxproj.filters ├── ReadMe.txt ├── stdafx.cpp ├── stdafx.h ├── targetver.h └── temp.bmp ├── AcedCommand_trim ├── AcedCommand_trim.cpp ├── AcedCommand_trim.rc ├── AcedCommand_trim.vcxproj ├── AcedCommand_trim.vcxproj.filters ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── AreaDengFen ├── AreaDengFen.cpp ├── AreaDengFen.rc ├── AreaDengFen.vcxproj ├── AreaDengFen.vcxproj.filters ├── AreaFenGe.cpp ├── AreaFenGe.h ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h └── acrxEntryPoint.cpp ├── ArxProject2.sln ├── ArxProject2 └── ArxProject2 │ ├── .vs │ └── ArxProject2 │ │ └── v14 │ │ └── .suo │ ├── ArxProject2.cpp │ ├── ArxProject2.rc │ ├── ArxProject2.vcxproj │ ├── ArxProject2.vcxproj.filters │ ├── Autodesk.arx-2018.props │ ├── BlockUtil.cpp │ ├── BlockUtil.h │ ├── CGePointUtil.cpp │ ├── CircleUtil.cpp │ ├── CircleUtil.h │ ├── ConvertUtil.cpp │ ├── ConvertUtil.h │ ├── Debug │ ├── ArxProject2.log │ ├── ArxProject2.res │ ├── ArxProject2.tlog │ │ ├── ArxProject2.lastbuildstate │ │ ├── ArxProject2.write.1u.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ ├── link.write.1.tlog │ │ ├── rc.command.1.tlog │ │ ├── rc.read.1.tlog │ │ └── rc.write.1.tlog │ ├── ECDArxProject2.exp │ ├── ECDArxProject2.idb │ └── ECDArxProject2.pdb │ ├── Dimension.cpp │ ├── Dimension.h │ ├── DocData.cpp │ ├── DocData.h │ ├── DrawRecJig.cpp │ ├── DrawRecJig.h │ ├── DwgDataBaseUtil.cpp │ ├── DwgDataBaseUtil.h │ ├── EllipseUtil.cpp │ ├── EllipseUtil.h │ ├── GePointUtil.h │ ├── GetInputUtil.cpp │ ├── GetInputUtil.h │ ├── HatchUtil.cpp │ ├── HatchUtil.h │ ├── LayerUtil.cpp │ ├── LayerUtil.h │ ├── LineUtil.cpp │ ├── LineUtil.h │ ├── MathUtil.cpp │ ├── MathUtil.h │ ├── PolylineUtil.cpp │ ├── PolylineUtil.h │ ├── ReadMe.txt │ ├── RegionUtil.cpp │ ├── RegionUtil.h │ ├── Resource.h │ ├── RunCommand.cpp │ ├── RunCommand.h │ ├── SelectUtil.cpp │ ├── SelectUtil.h │ ├── SelectionSetCommands.cpp │ ├── SplieUtil.cpp │ ├── SplieUtil.h │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── StringUtil.cpp │ ├── StringUtil.h │ ├── TextFileUtil.cpp │ ├── TextFileUtil.h │ ├── TextStyleUtil.cpp │ ├── TextStyleUtil.h │ ├── TextUtil.cpp │ ├── TextUtil.h │ ├── TransUtil.cpp │ ├── TransUtil.h │ ├── acrxEntryPoint.cpp │ └── crx.props ├── ArxProject3 ├── AppDirectoryUtil.cpp ├── AppDirectoryUtil.h ├── ArxDialog.cpp ├── ArxDialog.h ├── ArxProject3.aps ├── ArxProject3.cpp ├── ArxProject3.rc ├── ArxProject3.vcxproj ├── ArxProject3.vcxproj.filters ├── Autodesk.arx-2018.props ├── BlockUtil.cpp ├── BlockUtil.h ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DatabaseJigEntity.cpp ├── DatabaseJigEntity.h ├── DimMirror.cpp ├── DimMirror.h ├── DocData.cpp ├── DocData.h ├── DrawRecJig.cpp ├── DrawRecJig.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── FindTextAndBlock.cpp ├── FindTextAndBlock.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MFCDialog.cpp ├── MFCDialog.h ├── MathUtil.cpp ├── MathUtil.h ├── MirrorJig.cpp ├── MirrorJig.h ├── ModelessDialog.cpp ├── ModelessDialog.h ├── MoveJig.cpp ├── MoveJig.h ├── MyTuBao.cpp ├── MyTuBao.h ├── PolylineUtil.cpp ├── PolylineUtil.h ├── ReadMe.txt ├── RegionUtil.cpp ├── RegionUtil.h ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── TransUtil.cpp ├── TransUtil.h └── acrxEntryPoint.cpp ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CheckPolyline ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CheckPolyline.cpp ├── CheckPolyline.rc ├── CheckPolyline.vcxproj ├── CheckPolyline.vcxproj.filters ├── CheckPolyline.vcxproj.user ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── CustomObjDBX ├── Autodesk.arx-2018.props ├── CustomObjDBX.cpp ├── CustomObjDBX.rc ├── CustomObjDBX.vcxproj ├── ECDDwgScaleCO.cpp ├── ECDDwgScaleCO.h ├── ECDTriangleObj.cpp ├── ECDTriangleObj.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp ├── crx.props └── x64 │ └── Debug │ └── CustomObjDBX.tlog │ ├── link.command.1.tlog │ └── link.read.1.tlog ├── Debug ├── ECDArxProject2.arx └── ECDArxProject2.pdb ├── DimMirror ├── Autodesk.arx-2018.props ├── DimMirror.cpp ├── DimMirror.rc ├── DimMirror.vcxproj ├── DimMirror.vcxproj.filters ├── DocData.cpp ├── DocData.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── DongTaiGongXian ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DongTaiGongXian.cpp ├── DongTaiGongXian.rc ├── DongTaiGongXian.vcxproj ├── DongTaiGongXian.vcxproj.filters ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── acrxEntryPoint.cpp └── crx.props ├── ECDDrawGrider ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── ECDDrawGrider.cpp ├── ECDDrawGrider.rc ├── ECDDrawGrider.vcxproj ├── ECDDrawGrider.vcxproj.filters ├── ECDMyHuaLiang.cpp ├── ECDMyHuaLiang.h ├── EcdKuaiJX.cpp ├── EcdKuaiJX.h ├── EcdZhuangZhu.cpp ├── EcdZhuangZhu.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── HatchUtil.cpp ├── HatchUtil.h ├── LayerUtil.cpp ├── LayerUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── TransUtil.cpp ├── TransUtil.h └── acrxEntryPoint.cpp ├── ECDFillHatch ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── ECDFillHatch.cpp ├── ECDFillHatch.rc ├── ECDFillHatch.vcxproj ├── ECDFillHatch.vcxproj.filters ├── ECDFillHatch.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── ECDZJPl ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── ECDZJPl.cpp ├── ECDZJPl.rc ├── ECDZJPl.vcxproj ├── ECDZJPl.vcxproj.filters ├── ECDZJPl.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── ECDZhiXianDengJu ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── ECDZhiXianDengJu.cpp ├── ECDZhiXianDengJu.rc ├── ECDZhiXianDengJu.vcxproj ├── ECDZhiXianDengJu.vcxproj.filters ├── ECDZhiXianDengJu.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdCzFZX ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdCzFZX.cpp ├── EcdCzFZX.rc ├── EcdCzFZX.vcxproj ├── EcdCzFZX.vcxproj.filters ├── EcdCzFZX.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdJiaYe ├── DocData.cpp ├── DocData.h ├── EcdJiaYe.cpp ├── EcdJiaYe.rc ├── EcdJiaYe.vcxproj ├── EcdJiaYe.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── EcdJiaoDF ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdJiaoDF.cpp ├── EcdJiaoDF.rc ├── EcdJiaoDF.vcxproj ├── EcdJiaoDF.vcxproj.filters ├── EcdJiaoDF.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdLunKuo ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdLunKuo.cpp ├── EcdLunKuo.rc ├── EcdLunKuo.vcxproj ├── EcdLunKuo.vcxproj.filters ├── EcdLunKuo.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdMLeader ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdMLeader.cpp ├── EcdMLeader.rc ├── EcdMLeader.vcxproj ├── EcdMLeader.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdMirror ├── DatabaseJigEntity.cpp ├── DatabaseJigEntity.h ├── DocData.cpp ├── DocData.h ├── EcdMirror.cpp ├── EcdMirror.rc ├── EcdMirror.vcxproj ├── EcdMirror.vcxproj.filters ├── EcdMirror.vcxproj.user ├── MoveJig.cpp ├── MoveJig.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h └── acrxEntryPoint.cpp ├── EcdMirror16 ├── DatabaseJigEntity.cpp ├── DatabaseJigEntity.h ├── DocData.cpp ├── DocData.h ├── EcdMirror.cpp ├── EcdMirror.rc ├── EcdMirror16.vcxproj ├── MoveJig.cpp ├── MoveJig.h ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h └── acrxEntryPoint.cpp ├── EcdQieXian ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdQieXian.cpp ├── EcdQieXian.rc ├── EcdQieXian.vcxproj ├── EcdQieXian.vcxproj.filters ├── EcdQieXian.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdXClip ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdXClip.cpp ├── EcdXClip.rc ├── EcdXClip.vcxproj ├── EcdXClip.vcxproj.filters ├── EcdXClip.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdXiHe ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── EcdXiHe.cpp ├── EcdXiHe.rc ├── EcdXiHe.vcxproj ├── EcdXiHe.vcxproj.filters ├── EcdXiHe.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── EcdZheZhao ├── DocData.cpp ├── DocData.h ├── EcdZheZhao.cpp ├── EcdZheZhao.rc ├── EcdZheZhao.vcxproj ├── EcdZheZhao.vcxproj.filters ├── EcdZheZhao.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── EcdZiFuLX ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DatabaseJigEntity.cpp ├── DatabaseJigEntity.h ├── DocData.cpp ├── DocData.h ├── EcdZiFuLX.cpp ├── EcdZiFuLX.rc ├── EcdZiFuLX.vcxproj ├── EcdZiFuLX.vcxproj.filters ├── EcdZiFuLX.vcxproj.user ├── LineJig.cpp ├── LineJig.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acad.err ├── acrxEntryPoint.cpp └── crx.props ├── ImPortExcel ├── Autodesk.arx-2018.props ├── CApplication.h ├── CGePointUtil.cpp ├── CRange.h ├── CRanges.h ├── CWorkbook.h ├── CWorkbooks.h ├── CWorksheet.h ├── CWorksheets.h ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── ImPortExcel.cpp ├── ImPortExcel.rc ├── ImPortExcel.vcxproj ├── ImPortExcel.vcxproj.filters ├── MathUtil.cpp ├── MathUtil.h ├── OpExcel.cpp ├── OpExcel.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h └── acrxEntryPoint.cpp ├── MouseMsg ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── MouseMsg.cpp ├── MouseMsg.rc ├── MouseMsg.vcxproj ├── MouseMsg.vcxproj.filters ├── MouseTest.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── MouseWheelMsg ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── MouseWheelMsg.cpp ├── MouseWheelMsg.rc ├── MouseWheelMsg.vcxproj ├── MouseWheelMsg.vcxproj.filters ├── ReadMe.txt ├── RegMsg.cpp ├── RegMsg.h ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── MultiDaoJiao ├── AlgoHelper.cpp ├── AlgoHelper.h ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── MultiDaoJiao.cpp ├── MultiDaoJiao.rc ├── MultiDaoJiao.vcxproj ├── MultiDaoJiao.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── acrxEntryPoint.cpp └── crx.props ├── MyMenu ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CAcadApplication.h ├── CAcadDocument.h ├── CAcadMenuBar.h ├── CAcadMenuGroup.h ├── CAcadMenuGroups.h ├── CAcadModelSpace.h ├── CAcadPopupMenu.h ├── CAcadPopupMenuItem.h ├── CAcadPopupMenus.h ├── CAcadToolbar.h ├── CAcadToolbarItem.h ├── CAcadToolbars.h ├── DocData.cpp ├── DocData.h ├── MyMenu.cpp ├── MyMenu.rc ├── MyMenu.vcxproj ├── MyMenu.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── MyMenu2 ├── acrxEntryPoint.cpp └── x64 │ └── Debug │ └── MyMenu2.tlog │ └── CL.read.1.tlog ├── MyReactor ├── Autodesk.arx-2018.props ├── CMyDbReactor.cpp ├── CMyDbReactor.h ├── CMyDocReactor.cpp ├── CMyDocReactor.h ├── CMyEditorReactor.cpp ├── CMyEditorReactor.h ├── DocData.cpp ├── DocData.h ├── MyObjectReactor.cpp ├── MyObjectReactor.h ├── MyReactor.cpp ├── MyReactor.rc ├── MyReactor.vcxproj ├── MyReactor.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── crx.props ├── MySqlCon ├── ADOConn.cpp ├── ADOConn.h ├── Autodesk.arx-2018.props ├── MySqlCon.cpp ├── MySqlCon.h ├── MySqlCon.rc ├── MySqlCon.vcxproj ├── MySqlCon.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── PublishPrinter ├── DocData.cpp ├── DocData.h ├── PublishPrinter.cpp ├── PublishPrinter.rc ├── PublishPrinter.vcxproj ├── PublishPrinter.vcxproj.filters ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h └── acrxEntryPoint.cpp ├── QiangToLiang ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── DocData.cpp ├── DocData.h ├── QiangToLiang.cpp ├── QiangToLiang.rc ├── QiangToLiang.vcxproj ├── QiangToLiang.vcxproj.filters ├── QiangToLiang.vcxproj.user ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── acrxEntryPoint.cpp └── acrxEntryPoint1.cpp ├── README.md ├── Test2 ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DrawRecJig.cpp ├── DrawRecJig.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── Test2.cpp ├── Test2.rc ├── Test2.vcxproj ├── Test2.vcxproj.filters ├── TextFileUtil.cpp ├── TextFileUtil.h ├── acrxEntryPoint.cpp └── crx.props ├── TongJiAndLieBiao ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── Resource.h ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── TongJiAndLieBiao.cpp ├── TongJiAndLieBiao.rc ├── TongJiAndLieBiao.vcxproj ├── TongJiAndLieBiao.vcxproj.filters └── acrxEntryPoint.cpp ├── TongJiArea ├── Autodesk.arx-2018-net.props ├── Autodesk.arx-2018.props ├── CGePointUtil.cpp ├── ConvertUtil.cpp ├── ConvertUtil.h ├── DocData.cpp ├── DocData.h ├── DwgDataBaseUtil.cpp ├── DwgDataBaseUtil.h ├── GePointUtil.h ├── GetInputUtil.cpp ├── GetInputUtil.h ├── MathUtil.cpp ├── MathUtil.h ├── ReadMe.txt ├── SelectUtil.cpp ├── SelectUtil.h ├── StdAfx.cpp ├── StdAfx.h ├── StringUtil.cpp ├── StringUtil.h ├── TextFileUtil.cpp ├── TextFileUtil.h ├── TjAreaDlg.cpp ├── TjAreaDlg.h ├── TongJiArea.aps ├── TongJiArea.cpp ├── TongJiArea.rc ├── TongJiArea.vcxproj ├── TongJiArea.vcxproj.filters ├── acrxEntryPoint.cpp ├── crx.props └── resource.h ├── TongJiKuai ├── DocData.cpp ├── DocData.h ├── ReadMe.txt ├── Resource.h ├── StdAfx.cpp ├── StdAfx.h ├── TongJiKuai.cpp ├── TongJiKuai.rc ├── TongJiKuai.vcxproj ├── TongJiKuai.vcxproj.filters └── acrxEntryPoint.cpp ├── crx.props ├── qrencode ├── ReadMe.txt ├── bitstream.c ├── bitstream.h ├── config.h ├── mask.c ├── mask.h ├── mmask.c ├── mmask.h ├── mqrspec.c ├── mqrspec.h ├── qrencode.c ├── qrencode.h ├── qrencode.vcxproj ├── qrencode.vcxproj.filters ├── qrencode_inner.h ├── qrinput.c ├── qrinput.h ├── qrspec.c ├── qrspec.h ├── rsecc.c ├── rsecc.h ├── split.c ├── split.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── 新建文件夹 ├── Autodesk.arx-2018-net.props └── Autodesk.arx-2018.props └── 求凸包.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | *.opensdf 29 | 30 | # Executables 31 | *.exe 32 | *.out 33 | *.app 34 | /ArxProject2.VC.db 35 | /ArxProject2.VC.VC.opendb 36 | *.tlog 37 | *.exp 38 | *.idb 39 | *.pdb 40 | *.log 41 | *.ipch 42 | *.arx 43 | *.res 44 | *.iobj 45 | *.ipdb 46 | *.err 47 | *.props 48 | -------------------------------------------------------------------------------- /.vs/ArxProject2/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/.vs/ArxProject2/v14/.suo -------------------------------------------------------------------------------- /2dCode/2dCode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/2dCode/2dCode.cpp -------------------------------------------------------------------------------- /2dCode/2dCode.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 头文件 23 | 24 | 25 | 头文件 26 | 27 | 28 | 29 | 30 | 源文件 31 | 32 | 33 | 源文件 34 | 35 | 36 | -------------------------------------------------------------------------------- /2dCode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 控制台应用程序:2dCode 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 2dCode 应用程序。 6 | 7 | 本文件概要介绍组成 2dCode 应用程序的每个文件的内容。 8 | 9 | 10 | 2dCode.vcxproj 11 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 12 | 13 | 2dCode.vcxproj.filters 14 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 15 | 16 | 2dCode.cpp 17 | 这是主应用程序源文件。 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | 其他标准文件: 21 | 22 | StdAfx.h, StdAfx.cpp 23 | 这些文件用于生成名为 2dCode.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | 其他注释: 27 | 28 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | -------------------------------------------------------------------------------- /2dCode/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/2dCode/stdafx.cpp -------------------------------------------------------------------------------- /2dCode/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/2dCode/stdafx.h -------------------------------------------------------------------------------- /2dCode/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/2dCode/targetver.h -------------------------------------------------------------------------------- /2dCode/temp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/2dCode/temp.bmp -------------------------------------------------------------------------------- /AcedCommand_trim/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AcedCommand_trim/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /AcedCommand_trim/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /AcedCommand_trim/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by AcedCommand_trim.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /AcedCommand_trim/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AcedCommand_trim/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /AcedCommand_trim/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /AreaDengFen/AreaFenGe.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/AreaFenGe.cpp -------------------------------------------------------------------------------- /AreaDengFen/AreaFenGe.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | using namespace std; 4 | class CAreaFenGe 5 | { 6 | public: 7 | CAreaFenGe(ACHAR *fenGeStr,AcDbPolyline *&p,AcDbLine *&l); 8 | ~CAreaFenGe(); 9 | 10 | public: 11 | void Command(); 12 | private: 13 | AcGeVector3d GetDirection(); 14 | AcGePoint3d GetQieDian(AcDbLine * &line1); 15 | bool GetPyPolyline(AcGePoint3d seedPoint,double &a); 16 | 17 | private : 18 | AcDbPolyline *poly; 19 | AcDbLine *line; 20 | double totalArea; 21 | vector vecFenGe; 22 | vectorvecArea; 23 | AcGePoint3d l1Pt, l2Pt; 24 | AcGeVector3d pyXl; 25 | AcDbObjectId plId; 26 | 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /AreaDengFen/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/ConvertUtil.h -------------------------------------------------------------------------------- /AreaDengFen/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /AreaDengFen/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /AreaDengFen/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /AreaDengFen/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/GetInputUtil.cpp -------------------------------------------------------------------------------- /AreaDengFen/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /AreaDengFen/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /AreaDengFen/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /AreaDengFen/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by AreaDengFen.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /AreaDengFen/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/SelectUtil.cpp -------------------------------------------------------------------------------- /AreaDengFen/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /AreaDengFen/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/StringUtil.cpp -------------------------------------------------------------------------------- /AreaDengFen/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/StringUtil.h -------------------------------------------------------------------------------- /AreaDengFen/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /AreaDengFen/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/TextFileUtil.h -------------------------------------------------------------------------------- /AreaDengFen/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/AreaDengFen/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/.vs/ArxProject2/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/.vs/ArxProject2/v14/.suo -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/BlockUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/BlockUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/BlockUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class BlockUtil 3 | { 4 | public: 5 | BlockUtil(); 6 | ~BlockUtil(); 7 | static AcDbObjectId CreateBlk(AcDbDatabase * db=acdbHostApplicationServices()->workingDatabase()); 8 | static AcDbObjectId InsertBlk(const ACHAR* blkName, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 9 | static AcDbObjectId InsertBlk(AcDbObjectId blkId, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 10 | static AcDbObjectId InsertBlkWidthAttr(AcDbObjectId blkRecId,AcGePoint3d &ptInsert, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 11 | static void AppendAttrDef2Br(AcDbBlockReference *br, AcDbAttributeDefinition * def); 12 | static void SetAttribute2Br(AcDbBlockReference *br, const TCHAR *tag, const TCHAR *val); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/CGePointUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "GePointUtil.h" 3 | 4 | CGePointUtil::CGePointUtil() 5 | { 6 | } 7 | 8 | CGePointUtil::~CGePointUtil() 9 | { 10 | } 11 | 12 | AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2) 13 | { 14 | AcGePoint3d ptCenter; 15 | 16 | ptCenter.x = (pt1.x + pt2.x) / 2; 17 | ptCenter.y = (pt1.y + pt2.y) / 2; 18 | ptCenter.z = (pt1.z + pt2.z) / 2; 19 | 20 | return ptCenter; 21 | } 22 | 23 | AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle, double length) 24 | { 25 | double x = basePt.x + length*cos(angle); 26 | double y = basePt.y + length*sin(angle); 27 | 28 | return AcGePoint3d(x, y, basePt.z); 29 | } 30 | AcGePoint3d CGePointUtil::RelativePoint(const AcGePoint3d& pt, double x, double y) 31 | { 32 | AcGePoint3d ptReturn(pt.x + x, pt.y + y, pt.z); 33 | return ptReturn; 34 | } 35 | AcGePoint2d CGePointUtil::GetMiddlePoint(const AcGePoint2d &startPoint, const AcGePoint2d &endPoint) 36 | { 37 | double x = (startPoint.x + endPoint.x) * 0.5; 38 | double y = (startPoint.y + endPoint.y) * 0.5; 39 | 40 | return AcGePoint2d(x, y); 41 | } 42 | AcGePoint2d CGePointUtil::PolarPoint(const AcGePoint2d &basePoint, double angle, double length) 43 | { 44 | double x = basePoint.x + length * cos(angle); 45 | double y = basePoint.y + length * sin(angle); 46 | 47 | return AcGePoint2d(x, y); 48 | } -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/CircleUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/CircleUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/CircleUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/CircleUtil.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/ConvertUtil.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.log: -------------------------------------------------------------------------------- 1 |  acrxEntryPoint.cpp 2 | 正在创建库 Debug\ECDArxProject2.lib 和对象 Debug\ECDArxProject2.exp 3 | rxapi.lib(libinit.obj) : warning LNK4099: 未找到 PDB“rxapi.pdb”(使用“rxapi.lib(libinit.obj)”或在“I:\C++学习代码\REPRO2\Debug\rxapi.pdb”中寻找);正在链接对象,如同没有调试信息一样 4 | ArxProject2.vcxproj -> I:\C++学习代码\REPRO2\Debug\ECDArxProject2.arx 5 | ArxProject2.vcxproj -> I:\C++学习代码\REPRO2\Debug\ECDArxProject2.pdb (Full PDB) 6 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.res -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/ArxProject2.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|Win32|I:\C++学习代码\REPRO2\| 3 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/ArxProject2.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/ArxProject2.write.1u.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.command.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.read.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ArxProject2.tlog/rc.write.1.tlog -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ECDArxProject2.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ECDArxProject2.exp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ECDArxProject2.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ECDArxProject2.idb -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Debug/ECDArxProject2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Debug/ECDArxProject2.pdb -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Dimension.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/Dimension.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/DrawRecJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/DrawRecJig.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/DrawRecJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "C:\Autodesk_ObjectARX_2018_Win_64_and_32_Bit\inc\dbjig.h" 3 | class DrawRecJig : 4 | public AcEdJig 5 | { 6 | public: 7 | DrawRecJig(); 8 | ~DrawRecJig(); 9 | virtual DragStatus sampler(); 10 | virtual bool update(); 11 | virtual AcDbEntity* entity() const; 12 | bool DoIt(AcGePoint3d &ptCenter,AcDbObjectId &plId); 13 | private: 14 | AcDbPolyline *pl; 15 | 16 | AcGePoint3d ptCenter; 17 | AcGePoint3d ptCurrent; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "DwgDataBaseUtil.h" 3 | 4 | 5 | CDwgDataBaseUtil::CDwgDataBaseUtil() 6 | { 7 | } 8 | 9 | 10 | CDwgDataBaseUtil::~CDwgDataBaseUtil() 11 | { 12 | } 13 | 14 | AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb) { 15 | 16 | if (pEnt == NULL) { 17 | return AcDbObjectId::kNull; 18 | } 19 | AcDbBlockTable *pTable; 20 | 21 | AcDbBlockTableRecord *blkTblRec; 22 | 23 | AcDbObjectId objId; 24 | 25 | pDb->getBlockTable(pTable, AcDb::OpenMode::kForRead); 26 | pTable->getAt(ACDB_MODEL_SPACE, blkTblRec,AcDb::OpenMode::kForWrite); 27 | 28 | pTable->close(); 29 | 30 | Acad::ErrorStatus status=blkTblRec->appendAcDbEntity(objId,pEnt); 31 | 32 | if (status != Acad::eOk) { 33 | 34 | blkTblRec->close(); 35 | 36 | delete pEnt; 37 | pEnt = NULL; 38 | 39 | return AcDbObjectId::kNull; 40 | 41 | } 42 | 43 | blkTblRec->close(); 44 | pEnt->close(); 45 | 46 | return objId; 47 | } 48 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/EllipseUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "EllipseUtil.h" 3 | #include "DwgDataBaseUtil.h" 4 | #include"GePointUtil.h" 5 | #include"ConvertUtil.h" 6 | 7 | CEllipseUtil::CEllipseUtil() 8 | { 9 | } 10 | 11 | 12 | CEllipseUtil::~CEllipseUtil() 13 | { 14 | } 15 | 16 | AcDbObjectId CEllipseUtil::Add(const AcGePoint3d &ptCenter, const AcGeVector3d &vecNormal, 17 | const AcGeVector3d &majorAxis, double ratio) { 18 | 19 | AcDbEllipse *pEllipse = new AcDbEllipse(ptCenter, vecNormal, majorAxis, ratio); 20 | 21 | return CDwgDataBaseUtil::PostToModelSpace(pEllipse); 22 | } 23 | 24 | AcDbObjectId CEllipseUtil::Add(const AcGePoint2d &pt1, const AcGePoint2d &pt2) { 25 | 26 | AcGePoint3d ptCenter; 27 | 28 | ptCenter = CGePointUtil::GetMiddlePoint(CConvertUtil::ToPoint3d(pt1), CConvertUtil::ToPoint3d(pt2)); 29 | 30 | AcGeVector3d vecNormal(0, 0, 1); 31 | 32 | AcGeVector3d majorAxis(fabs(pt1.x - pt2.x)/2, 0, 0); 33 | 34 | double ratio = fabs((pt1.y - pt2.y) / (pt1.x - pt2.x)); 35 | 36 | return Add(ptCenter, vecNormal, majorAxis, ratio); 37 | 38 | 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/EllipseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CEllipseUtil 3 | { 4 | public: 5 | CEllipseUtil(); 6 | ~CEllipseUtil(); 7 | 8 | static AcDbObjectId CEllipseUtil::Add(const AcGePoint3d &ptCenter, const AcGeVector3d &vecNormal, 9 | const AcGeVector3d &majorAxis, double ratio); 10 | 11 | static AcDbObjectId CEllipseUtil::Add(const AcGePoint2d &pt1, const AcGePoint2d &pt2); 12 | 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGePointUtil 3 | { 4 | public: 5 | CGePointUtil(); 6 | ~CGePointUtil(); 7 | 8 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 9 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 10 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 11 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 12 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/GetInputUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/HatchUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/HatchUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/HatchUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CHatchUtil 3 | { 4 | public: 5 | CHatchUtil(); 6 | ~CHatchUtil(); 7 | static AcDbObjectId CHatchUtil::Add(const AcDbObjectIdArray &loopIds, 8 | const ACHAR*patName= TEXT("SOLID"), 9 | double patternScale = 1 10 | ); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/LayerUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/LayerUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/LayerUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CLayerUtil 3 | { 4 | public: 5 | CLayerUtil(); 6 | ~CLayerUtil(); 7 | static AcDbObjectId Add(const ACHAR* layerName, const int colorIndex = 7); 8 | static AcDbObjectId GetLayerId(const TCHAR* layerName); 9 | static bool SetColor(const TCHAR* layerName,const int colorIndex); 10 | static void GetLayerList(AcDbObjectIdArray & lIds); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/LineUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/LineUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/LineUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CLineUtil 3 | { 4 | public: 5 | CLineUtil(); 6 | ~CLineUtil(); 7 | static AcDbObjectId Add(const AcGePoint3d & startPoint, const AcGePoint3d & endPoint, AcDbDatabase *pDb = acdbHostApplicationServices()->workingDatabase()); 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/PolylineUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CPolylineUtil 3 | { 4 | public: 5 | CPolylineUtil(); 6 | ~CPolylineUtil(); 7 | 8 | static AcDbObjectId CPolylineUtil::Add(const AcGePoint2dArray &points, double width=0); 9 | static AcDbObjectId CPolylineUtil::Add(const AcGePoint2d &ptStart, const AcGePoint2d &ptEnd, double width = 0); 10 | static AcDbObjectId CPolylineUtil::Add3dPolyline(const AcGePoint3dArray &points); 11 | static AcDbObjectId CPolylineUtil::AddRectangle(const AcGePoint2d &pt1, const AcGePoint2d &pt2, double width); 12 | static AcDbObjectId CPolylineUtil::AddPolyCircle(const AcGePoint2d &ptCenter, double radius, double width); 13 | static AcDbObjectId CPolylineUtil::AddPolygon(const AcGePoint2d &ptCenter, int number, double radius, double rotation, double width); 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/RegionUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "RegionUtil.h" 3 | 4 | 5 | CRegionUtil::CRegionUtil() 6 | { 7 | } 8 | 9 | 10 | CRegionUtil::~CRegionUtil() 11 | { 12 | } 13 | 14 | AcDbObjectIdArray CRegionUtil::Add(AcDbObjectIdArray oIds) 15 | { 16 | return AcDbObjectIdArray(); 17 | } 18 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/RegionUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CRegionUtil 3 | { 4 | public: 5 | CRegionUtil(); 6 | ~CRegionUtil(); 7 | static AcDbObjectIdArray CRegionUtil::Add(AcDbObjectIdArray oIds); 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ArxProject1.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/RunCommand.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "RunCommand.h" 3 | 4 | 5 | RunCommand::RunCommand() 6 | { 7 | } 8 | 9 | 10 | RunCommand::~RunCommand() 11 | { 12 | } 13 | 14 | AcDbObjectId RunCommand::CreateLine() { 15 | AcGePoint3d pStart(0, 0, 0); 16 | AcGePoint3d pEnd(100, 100, 0); 17 | 18 | AcDbLine *pLine = new AcDbLine(pStart, pEnd); 19 | 20 | AcDbBlockTable *pBlockTable = NULL; 21 | 22 | acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlockTable, AcDb::OpenMode::kForRead); 23 | 24 | AcDbBlockTableRecord *pBlockTableRecord; 25 | 26 | pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite); 27 | 28 | AcDbObjectId lineId; 29 | 30 | pBlockTableRecord->appendAcDbEntity(lineId, pLine); 31 | 32 | pBlockTable->close(); 33 | 34 | pBlockTableRecord->close(); 35 | 36 | pLine->close(); 37 | 38 | return lineId; 39 | } 40 | 41 | Acad::ErrorStatus RunCommand::ChangeColor(AcDbObjectId entId, Adesk::UInt16 coloridx) { 42 | 43 | AcDbEntity*pEnt; 44 | 45 | acdbOpenObject(pEnt, entId, AcDb::OpenMode::kForWrite); 46 | 47 | if (pEnt != NULL) { 48 | 49 | pEnt->setColorIndex(coloridx); 50 | 51 | pEnt->close(); 52 | 53 | return Acad::eOk; 54 | 55 | } 56 | return Acad::eInvalidXrefObjectId; 57 | } -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/RunCommand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class RunCommand 3 | { 4 | public: 5 | RunCommand(); 6 | ~RunCommand(); 7 | AcDbObjectId CreateLine(); 8 | Acad::ErrorStatus ChangeColor(AcDbObjectId entId, Adesk::UInt16 coloridx); 9 | 10 | 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/SelectUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/SelectionSetCommands.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/SelectionSetCommands.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/SplieUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SplieUtil.h" 3 | #include"DwgDataBaseUtil.h" 4 | 5 | CSplieUtil::CSplieUtil() 6 | { 7 | } 8 | 9 | CSplieUtil::~CSplieUtil() 10 | { 11 | } 12 | 13 | AcDbObjectId CSplieUtil::Add(const AcGePoint3dArray & points, int order, double fitTolerance) 14 | { 15 | AcDbSpline *spline =new AcDbSpline(points, order, fitTolerance); 16 | 17 | return CDwgDataBaseUtil::PostToModelSpace(spline); 18 | 19 | } 20 | 21 | AcDbObjectId CSplieUtil::Add(const AcGePoint3dArray & points, const AcGeVector3d startTangent, AcGeVector3d endTangent, int order, double fitTolerance) 22 | { 23 | AcDbSpline *spline = new AcDbSpline(points, startTangent, endTangent, order, fitTolerance); 24 | 25 | return CDwgDataBaseUtil::PostToModelSpace(spline); 26 | } 27 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/SplieUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CSplieUtil 3 | { 4 | public: 5 | CSplieUtil(); 6 | ~CSplieUtil(); 7 | 8 | static AcDbObjectId CSplieUtil::Add(const AcGePoint3dArray &points, 9 | int order, double fitTolerance); 10 | 11 | static AcDbObjectId CSplieUtil::Add(const AcGePoint3dArray &points, 12 | const AcGeVector3d startTangent, AcGeVector3d endTangent, 13 | int order, double fitTolerance); 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/StringUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/StringUtil.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/TextFileUtil.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextStyleUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/TextStyleUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextStyleUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CTextStyleUtil 4 | { 5 | public: 6 | CTextStyleUtil(); 7 | ~CTextStyleUtil(); 8 | 9 | static AcDbObjectId Add(const TCHAR* name, 10 | const TCHAR* fontFileName = TEXT("txt.shx"), 11 | const TCHAR* bigFontFileName = TEXT("gbcbig.shx")); 12 | 13 | static AcDbObjectId GetAt(const TCHAR* name); 14 | 15 | static void GetAll(std::vector&textStyles); 16 | 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextUtil.h" 3 | #include "DwgDataBaseUtil.h" 4 | 5 | CTextUtil::CTextUtil() 6 | { 7 | } 8 | 9 | 10 | CTextUtil::~CTextUtil() 11 | { 12 | } 13 | 14 | AcDbObjectId CTextUtil::AddText(AcGePoint3d & ptInsert, const wchar_t * text, AcDbObjectId style, double height, double rotation) 15 | { 16 | AcDbText* t= new AcDbText(ptInsert, text, style, height, rotation); 17 | 18 | return CDwgDataBaseUtil::PostToModelSpace(t); 19 | } 20 | 21 | AcDbObjectId CTextUtil::AddMText(AcGePoint3d & ptInsert, wchar_t * text, AcDbObjectId style, double height, double width) 22 | { 23 | AcDbMText *mt = new AcDbMText(); 24 | mt->setContents(text); 25 | mt->setTextHeight(height); 26 | mt->setWidth( width); 27 | mt->setLocation(ptInsert); 28 | mt->setDatabaseDefaults(); 29 | 30 | return CDwgDataBaseUtil::PostToModelSpace(mt); 31 | } 32 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TextUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CTextUtil 3 | { 4 | public: 5 | CTextUtil(); 6 | ~CTextUtil(); 7 | static AcDbObjectId CTextUtil::AddText(AcGePoint3d & ptInsert, const wchar_t *text, 8 | AcDbObjectId style=AcDbObjectId::kNull,double height=2.5,double rotation=0.0); 9 | 10 | static AcDbObjectId CTextUtil::AddMText(AcGePoint3d & ptInsert, wchar_t *text, 11 | AcDbObjectId style = AcDbObjectId::kNull, double height = 2.5, double width = 10); 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TransUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/TransUtil.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/TransUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/TransUtil.h -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject2/ArxProject2/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ArxProject2/ArxProject2/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /ArxProject3/AppDirectoryUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "AppDirectoryUtil.h" 3 | 4 | 5 | CAppDirectoryUtil::CAppDirectoryUtil() 6 | { 7 | } 8 | 9 | 10 | CAppDirectoryUtil::~CAppDirectoryUtil() 11 | { 12 | } 13 | 14 | CString CAppDirectoryUtil::GetCurrentDirectory(HMODULE hInstance) 15 | { 16 | TCHAR szPath[256]; 17 | 18 | GetModuleFileName(hInstance, szPath, sizeof(szPath)); 19 | 20 | *(_tcsrchr(szPath, '\\')) = 0; 21 | 22 | CString strResult = szPath; 23 | 24 | 25 | return strResult; 26 | 27 | 28 | } 29 | 30 | CString CAppDirectoryUtil::GetParentDirectory(HMODULE hInstance) 31 | { 32 | TCHAR szPath[256]; 33 | 34 | GetModuleFileName(hInstance, szPath, sizeof(szPath)); 35 | 36 | *(_tcsrchr(szPath, '\\')) = 0; 37 | *(_tcsrchr(szPath, '\\')) = 0; 38 | 39 | CString strResult = szPath; 40 | 41 | 42 | return strResult; 43 | } 44 | -------------------------------------------------------------------------------- /ArxProject3/AppDirectoryUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CAppDirectoryUtil 3 | { 4 | public: 5 | CAppDirectoryUtil(); 6 | ~CAppDirectoryUtil(); 7 | static CString GetCurrentDirectory(HMODULE hInstance = _hdllInstance); 8 | static CString GetParentDirectory(HMODULE hInstance = _hdllInstance); 9 | 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /ArxProject3/ArxDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/ArxDialog.cpp -------------------------------------------------------------------------------- /ArxProject3/ArxProject3.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/ArxProject3.aps -------------------------------------------------------------------------------- /ArxProject3/ArxProject3.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/ArxProject3.rc -------------------------------------------------------------------------------- /ArxProject3/BlockUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/BlockUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/BlockUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class BlockUtil 3 | { 4 | public: 5 | BlockUtil(); 6 | ~BlockUtil(); 7 | static AcDbObjectId CreateBlk(AcDbDatabase * db=acdbHostApplicationServices()->workingDatabase()); 8 | static AcDbObjectId InsertBlk(const ACHAR* blkName, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 9 | static AcDbObjectId InsertBlk(AcDbObjectId blkId, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 10 | static AcDbObjectId InsertBlkWidthAttr(AcDbObjectId blkRecId,AcGePoint3d &ptInsert, AcDbDatabase * db = acdbHostApplicationServices()->workingDatabase()); 11 | static void AppendAttrDef2Br(AcDbBlockReference *br, AcDbAttributeDefinition * def); 12 | static void SetAttribute2Br(AcDbBlockReference *br, const TCHAR *tag, const TCHAR *val); 13 | static AcDbObjectId CopyBlockDefFromOtherDwg(const TCHAR *fileName, const TCHAR *blkDefName); 14 | static AcDbObjectId GetBlkDefId(const TCHAR *blkName, AcDbDatabase * pDb = acdbHostApplicationServices()->workingDatabase()); 15 | static AcDbObjectId InsertDwgBlockDef(const TCHAR * dwgFileName, const 16 | TCHAR *blkName, bool bOverwriteIfExist, AcDbDatabase *pDb = acdbHostApplicationServices()->workingDatabase()); 17 | 18 | 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /ArxProject3/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/ConvertUtil.h -------------------------------------------------------------------------------- /ArxProject3/DatabaseJigEntity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/DatabaseJigEntity.cpp -------------------------------------------------------------------------------- /ArxProject3/DatabaseJigEntity.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/DatabaseJigEntity.h -------------------------------------------------------------------------------- /ArxProject3/DimMirror.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/DimMirror.cpp -------------------------------------------------------------------------------- /ArxProject3/DimMirror.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDimMirror 3 | { 4 | public: 5 | CDimMirror(); 6 | ~CDimMirror(); 7 | void Command(); 8 | 9 | 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /ArxProject3/DrawRecJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/DrawRecJig.cpp -------------------------------------------------------------------------------- /ArxProject3/DrawRecJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "dbjig.h" 3 | class DrawRecJig : 4 | public AcEdJig 5 | { 6 | public: 7 | DrawRecJig(); 8 | ~DrawRecJig(); 9 | virtual DragStatus sampler(); 10 | virtual bool update(); 11 | virtual AcDbEntity* entity() const; 12 | bool DoIt(AcGePoint3d &ptCenter,AcDbObjectId &plId); 13 | private: 14 | AcDbPolyline *pl; 15 | 16 | AcGePoint3d ptCenter; 17 | AcGePoint3d ptCurrent; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /ArxProject3/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ArxProject3/FindTextAndBlock.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/FindTextAndBlock.cpp -------------------------------------------------------------------------------- /ArxProject3/FindTextAndBlock.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/FindTextAndBlock.h -------------------------------------------------------------------------------- /ArxProject3/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /ArxProject3/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/GetInputUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /ArxProject3/MFCDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MFCDialog.cpp -------------------------------------------------------------------------------- /ArxProject3/MFCDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MFCDialog.h -------------------------------------------------------------------------------- /ArxProject3/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /ArxProject3/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ArxProject3/MirrorJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MirrorJig.cpp -------------------------------------------------------------------------------- /ArxProject3/MirrorJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "dbjig.h" 4 | #include"DatabaseJigEntity.h" 5 | class MirrorJig : 6 | public AcEdJig 7 | { 8 | public: 9 | MirrorJig(); 10 | ~MirrorJig(); 11 | virtual DragStatus sampler(); 12 | virtual bool update(); 13 | virtual AcDbEntity* entity() const; 14 | void DoIt(AcGePoint3d& ptBase ,AcDbObjectIdArray &idArr, bool bCopy=false); 15 | AcDbLine *mirrorLine; 16 | 17 | private: 18 | AcGePoint3d ptCurrent; 19 | AcGePoint3d ptBase; 20 | CDatabaseJigEntity *m_pEnt; 21 | AcGeMatrix3d m_Xform; 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /ArxProject3/ModelessDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/ModelessDialog.cpp -------------------------------------------------------------------------------- /ArxProject3/MoveJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MoveJig.cpp -------------------------------------------------------------------------------- /ArxProject3/MoveJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"DatabaseJigEntity.h" 3 | class CMoveJig:public AcEdJig 4 | { 5 | public: 6 | CMoveJig(const AcGePoint3d & fromPoint) : m_pEnt(NULL), m_FromPoint(fromPoint), m_ToPoint(fromPoint) {} 7 | ~CMoveJig(); 8 | void doIt(const AcDbObjectIdArray & ids, bool bCopy = false); 9 | virtual AcEdJig::DragStatus sampler(); 10 | virtual Adesk::Boolean update(); 11 | virtual AcDbEntity* entity() const; 12 | private: 13 | CDatabaseJigEntity *m_pEnt; 14 | AcGePoint3d m_FromPoint; 15 | AcGePoint3d m_ToPoint; 16 | AcGeMatrix3d m_Xform; 17 | }; 18 | 19 | 20 | -------------------------------------------------------------------------------- /ArxProject3/MyTuBao.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MyTuBao.cpp -------------------------------------------------------------------------------- /ArxProject3/MyTuBao.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/MyTuBao.h -------------------------------------------------------------------------------- /ArxProject3/PolylineUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CPolylineUtil 3 | { 4 | public: 5 | CPolylineUtil(); 6 | ~CPolylineUtil(); 7 | 8 | static AcDbObjectId CPolylineUtil::Add(const AcGePoint2dArray &points, double width=0); 9 | static AcDbObjectId CPolylineUtil::Add(const AcGePoint2d &ptStart, const AcGePoint2d &ptEnd, double width = 0); 10 | static AcDbObjectId CPolylineUtil::Add3dPolyline(const AcGePoint3dArray &points); 11 | static AcDbObjectId CPolylineUtil::AddRectangle(const AcGePoint2d &pt1, const AcGePoint2d &pt2, double width); 12 | static AcDbObjectId CPolylineUtil::AddPolyCircle(const AcGePoint2d &ptCenter, double radius, double width); 13 | static AcDbObjectId CPolylineUtil::AddPolygon(const AcGePoint2d &ptCenter, int number, double radius, double rotation, double width); 14 | static bool PointIsPolyVert(AcDbPolyline *pPoly, const AcGePoint2d &pt, double tol); 15 | static void IntersetWithGeRay(AcDbPolyline * pPoly, const AcGeRay2d &geRay, 16 | AcGePoint3dArray &intPoints, double tol = 1.0E-7); 17 | static int PtRelationToPoly(AcDbPolyline *pPoly, const AcGePoint2d &pt, double tol = 1.0E-7); 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /ArxProject3/RegionUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CRegionUtil 3 | { 4 | public: 5 | CRegionUtil(); 6 | ~CRegionUtil(); 7 | static void GetRegionPoints(AcDbRegion * pRegion, AcGePoint3dArray & points); 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /ArxProject3/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/Resource.h -------------------------------------------------------------------------------- /ArxProject3/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/SelectUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /ArxProject3/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/StringUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/StringUtil.h -------------------------------------------------------------------------------- /ArxProject3/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /ArxProject3/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/TextFileUtil.h -------------------------------------------------------------------------------- /ArxProject3/TransUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/TransUtil.cpp -------------------------------------------------------------------------------- /ArxProject3/TransUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/TransUtil.h -------------------------------------------------------------------------------- /ArxProject3/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ArxProject3/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /CheckPolyline/CheckPolyline.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDCheckPolyline.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /CheckPolyline/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/CheckPolyline/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /CheckPolyline/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /CheckPolyline/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by CheckPolyline.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /CheckPolyline/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/CheckPolyline/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /CheckPolyline/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /CustomObjDBX/CustomObjDBX.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | //- CustomObjDBX.cpp : Initialization functions 3 | //----------------------------------------------------------------------------- 4 | #include "StdAfx.h" 5 | #include "resource.h" 6 | #include 7 | #include"ECDDwgScaleCO.h" 8 | 9 | //----------------------------------------------------------------------------- 10 | //- Define the sole extension module object. 11 | AC_IMPLEMENT_EXTENSION_MODULE(CustomObjDBXDLL) 12 | //- Now you can use the CAcModuleResourceOverride class in 13 | //- your application to switch to the correct resource instance. 14 | //- Please see the ObjectARX Documentation for more details 15 | 16 | //----------------------------------------------------------------------------- 17 | //- DLL Entry Point 18 | extern "C" 19 | BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { 20 | //- Remove this if you use lpReserved 21 | UNREFERENCED_PARAMETER(lpReserved) ; 22 | 23 | if ( dwReason == DLL_PROCESS_ATTACH ) { 24 | _hdllInstance =hInstance ; 25 | CustomObjDBXDLL.AttachInstance (hInstance) ; 26 | } else if ( dwReason == DLL_PROCESS_DETACH ) { 27 | CustomObjDBXDLL.DetachInstance () ; 28 | } 29 | return (TRUE) ; 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /CustomObjDBX/ECDDwgScaleCO.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef CUSTOMOBJDBX_MODULE 4 | #define DLLIMPEXP __declspec(dllexport) 5 | #else 6 | #define DLLIMPEXP 7 | #endif 8 | 9 | //----------------------------------------------------------------------------- 10 | #include "dbmain.h" 11 | 12 | //----------------------------------------------------------------------------- 13 | class DLLIMPEXP ECDDwgScaleCO : public AcDbObject { 14 | 15 | public: 16 | ACRX_DECLARE_MEMBERS(ECDDwgScaleCO) ; 17 | Adesk::Int32 m_infoScale; 18 | Adesk::Int32 m_lableScale; 19 | 20 | 21 | protected: 22 | static Adesk::UInt32 kCurrentVersionNumber ; 23 | 24 | 25 | public: 26 | ECDDwgScaleCO(); 27 | virtual ~ECDDwgScaleCO () ; 28 | 29 | //----- AcDbObject protocols 30 | //- Dwg Filing protocol 31 | virtual Acad::ErrorStatus dwgOutFields (AcDbDwgFiler *pFiler) const ; 32 | virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler *pFiler) ; 33 | 34 | //- Dxf Filing protocol 35 | virtual Acad::ErrorStatus dxfOutFields (AcDbDxfFiler *pFiler) const ; 36 | virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler *pFiler) ; 37 | 38 | 39 | void Set(int infoScale, int lableScale); 40 | int GetInfoScale() const; 41 | int GetLableScale()const; 42 | 43 | } ; 44 | 45 | #ifdef CUSTOMOBJDBX_MODULE 46 | ACDB_REGISTER_OBJECT_ENTRY_AUTO(ECDDwgScaleCO) 47 | #endif 48 | -------------------------------------------------------------------------------- /CustomObjDBX/ECDTriangleObj.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/CustomObjDBX/ECDTriangleObj.cpp -------------------------------------------------------------------------------- /CustomObjDBX/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by CustomObjDBX.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /CustomObjDBX/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /CustomObjDBX/x64/Debug/CustomObjDBX.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/CustomObjDBX/x64/Debug/CustomObjDBX.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /CustomObjDBX/x64/Debug/CustomObjDBX.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/CustomObjDBX/x64/Debug/CustomObjDBX.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Debug/ECDArxProject2.arx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Debug/ECDArxProject2.arx -------------------------------------------------------------------------------- /Debug/ECDArxProject2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Debug/ECDArxProject2.pdb -------------------------------------------------------------------------------- /DimMirror/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by DimMirror.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /DimMirror/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DimMirror/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/ConvertUtil.h -------------------------------------------------------------------------------- /DongTaiGongXian/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /DongTaiGongXian/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /DongTaiGongXian/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/GetInputUtil.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /DongTaiGongXian/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /DongTaiGongXian/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /DongTaiGongXian/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by DongTaiGongXian.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /DongTaiGongXian/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/SelectUtil.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /DongTaiGongXian/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/StringUtil.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/StringUtil.h -------------------------------------------------------------------------------- /DongTaiGongXian/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /DongTaiGongXian/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/TextFileUtil.h -------------------------------------------------------------------------------- /DongTaiGongXian/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/DongTaiGongXian/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /DongTaiGongXian/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /ECDDrawGrider/CGePointUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "GePointUtil.h" 3 | 4 | CGePointUtil::CGePointUtil() 5 | { 6 | } 7 | 8 | CGePointUtil::~CGePointUtil() 9 | { 10 | } 11 | 12 | AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2) 13 | { 14 | AcGePoint3d ptCenter; 15 | 16 | ptCenter.x = (pt1.x + pt2.x) / 2; 17 | ptCenter.y = (pt1.y + pt2.y) / 2; 18 | ptCenter.z = (pt1.z + pt2.z) / 2; 19 | 20 | return ptCenter; 21 | } 22 | 23 | AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle, double length) 24 | { 25 | double x = basePt.x + length*cos(angle); 26 | double y = basePt.y + length*sin(angle); 27 | 28 | return AcGePoint3d(x, y, basePt.z); 29 | } 30 | AcGePoint3d CGePointUtil::RelativePoint(const AcGePoint3d& pt, double x, double y) 31 | { 32 | AcGePoint3d ptReturn(pt.x + x, pt.y + y, pt.z); 33 | return ptReturn; 34 | } 35 | AcGePoint2d CGePointUtil::GetMiddlePoint(const AcGePoint2d &startPoint, const AcGePoint2d &endPoint) 36 | { 37 | double x = (startPoint.x + endPoint.x) * 0.5; 38 | double y = (startPoint.y + endPoint.y) * 0.5; 39 | 40 | return AcGePoint2d(x, y); 41 | } 42 | AcGePoint2d CGePointUtil::PolarPoint(const AcGePoint2d &basePoint, double angle, double length) 43 | { 44 | double x = basePoint.x + length * cos(angle); 45 | double y = basePoint.y + length * sin(angle); 46 | 47 | return AcGePoint2d(x, y); 48 | } -------------------------------------------------------------------------------- /ECDDrawGrider/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/ConvertUtil.h -------------------------------------------------------------------------------- /ECDDrawGrider/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /ECDDrawGrider/ECDMyHuaLiang.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/ECDMyHuaLiang.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/ECDMyHuaLiang.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class ECDMyHuaLiang 4 | { 5 | public: 6 | ECDMyHuaLiang(); 7 | ~ECDMyHuaLiang(); 8 | void Command(); 9 | 10 | private : 11 | AcDbEntity *GetEntity(const ACHAR *str); 12 | 13 | AcDbObjectId AddLayer(AcDbDatabase *db, const ACHAR *layerName, AcCmColor color); 14 | 15 | void CutLine(AcDbEntity *ent1, AcDbEntity *ent2, std::vectorlistLines); 16 | 17 | AcGePoint3d GetCenterPt(AcDbEntity * ent); 18 | 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /ECDDrawGrider/EcdKuaiJX.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/EcdKuaiJX.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/EcdKuaiJX.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | using namespace std; 4 | class EcdKuaiJX 5 | { 6 | public: 7 | EcdKuaiJX(); 8 | ~EcdKuaiJX(); 9 | 10 | void Command(); 11 | 12 | void MirrorText(AcDbText *text, AcGeLine3d mirrorLine); 13 | void MirrorText(AcDbMText *mText, AcGeLine3d mirrorLine); 14 | 15 | private : 16 | void GetTextBoxCorners(AcDbText &dbText, AcGePoint3d &pt1, AcGePoint3d &pt2, 17 | AcGePoint3d &pt3, AcGePoint3d &pt4); 18 | void MyMirror(vector listEnt, AcGeLine3d l3d, char xY); 19 | 20 | private: 21 | vector listVec; 22 | AcDbObjectIdArray listOId; 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /ECDDrawGrider/EcdZhuangZhu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/EcdZhuangZhu.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/EcdZhuangZhu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class EcdZhuangZhu 3 | { 4 | public: 5 | EcdZhuangZhu(); 6 | ~EcdZhuangZhu(); 7 | void Command(); 8 | private : 9 | AcDbObjectId AddLayer(AcDbDatabase *db, const ACHAR *layerName, AcCmColor color); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /ECDDrawGrider/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGePointUtil 3 | { 4 | public: 5 | CGePointUtil(); 6 | ~CGePointUtil(); 7 | 8 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 9 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 10 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 11 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 12 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ECDDrawGrider/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/GetInputUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /ECDDrawGrider/HatchUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/HatchUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/HatchUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CHatchUtil 3 | { 4 | public: 5 | CHatchUtil(); 6 | ~CHatchUtil(); 7 | static AcDbObjectId CHatchUtil::Add(const AcDbObjectIdArray &loopIds, 8 | const ACHAR*patName= TEXT("SOLID"), 9 | double patternScale = 1 10 | ); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ECDDrawGrider/LayerUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/LayerUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/LayerUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CLayerUtil 3 | { 4 | public: 5 | CLayerUtil(); 6 | ~CLayerUtil(); 7 | static AcDbObjectId Add(const ACHAR* layerName, const int colorIndex = 7); 8 | static AcDbObjectId GetLayerId(const TCHAR* layerName); 9 | static bool SetColor(const TCHAR* layerName,const int colorIndex); 10 | static void GetLayerList(AcDbObjectIdArray & lIds); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ECDDrawGrider/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return atan(1.0) * 4; 16 | } 17 | -------------------------------------------------------------------------------- /ECDDrawGrider/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /ECDDrawGrider/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ECDDrawGrider.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ECDDrawGrider/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/SelectUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /ECDDrawGrider/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/StringUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/StringUtil.h -------------------------------------------------------------------------------- /ECDDrawGrider/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /ECDDrawGrider/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/TextFileUtil.h -------------------------------------------------------------------------------- /ECDDrawGrider/TransUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/TransUtil.cpp -------------------------------------------------------------------------------- /ECDDrawGrider/TransUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/TransUtil.h -------------------------------------------------------------------------------- /ECDDrawGrider/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDDrawGrider/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ECDFillHatch/ECDFillHatch.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDECDFillHatch.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /ECDFillHatch/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ECDFillHatch.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ECDFillHatch/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDFillHatch/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ECDFillHatch/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /ECDZJPl/ECDZJPl.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDECDZJPl.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /ECDZJPl/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ECDZJPl.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ECDZJPl/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright 2002-2012 by Autodesk, Inc. 2 | // 3 | // Permission to use, copy, modify, and distribute this software in 4 | // object code form for any purpose and without fee is hereby granted, 5 | // provided that the above copyright notice appears in all copies and 6 | // that both that copyright notice and the limited warranty and 7 | // restricted rights notice below appear in all supporting 8 | // documentation. 9 | // 10 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 11 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 12 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 13 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 14 | // UNINTERRUPTED OR ERROR FREE. 15 | // 16 | // Use, duplication, or disclosure by the U.S. Government is subject to 17 | // restrictions set forth in FAR 52.227-19 (Commercial Computer 18 | // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) 19 | // (Rights in Technical Data and Computer Software), as applicable. 20 | // 21 | 22 | //----------------------------------------------------------------------------- 23 | //------ StdAfx.cpp : source file that includes just the standard includes 24 | //------ StdAfx.pch will be the pre-compiled header 25 | //------ StdAfx.obj will contain the pre-compiled type information 26 | //----------------------------------------------------------------------------- 27 | #include "StdAfx.h" 28 | -------------------------------------------------------------------------------- /ECDZJPl/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDZJPl/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ECDZJPl/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /ECDZhiXianDengJu/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDZhiXianDengJu/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /ECDZhiXianDengJu/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ECDZhiXianDengJu/ECDZhiXianDengJu.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /ECDZhiXianDengJu/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ECDZhiXianDengJu.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ECDZhiXianDengJu/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ECDZhiXianDengJu/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /ECDZhiXianDengJu/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdCzFZX/EcdCzFZX.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdCzFZX.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdCzFZX/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdCzFZX.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdCzFZX/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdCzFZX/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdCzFZX/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdJiaYe/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdJiaYe/ReadMe.txt -------------------------------------------------------------------------------- /EcdJiaYe/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdJiaYe.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdJiaYe/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdJiaYe/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdJiaoDF/EcdJiaoDF.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /EcdJiaoDF/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdJiaoDF.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdJiaoDF/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdJiaoDF/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdJiaoDF/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdLunKuo/EcdLunKuo.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdLunKuo.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdLunKuo/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdLunKuo.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdLunKuo/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdLunKuo/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdLunKuo/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdMLeader/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdMLeader.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdMLeader/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMLeader/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdMLeader/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdMirror/DatabaseJigEntity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/DatabaseJigEntity.cpp -------------------------------------------------------------------------------- /EcdMirror/DatabaseJigEntity.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/DatabaseJigEntity.h -------------------------------------------------------------------------------- /EcdMirror/EcdMirror.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdMirror.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdMirror/MoveJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/MoveJig.cpp -------------------------------------------------------------------------------- /EcdMirror/MoveJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"DatabaseJigEntity.h" 3 | class CMoveJig:public AcEdJig 4 | { 5 | public: 6 | CMoveJig(const AcGePoint3d & fromPoint) : m_pEnt(NULL), m_FromPoint(fromPoint), m_ToPoint(fromPoint) {} 7 | CMoveJig(const AcGePoint3d & fromPoint, const AcGePoint3d & toPoint) : m_pEnt(NULL), m_FromPoint(fromPoint), m_ToPoint(toPoint) {} 8 | ~CMoveJig(); 9 | void doIt(const AcDbObjectIdArray & ids, bool bCopy = false); 10 | void UpdateDoIt(const AcDbObjectIdArray & ids, bool bCopy = false); 11 | virtual AcEdJig::DragStatus sampler(); 12 | virtual Adesk::Boolean update(); 13 | virtual AcDbEntity* entity() const; 14 | AcGePoint3d m_ToPoint; 15 | AcDbObjectIdArray m_idsC; 16 | private: 17 | CDatabaseJigEntity *m_pEnt; 18 | AcGePoint3d m_FromPoint; 19 | 20 | AcGeMatrix3d m_Xform; 21 | }; 22 | 23 | 24 | -------------------------------------------------------------------------------- /EcdMirror/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/ReadMe.txt -------------------------------------------------------------------------------- /EcdMirror/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdMirror.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdMirror/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/StringUtil.cpp -------------------------------------------------------------------------------- /EcdMirror/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/StringUtil.h -------------------------------------------------------------------------------- /EcdMirror/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdMirror16/DatabaseJigEntity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/DatabaseJigEntity.cpp -------------------------------------------------------------------------------- /EcdMirror16/DatabaseJigEntity.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/DatabaseJigEntity.h -------------------------------------------------------------------------------- /EcdMirror16/MoveJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/MoveJig.cpp -------------------------------------------------------------------------------- /EcdMirror16/MoveJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"DatabaseJigEntity.h" 3 | class CMoveJig:public AcEdJig 4 | { 5 | public: 6 | CMoveJig(const AcGePoint3d & fromPoint) : m_pEnt(NULL), m_FromPoint(fromPoint), m_ToPoint(fromPoint) {} 7 | CMoveJig(const AcGePoint3d & fromPoint, const AcGePoint3d & toPoint) : m_pEnt(NULL), m_FromPoint(fromPoint), m_ToPoint(toPoint) {} 8 | ~CMoveJig(); 9 | void doIt(const AcDbObjectIdArray & ids, bool bCopy = false); 10 | void UpdateDoIt(const AcDbObjectIdArray & ids, bool bCopy = false); 11 | virtual AcEdJig::DragStatus sampler(); 12 | virtual Adesk::Boolean update(); 13 | virtual AcDbEntity* entity() const; 14 | AcGePoint3d m_ToPoint; 15 | AcDbObjectIdArray m_idsC; 16 | private: 17 | CDatabaseJigEntity *m_pEnt; 18 | AcGePoint3d m_FromPoint; 19 | 20 | AcGeMatrix3d m_Xform; 21 | }; 22 | 23 | 24 | -------------------------------------------------------------------------------- /EcdMirror16/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdMirror.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdMirror16/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/StringUtil.cpp -------------------------------------------------------------------------------- /EcdMirror16/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/StringUtil.h -------------------------------------------------------------------------------- /EcdMirror16/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdMirror16/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdQieXian/EcdQieXian.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdQieXian.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdQieXian/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdQieXian.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdQieXian/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdQieXian/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdQieXian/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdXClip/EcdXClip.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /EcdXClip/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdXClip.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdXClip/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdXClip/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdXClip/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdXiHe/EcdXiHe.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdXiHe.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdXiHe/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdXiHe.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdXiHe/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright 2002-2012 by Autodesk, Inc. 2 | // 3 | // Permission to use, copy, modify, and distribute this software in 4 | // object code form for any purpose and without fee is hereby granted, 5 | // provided that the above copyright notice appears in all copies and 6 | // that both that copyright notice and the limited warranty and 7 | // restricted rights notice below appear in all supporting 8 | // documentation. 9 | // 10 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 11 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 12 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 13 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 14 | // UNINTERRUPTED OR ERROR FREE. 15 | // 16 | // Use, duplication, or disclosure by the U.S. Government is subject to 17 | // restrictions set forth in FAR 52.227-19 (Commercial Computer 18 | // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) 19 | // (Rights in Technical Data and Computer Software), as applicable. 20 | // 21 | 22 | //----------------------------------------------------------------------------- 23 | //------ StdAfx.cpp : source file that includes just the standard includes 24 | //------ StdAfx.pch will be the pre-compiled header 25 | //------ StdAfx.obj will contain the pre-compiled type information 26 | //----------------------------------------------------------------------------- 27 | #include "StdAfx.h" 28 | -------------------------------------------------------------------------------- /EcdXiHe/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdXiHe/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdXiHe/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /EcdZheZhao/EcdZheZhao.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "E:\C-AutoCAD\x64\Debug\ECDEcdZheZhao.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdZheZhao/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdZheZhao.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdZheZhao/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZheZhao/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdZiFuLX/DatabaseJigEntity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZiFuLX/DatabaseJigEntity.cpp -------------------------------------------------------------------------------- /EcdZiFuLX/DatabaseJigEntity.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZiFuLX/DatabaseJigEntity.h -------------------------------------------------------------------------------- /EcdZiFuLX/EcdZiFuLX.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | /ld "‪E:\C-AutoCAD\x64\Debug\ECDEcdZiFuLX.arx" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /EcdZiFuLX/LineJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZiFuLX/LineJig.cpp -------------------------------------------------------------------------------- /EcdZiFuLX/LineJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "dbjig.h" 3 | #include 4 | #include"DatabaseJigEntity.h" 5 | using namespace std; 6 | class LineJig :public AcEdJig 7 | { 8 | public: 9 | LineJig():m_pEnt(NULL){} 10 | ~LineJig(); 11 | virtual DragStatus sampler(); 12 | virtual bool update(); 13 | virtual AcDbEntity* entity() const; 14 | void DoIt(vector &vecLine); 15 | void DoIt(AcDbObjectIdArray &s); 16 | AcDbObjectId PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb = acdbHostApplicationServices()->workingDatabase()); 17 | private: 18 | AcGePoint3d ptCurrent; 19 | vector lines; 20 | CDatabaseJigEntity *m_pEnt; 21 | 22 | 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /EcdZiFuLX/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by EcdZiFuLX.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /EcdZiFuLX/acad.err: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZiFuLX/acad.err -------------------------------------------------------------------------------- /EcdZiFuLX/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/EcdZiFuLX/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /EcdZiFuLX/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /ImPortExcel/CApplication.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CApplication.h -------------------------------------------------------------------------------- /ImPortExcel/CRange.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CRange.h -------------------------------------------------------------------------------- /ImPortExcel/CRanges.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CRanges.h -------------------------------------------------------------------------------- /ImPortExcel/CWorkbook.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CWorkbook.h -------------------------------------------------------------------------------- /ImPortExcel/CWorkbooks.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CWorkbooks.h -------------------------------------------------------------------------------- /ImPortExcel/CWorksheet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CWorksheet.h -------------------------------------------------------------------------------- /ImPortExcel/CWorksheets.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/CWorksheets.h -------------------------------------------------------------------------------- /ImPortExcel/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/ConvertUtil.h -------------------------------------------------------------------------------- /ImPortExcel/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /ImPortExcel/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /ImPortExcel/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /ImPortExcel/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/GetInputUtil.cpp -------------------------------------------------------------------------------- /ImPortExcel/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /ImPortExcel/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /ImPortExcel/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /ImPortExcel/OpExcel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/OpExcel.cpp -------------------------------------------------------------------------------- /ImPortExcel/OpExcel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"CApplication.h" 3 | #include"CRange.h" 4 | #include"CRanges.h" 5 | #include"CWorkbook.h" 6 | #include"CWorkbooks.h" 7 | #include"CWorksheet.h" 8 | #include"CWorksheets.h" 9 | class COpExcel 10 | { 11 | public: 12 | COpExcel(); 13 | ~COpExcel(); 14 | public: 15 | static bool RunExcelApp(CApplication &excelApp, bool bVisible, bool bUserControl); 16 | static void NewWorkBook(CApplication &excelApp, CWorkbook &excelBook); 17 | static bool GetWorkSheet(CWorkbook &excelBook, int i, CWorksheet &excelSheet); 18 | static bool OpenWorkBook(CApplication &excelApp, const TCHAR* fileName, 19 | CWorkbook &excelBook, bool bIsReadOnly = true); 20 | static long GetRowCount(CWorksheet excelSheet); 21 | 22 | 23 | static bool SelectFileToOpen(const TCHAR *filedesc, const TCHAR * fileExtName, 24 | CString &selectedFile); 25 | private: 26 | /*CApplication ExcelApp; 27 | CRange Range; 28 | CWorkbook book; 29 | CWorkbooks books; 30 | CWorksheet sheet; 31 | CWorksheets sheets;*/ 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /ImPortExcel/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ImPortExcel.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ImPortExcel/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/SelectUtil.cpp -------------------------------------------------------------------------------- /ImPortExcel/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /ImPortExcel/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/StringUtil.cpp -------------------------------------------------------------------------------- /ImPortExcel/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/StringUtil.h -------------------------------------------------------------------------------- /ImPortExcel/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /ImPortExcel/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/TextFileUtil.h -------------------------------------------------------------------------------- /ImPortExcel/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/ImPortExcel/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /MouseMsg/MouseTest.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MouseMsg/MouseTest.h -------------------------------------------------------------------------------- /MouseMsg/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MouseMsg.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /MouseWheelMsg/RegMsg.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "RegMsg.h" 3 | 4 | static bool isReged = FALSE; 5 | extern BOOL func(MSG *msg); 6 | RegMsg::RegMsg() 7 | { 8 | } 9 | 10 | 11 | RegMsg::~RegMsg() 12 | { 13 | } 14 | 15 | void RegMsg::reg() 16 | { 17 | if (!isReged) { 18 | acutPrintf(L"\n reging...\n"); 19 | if (!acedRegisterFilterWinMsg(func)) { 20 | 21 | acutPrintf(L"\n reg failed\n"); 22 | 23 | } 24 | else{ 25 | 26 | acutPrintf(L"\n reg success\n"); 27 | isReged = TRUE; 28 | 29 | } 30 | } 31 | } 32 | 33 | void RegMsg::unReg() 34 | { 35 | if (isReged) { 36 | 37 | if (!acedRemoveFilterWinMsg(func)) { 38 | 39 | acutPrintf(L"\n unreg failed\n"); 40 | 41 | } 42 | else { 43 | 44 | acutPrintf(L"\n unreg success\n"); 45 | 46 | isReged = FALSE; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /MouseWheelMsg/RegMsg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class RegMsg 3 | { 4 | public: 5 | RegMsg(); 6 | ~RegMsg(); 7 | public: 8 | void reg(); 9 | void unReg(); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /MouseWheelMsg/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MouseWheelMsg.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /MouseWheelMsg/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MouseWheelMsg/SelectUtil.cpp -------------------------------------------------------------------------------- /MouseWheelMsg/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /MouseWheelMsg/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MouseWheelMsg/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/AlgoHelper.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/AlgoHelper.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/AlgoHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class AlgoHelper 3 | { 4 | public: 5 | AlgoHelper(); 6 | ~AlgoHelper(); 7 | static void Fillet(AcGePoint2d vertex, 8 | AcGeVector2d vec1, AcGeVector2d vec2, 9 | double radius, AcGePoint2d &pt1, AcGePoint2d &pt2); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /MultiDaoJiao/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/ConvertUtil.h -------------------------------------------------------------------------------- /MultiDaoJiao/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /MultiDaoJiao/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /MultiDaoJiao/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/GetInputUtil.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /MultiDaoJiao/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /MultiDaoJiao/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /MultiDaoJiao/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MultiDaoJiao.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /MultiDaoJiao/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/SelectUtil.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /MultiDaoJiao/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/StringUtil.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/StringUtil.h -------------------------------------------------------------------------------- /MultiDaoJiao/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /MultiDaoJiao/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/TextFileUtil.h -------------------------------------------------------------------------------- /MultiDaoJiao/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MultiDaoJiao/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /MultiDaoJiao/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /MyMenu/CAcadApplication.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadApplication.h -------------------------------------------------------------------------------- /MyMenu/CAcadDocument.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadDocument.h -------------------------------------------------------------------------------- /MyMenu/CAcadMenuBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadMenuBar.h -------------------------------------------------------------------------------- /MyMenu/CAcadMenuGroup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadMenuGroup.h -------------------------------------------------------------------------------- /MyMenu/CAcadMenuGroups.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadMenuGroups.h -------------------------------------------------------------------------------- /MyMenu/CAcadModelSpace.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadModelSpace.h -------------------------------------------------------------------------------- /MyMenu/CAcadPopupMenu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadPopupMenu.h -------------------------------------------------------------------------------- /MyMenu/CAcadPopupMenuItem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadPopupMenuItem.h -------------------------------------------------------------------------------- /MyMenu/CAcadPopupMenus.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadPopupMenus.h -------------------------------------------------------------------------------- /MyMenu/CAcadToolbar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadToolbar.h -------------------------------------------------------------------------------- /MyMenu/CAcadToolbarItem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadToolbarItem.h -------------------------------------------------------------------------------- /MyMenu/CAcadToolbars.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/CAcadToolbars.h -------------------------------------------------------------------------------- /MyMenu/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MyMenu.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /MyMenu/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /MyMenu/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /MyMenu2/x64/Debug/MyMenu2.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyMenu2/x64/Debug/MyMenu2.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /MyReactor/CMyDocReactor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyReactor/CMyDocReactor.cpp -------------------------------------------------------------------------------- /MyReactor/CMyEditorReactor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyReactor/CMyEditorReactor.cpp -------------------------------------------------------------------------------- /MyReactor/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MyReactor.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /MyReactor/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyReactor/SelectUtil.cpp -------------------------------------------------------------------------------- /MyReactor/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /MyReactor/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MyReactor/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /MyReactor/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /MySqlCon/ADOConn.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/ADOConn.cpp -------------------------------------------------------------------------------- /MySqlCon/ADOConn.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #import "c:\Program Files\Common Files\System\ado\msado15.dll" no_namespace \ 3 | rename("EOF", "adoEOF") rename("BOF", "adoBOF") 4 | class ADOConn 5 | { 6 | private: 7 | _ConnectionPtr m_pConnection; 8 | _RecordsetPtr m_pRecordset; 9 | public: 10 | ADOConn(void); 11 | ~ADOConn(void); 12 | void OnInitADOConn(void); 13 | void ExitConnect(void); 14 | _RecordsetPtr GetRecordSet(_bstr_t bstrSql); 15 | bool ExecuteSQL(_bstr_t bstrSql); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /MySqlCon/MySqlCon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/MySqlCon.cpp -------------------------------------------------------------------------------- /MySqlCon/MySqlCon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /MySqlCon/MySqlCon.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/MySqlCon.rc -------------------------------------------------------------------------------- /MySqlCon/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 控制台应用程序:MySqlCon 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 MySqlCon 应用程序。 6 | 7 | 本文件概要介绍组成 MySqlCon 应用程序的每个文件的内容。 8 | 9 | 10 | MySqlCon.vcxproj 11 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 12 | 13 | MySqlCon.vcxproj.filters 14 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 15 | 16 | MySqlCon.cpp 17 | 这是主应用程序源文件。 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | 应用程序向导创建了下列资源: 21 | 22 | MySqlCon.rc 23 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。 24 | 25 | Resource.h 26 | 这是标准头文件,可用于定义新的资源 ID。Microsoft Visual C++ 将读取并更新此文件。 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | 其他标准文件: 30 | 31 | StdAfx.h, StdAfx.cpp 32 | 这些文件用于生成名为 MySqlCon.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | 其他注释: 36 | 37 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 38 | 39 | ///////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /MySqlCon/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/Resource.h -------------------------------------------------------------------------------- /MySqlCon/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/stdafx.cpp -------------------------------------------------------------------------------- /MySqlCon/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/stdafx.h -------------------------------------------------------------------------------- /MySqlCon/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/MySqlCon/targetver.h -------------------------------------------------------------------------------- /PublishPrinter/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | https://www.cnblogs.com/edata/p/11015514.html 3 | https://adndevblog.typepad.com/autocad/2016/01/create-multi-sheet-pdf-from-arx-using-dsd.html -------------------------------------------------------------------------------- /PublishPrinter/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by PublishPrinter.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /PublishPrinter/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/PublishPrinter/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /QiangToLiang/QiangToLiang.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | //- QiangToLiang.cpp : Initialization functions 3 | //----------------------------------------------------------------------------- 4 | #include "StdAfx.h" 5 | #include "resource.h" 6 | #include 7 | 8 | //----------------------------------------------------------------------------- 9 | //- Define the sole extension module object. 10 | AC_IMPLEMENT_EXTENSION_MODULE(QiangToLiangDLL) 11 | //- Now you can use the CAcModuleResourceOverride class in 12 | //- your application to switch to the correct resource instance. 13 | //- Please see the ObjectARX Documentation for more details 14 | 15 | //----------------------------------------------------------------------------- 16 | //- DLL Entry Point 17 | extern "C" 18 | BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { 19 | //- Remove this if you use lpReserved 20 | UNREFERENCED_PARAMETER(lpReserved) ; 21 | 22 | if ( dwReason == DLL_PROCESS_ATTACH ) { 23 | _hdllInstance =hInstance ; 24 | QiangToLiangDLL.AttachInstance (hInstance) ; 25 | InitAcUiDLL () ; 26 | } else if ( dwReason == DLL_PROCESS_DETACH ) { 27 | QiangToLiangDLL.DetachInstance () ; 28 | } 29 | return (TRUE) ; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /QiangToLiang/QiangToLiang.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | F:\Autodesk2018\AutoCAD 2018\acad.exe 5 | /ld "E:\C-AutoCAD\x64\Debug\ECDQiangToLiang.arx" 6 | WindowsLocalDebugger 7 | 8 | -------------------------------------------------------------------------------- /QiangToLiang/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by QiangToLiang.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /QiangToLiang/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/QiangToLiang/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /QiangToLiang/acrxEntryPoint1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/QiangToLiang/acrxEntryPoint1.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # C-AutoCAD 2 | ObjectArx 学习 3 | -------------------------------------------------------------------------------- /Test2/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/ConvertUtil.h -------------------------------------------------------------------------------- /Test2/DrawRecJig.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/DrawRecJig.cpp -------------------------------------------------------------------------------- /Test2/DrawRecJig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "dbjig.h" 3 | class DrawRecJig : 4 | public AcEdJig 5 | { 6 | public: 7 | DrawRecJig(); 8 | ~DrawRecJig(); 9 | virtual DragStatus sampler(); 10 | virtual Adesk::Boolean update(); 11 | virtual AcDbEntity* entity() const; 12 | bool DoIt(AcGePoint3d &ptCenter,AcGeVector2d recVec2d,AcDbObjectId &plId); 13 | private: 14 | AcDbPolyline *pl; 15 | 16 | AcGePoint3d ptCenter; 17 | AcGePoint3d ptCurrent; 18 | AcGeVector2d recVec; 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /Test2/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /Test2/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /Test2/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /Test2/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/GetInputUtil.cpp -------------------------------------------------------------------------------- /Test2/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /Test2/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /Test2/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Test2/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Test2.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Test2/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/SelectUtil.cpp -------------------------------------------------------------------------------- /Test2/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /Test2/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/StringUtil.cpp -------------------------------------------------------------------------------- /Test2/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/StringUtil.h -------------------------------------------------------------------------------- /Test2/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /Test2/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/TextFileUtil.h -------------------------------------------------------------------------------- /Test2/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/Test2/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /Test2/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/ConvertUtil.h -------------------------------------------------------------------------------- /TongJiAndLieBiao/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /TongJiAndLieBiao/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/GetInputUtil.cpp -------------------------------------------------------------------------------- /TongJiAndLieBiao/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by TongJiAndLieBiao.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/SelectUtil.cpp -------------------------------------------------------------------------------- /TongJiAndLieBiao/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /TongJiAndLieBiao/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/StringUtil.cpp -------------------------------------------------------------------------------- /TongJiAndLieBiao/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/StringUtil.h -------------------------------------------------------------------------------- /TongJiAndLieBiao/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /TongJiAndLieBiao/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/TextFileUtil.h -------------------------------------------------------------------------------- /TongJiAndLieBiao/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiAndLieBiao/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /TongJiArea/ConvertUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/ConvertUtil.h -------------------------------------------------------------------------------- /TongJiArea/DwgDataBaseUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/DwgDataBaseUtil.cpp -------------------------------------------------------------------------------- /TongJiArea/DwgDataBaseUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CDwgDataBaseUtil 3 | { 4 | public: 5 | CDwgDataBaseUtil(); 6 | ~CDwgDataBaseUtil(); 7 | 8 | static AcDbObjectId CDwgDataBaseUtil::PostToModelSpace(AcDbEntity *pEnt, AcDbDatabase *pDb=acdbHostApplicationServices()->workingDatabase()); 9 | 10 | static AcDbObjectIdArray GetAllEntityIds(const TCHAR* layerName, AcDbDatabase *pDb); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /TongJiArea/GePointUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MathUtil.h" 3 | #include"ConvertUtil.h" 4 | class CGePointUtil 5 | { 6 | public: 7 | CGePointUtil(); 8 | ~CGePointUtil(); 9 | 10 | static AcGePoint3d CGePointUtil::GetMiddlePoint(AcGePoint3d pt1, AcGePoint3d pt2); 11 | static AcGePoint3d CGePointUtil::PolarPoint(const AcGePoint3d &basePt, double angle,double length); 12 | static AcGePoint3d RelativePoint(const AcGePoint3d & pt, double x, double y); 13 | static AcGePoint2d GetMiddlePoint(const AcGePoint2d & startPoint, const AcGePoint2d & endPoint); 14 | static AcGePoint2d PolarPoint(const AcGePoint2d & basePoint, double angle, double length); 15 | static bool IsEqual(const AcGePoint2d &firstPoint, const AcGePoint2d &secondPoint, double tol = 1.0E-7); 16 | static bool IsEqual(const AcGePoint3d &firstPoint, const AcGePoint3d &secondPoint, double tol = 1.0E-7); 17 | static int FindPoint(const AcGePoint3dArray &points, const AcGePoint3d &point, 18 | double tol = 1.0E-7); 19 | static int FindPoint(const AcGePoint2dArray &points, const AcGePoint2d &point, 20 | double tol = 1.0E-7); 21 | static void FilterEqualPoints(AcGePoint3dArray &points, double tol = 1.0E-7); 22 | static void FilterEqualPoints(AcGePoint3dArray &points, const AcGePoint2d &pt, 23 | double tol = 1.0E-7); 24 | 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /TongJiArea/GetInputUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/GetInputUtil.cpp -------------------------------------------------------------------------------- /TongJiArea/GetInputUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CGetInputUtil 3 | { 4 | public: 5 | CGetInputUtil(); 6 | ~CGetInputUtil(); 7 | static int GetPointReturnCode(const AcGePoint3d &basePoint, 8 | const TCHAR* prompt, AcGePoint3d &point); 9 | 10 | static int GetPointReturnCode(const TCHAR *prompt, AcGePoint3d &point); 11 | 12 | static bool GetPoint(const AcGePoint3d &basePoint, 13 | const TCHAR* prompt, AcGePoint3d &point); 14 | 15 | static bool GetPoint(const TCHAR *prompt, AcGePoint3d &point); 16 | 17 | static bool GetKeyword(const TCHAR *prompt, const TCHAR *keywords, 18 | const TCHAR *firstDefault, int defaultKeyIndex, int &nRet); 19 | 20 | static bool GetReal(const TCHAR *prompt, double defaulVal, int precision, 21 | double &ret); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /TongJiArea/MathUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "MathUtil.h" 3 | 4 | 5 | CMathUtil::CMathUtil() 6 | { 7 | } 8 | 9 | 10 | CMathUtil::~CMathUtil() 11 | { 12 | } 13 | 14 | double CMathUtil::PI() { 15 | return 3.14159265358979323846; 16 | } 17 | 18 | bool CMathUtil::IsEqual(double a, double b, double tol) 19 | { 20 | return fabs(a - b) < tol; 21 | } 22 | 23 | int CMathUtil::Round(double a) 24 | { 25 | return(int)(a + 0.5); 26 | } 27 | 28 | double CMathUtil::Round(double a, int precision) 29 | { 30 | return (floor(a*pow(10.0, precision) + 0.5) / pow(10.0, precision)); 31 | } 32 | 33 | int CMathUtil::GetRand(int minValue, int maxValue) 34 | { 35 | assert(maxValue - minValue); 36 | 37 | int value = rand(); 38 | int rc=minValue+(int)CMathUtil::Round(((double)value)/RAND_MAX* 39 | (maxValue - minValue)); 40 | return rc; 41 | } 42 | -------------------------------------------------------------------------------- /TongJiArea/MathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CMathUtil 3 | { 4 | public: 5 | CMathUtil(); 6 | ~CMathUtil(); 7 | //const double PI = std::atan(1.0)*4; 8 | static double CMathUtil::PI(); 9 | static bool IsEqual(double a, double b, double tol = 1.0E-7); 10 | static int Round(double a); 11 | static double Round(double a, int precision); 12 | static int GetRand(int minValue, int maxValue); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /TongJiArea/SelectUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/SelectUtil.cpp -------------------------------------------------------------------------------- /TongJiArea/SelectUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CSelectUtil 4 | { 5 | public: 6 | CSelectUtil(); 7 | ~CSelectUtil(); 8 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 9 | AcDbObjectIdArray &entIds); 10 | 11 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 12 | std::vector &classDescs, AcDbObjectIdArray &entIds); 13 | 14 | static bool PromptSelectEnts(const TCHAR *prompt, struct resbuf *rb, 15 | AcRxClass* &classDescs, AcDbObjectIdArray &entIds); 16 | 17 | static bool PromptSelectEntity(const TCHAR *prompt, 18 | std::vector &classDescs, AcDbEntity *&pEnt,AcGePoint3d &pickPoint, 19 | bool bOpenForWrite=true); 20 | 21 | static bool PromptSelectEntity(const TCHAR *prompt, 22 | AcRxClass *&classDescs, AcDbEntity *&pEnt, AcGePoint3d &pickPoint, 23 | bool bOpenForWrite = true); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /TongJiArea/StringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/StringUtil.cpp -------------------------------------------------------------------------------- /TongJiArea/StringUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/StringUtil.h -------------------------------------------------------------------------------- /TongJiArea/TextFileUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextFileUtil.h" 3 | 4 | 5 | CTextFileUtil::CTextFileUtil() 6 | { 7 | } 8 | 9 | 10 | CTextFileUtil::~CTextFileUtil() 11 | { 12 | } 13 | void CTextFileUtil::Save(const TCHAR* fileName, const std::vector &lines) 14 | { 15 | CStdioFile file(fileName, CFile::modeCreate | CFile::modeWrite | CFile::typeText); 16 | for (int i = 0; i < (int)lines.size(); i++) 17 | { 18 | file.WriteString(lines[i]); 19 | file.WriteString(TEXT("\n")); 20 | } 21 | file.Close(); 22 | } 23 | 24 | void CTextFileUtil::Load(const TCHAR* fileName, std::vector &lines) 25 | { 26 | lines.clear(); 27 | 28 | CStdioFile file(fileName, CFile::modeRead | CFile::typeText); 29 | CString strLine; 30 | while (file.ReadString(strLine)) 31 | { 32 | lines.push_back(strLine); 33 | } 34 | } -------------------------------------------------------------------------------- /TongJiArea/TextFileUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/TextFileUtil.h -------------------------------------------------------------------------------- /TongJiArea/TjAreaDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/TjAreaDlg.cpp -------------------------------------------------------------------------------- /TongJiArea/TjAreaDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/TjAreaDlg.h -------------------------------------------------------------------------------- /TongJiArea/TongJiArea.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/TongJiArea.aps -------------------------------------------------------------------------------- /TongJiArea/TongJiArea.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/TongJiArea.rc -------------------------------------------------------------------------------- /TongJiArea/crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /TongJiArea/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiArea/resource.h -------------------------------------------------------------------------------- /TongJiKuai/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by TongJiKuai.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 32768 13 | #define _APS_NEXT_CONTROL_VALUE 100 14 | #define _APS_NEXT_SYMED_VALUE 102 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /TongJiKuai/acrxEntryPoint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/TongJiKuai/acrxEntryPoint.cpp -------------------------------------------------------------------------------- /crx.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | <_ProjectFileVersion>10.0.30306.1 8 | <_PropertySheetDisplayName>Crx settings 9 | .crx 10 | 11 | 12 | 13 | accore.lib;%(AdditionalDependencies) 14 | 15 | 16 | -------------------------------------------------------------------------------- /qrencode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 静态库:qrencode 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 qrencode 库项目。 6 | 7 | 本文件概要介绍组成 qrencode 应用程序的每个文件的内容。 8 | 9 | 10 | qrencode.vcxproj 11 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 12 | 13 | qrencode.vcxproj.filters 14 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 15 | 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | 19 | StdAfx.h, StdAfx.cpp 20 | 这些文件用于生成名为 qrencode.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | 其他注释: 24 | 25 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /qrencode/rsecc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * qrencode - QR Code encoder 3 | * 4 | * Reed solomon error correction code encoder specialized for QR code. 5 | * This code is rewritten by Kentaro Fukuchi, referring to the FEC library 6 | * developed by Phil Karn (KA9Q). 7 | * 8 | * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q 9 | * Copyright (C) 2014-2017 Kentaro Fukuchi 10 | * 11 | * This library is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or any later version. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public 22 | * License along with this library; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 | */ 25 | 26 | #ifndef RSECC_H 27 | #define RSECC_H 28 | 29 | extern int RSECC_encode(size_t data_length, size_t ecc_length, const unsigned char *data, unsigned char *ecc); 30 | 31 | #endif /* RSECC_H */ 32 | -------------------------------------------------------------------------------- /qrencode/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/qrencode/stdafx.cpp -------------------------------------------------------------------------------- /qrencode/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/qrencode/stdafx.h -------------------------------------------------------------------------------- /qrencode/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QLLLll/C-AutoCAD/aa076459aae0c0eab70aee8f55569896fca618e5/qrencode/targetver.h --------------------------------------------------------------------------------