摘要: 与cad里执行REGION命令相似 具体的实现: void ZffCHAP2AddRegion() { // 使用选择集,提示用户选择作为面域边界的对象 ads_name ss; int rt = acedSSGet(NULL, NULL, NULL, NULL, ss); // 提示用户 选择对象 阅读全文
posted @ 2020-03-01 23:20 中国膜结构网mjgou 阅读(706) 评论(0) 推荐(0)
摘要: ObjectARX学习笔记(二十二)--如何获取模型空间中最小点和最大点 AcGePoint3d ptMax = acdbHostApplicationServices()->workingDatabase()->extmax(); //右上角点 AcGePoint3d ptMin = acdbHo 阅读全文
posted @ 2020-03-01 22:59 中国膜结构网mjgou 阅读(598) 评论(0) 推荐(0)
摘要: <pre name="code" class="cpp"><pre name="code" class="cpp">// Copyright (C) 1998-2007 by Autodesk, Inc. // // Permission to use, copy, modify, and dist 阅读全文
posted @ 2020-03-01 22:57 中国膜结构网mjgou 阅读(798) 评论(0) 推荐(1)
摘要: <pre name="code" class="cpp">Acad::ErrorStatus insert( const AcGeMatrix3d& xform, AcDbDatabase* pDb, bool preserveSourceDatabase = true);ParametersPar 阅读全文
posted @ 2020-03-01 22:55 中国膜结构网mjgou 阅读(691) 评论(0) 推荐(0)
摘要: AcGeLineSeg3d acGeLineSegtmp1(AcGePoint3d(0,0,0),AcGePoint3d(100,0,0)); AcGeLineSeg3d acGeLineSegtmp2(AcGePoint3d(10,0,0),AcGePoint3d(90,0,0)); AcGeTo 阅读全文
posted @ 2020-03-01 22:54 中国膜结构网mjgou 阅读(678) 评论(0) 推荐(0)
摘要: <pre name="code" class="cpp">AcDbDatabase *pDataBase = NULL; pDataBase = acdbCurDwg(); //根据需要传入不同AcDbDatabase 就可以做到不同dwg克隆实体 Acad::ErrorStatus es = Ac 阅读全文
posted @ 2020-03-01 22:52 中国膜结构网mjgou 阅读(998) 评论(0) 推荐(0)
摘要: AcApDocManager* pDocManager = acDocManager; if (pDocManager == NULL) return FALSE; AcApDocumentIterator* iter = acDocManager->newAcApDocumentIterator( 阅读全文
posted @ 2020-03-01 22:51 中国膜结构网mjgou 阅读(444) 评论(0) 推荐(0)
摘要: // (C) Copyright 1996-2008 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpos 阅读全文
posted @ 2020-03-01 22:49 中国膜结构网mjgou 阅读(648) 评论(0) 推荐(0)
摘要: 如何获得程序路径struct resbuf rb; char sTemp[1024],*str; ads_getvar("acadprefix",&rb); strcpy(sTemp,rb.resval.string); acad_free(rb.resval.rstring); str=strch 阅读全文
posted @ 2020-03-01 22:48 中国膜结构网mjgou 阅读(971) 评论(0) 推荐(0)
摘要: CWnd *wTextCmdLine = acedGetAcadTextCmdLine(); if (wTextCmdLine != NULL) { ::EnumChildWindows(wTextCmdLine->m_hWnd,EnumChildProc,0); } BOOL CALLBACK E 阅读全文
posted @ 2020-03-01 22:47 中国膜结构网mjgou 阅读(379) 评论(0) 推荐(0)
摘要: CWnd *wTextCmdLine = acedGetAcadTextCmdLine(); if (wTextCmdLine != NULL) { ::EnumChildWindows(wTextCmdLine->m_hWnd,EnumChildProc,0); } BOOL CALLBACK E 阅读全文
posted @ 2020-03-01 22:45 中国膜结构网mjgou 阅读(375) 评论(0) 推荐(0)
摘要: Acad::ErrorStatus getSysVar(LPCTSTR varName, AcGePoint3d& val) { resbuf rb; if (acedGetVar(varName, &rb) == RTNORM) { ASSERT(rb.restype == RT3DPOINT); 阅读全文
posted @ 2020-03-01 22:43 中国膜结构网mjgou 阅读(372) 评论(0) 推荐(0)
摘要: CWnd* pWnd = acedGetAcadDockCmdLine()->GetParent()->GetParent()->GetParent();if(pWnd != NULL){CControlBar* pControlBar = static_cast<CControlBar*>(pWn 阅读全文
posted @ 2020-03-01 22:41 中国膜结构网mjgou 阅读(373) 评论(0) 推荐(0)
摘要: CMapSegType2IdAry::const_iterator iter; // 现在组 未保存iter = m_mapSeg2Groups.begin();for (iter; iter != m_mapSeg2Groups.end(); ++iter){const AcDbObjectIdA 阅读全文
posted @ 2020-03-01 22:40 中国膜结构网mjgou 阅读(342) 评论(0) 推荐(0)
摘要: 1.使用string必须添加头文件 #include"string"using namespace std; 2.使用CString必须添加头文件(在非MFC工程中) #include"afx.h"注意:当出现#error : Building MFC application with /MD[d] 阅读全文
posted @ 2020-03-01 22:37 中国膜结构网mjgou 阅读(150) 评论(0) 推荐(0)
摘要: 导出图层的实现: static void qxzyOperateLayer_ExportLayer(void) { CStdioFile f; CFileException e; char *pFileName = "C:\\layers.txt"; if(!f.Open((LPCTSTR)pFil 阅读全文
posted @ 2020-03-01 22:36 中国膜结构网mjgou 阅读(406) 评论(0) 推荐(0)
摘要: 1、创建一个工具类CTool。 Tool.h: static ads_real GetWidth();static int GetColorIndex(); Tool.cppads_real CTool::GetWidth(){ ads_real width = 0; if(acedGetReal( 阅读全文
posted @ 2020-03-01 22:35 中国膜结构网mjgou 阅读(563) 评论(0) 推荐(0)
摘要: ObjectArx中实现文件选择的代码如下: static void qxzyGetFileD_SelectFile(void) { // Add your code for command qxzyGetFileD._SelectFile here const ACHAR* title = L"选 阅读全文
posted @ 2020-03-01 22:33 中国膜结构网mjgou 阅读(750) 评论(0) 推荐(0)
摘要: // // acrxEntryPoint.h// #include "StdAfx.h"#include "resource.h"#include "dbsymtb.h" // #define szRDS _RXST("qxzy") // // ObjectARX EntryPointclass C 阅读全文
posted @ 2020-03-01 22:31 中国膜结构网mjgou 阅读(367) 评论(0) 推荐(0)
摘要: 实现代码: static void qxzyAddDimStyle_AddDimStyle(void) { ACHAR styleName[50]; if(acedGetString(Adesk::kFalse, _T("请输入样式名称:"), styleName) != RTNORM) { ret 阅读全文
posted @ 2020-03-01 22:30 中国膜结构网mjgou 阅读(500) 评论(0) 推荐(0)
摘要: 一、本节课程C++ ARX二次开发-MFC 非模态对话框modaless dialog yunyou.ke.qq.com 二、本节要讲解的知识点显示一个非模态对话框的步骤和代码编写。 三、具体内容1、思路: 显示一个非模式对话框: yunyou.ke.qq.com pDialog=new CModa 阅读全文
posted @ 2020-03-01 22:28 中国膜结构网mjgou 阅读(872) 评论(0) 推荐(0)
摘要: 二、本节课程C++ ARX二次开发-创建三维实体 二、本节要讲解的知识点1、arx提供的三类创建三维实体的方法:创建标准形状的实体、拉伸面域创建实体、旋转面域创建实体的例子。 2、布尔运算的使用例子。 三、具体内容1、思路:AcDb3dSolid类,提供一个不包含任何参数的构造函数,用来创建一个“空 阅读全文
posted @ 2020-03-01 22:23 中国膜结构网mjgou 阅读(982) 评论(0) 推荐(0)
摘要: 一、本节课程C++ ARX二次开发-BREP库 二、本节要讲解的知识点通过两个命令来演示BREP库的使用:获取圆柱体中圆柱面的特征参数;获取任何三维实体的边的采样曲线。 三、具体内容1、思路:组合体(Complex)、壳(Shell)、面(Face)、边(Edge)和顶点(Vertex)都是BREP 阅读全文
posted @ 2020-03-01 22:22 中国膜结构网mjgou 阅读(647) 评论(0) 推荐(0)
摘要: ObjectARX完美实现一次拖动多个实体(上) 我们知道,在ObjectARX中可以通过派生AcEdJig类来实现拖动过程。通常派生一个AcEdJig类必须重载以下三个成员函数: AcEdJig::sampler(),它获取几何值(角度、距离、点等) AcEdJig::update(),它分析几何 阅读全文
posted @ 2020-03-01 22:16 中国膜结构网mjgou 阅读(2213) 评论(1) 推荐(1)
摘要: ObjectARX 1. ObjectARX的介绍: ObjectARX是AutoDesk公司针对AutoCAD平台上的二次开发而推出的一个开发软件包,它提供了以C++为基础的面向对象的开发环境及应用程序接口,能真正快速的访问AutoCAD图形数据库。 与以往的 AutuCAD 二次开发工具 Aut 阅读全文
posted @ 2020-03-01 22:12 中国膜结构网mjgou 阅读(1207) 评论(0) 推荐(0)
摘要: //获得要插入的块名CString blockname;m_listctrl.GetLBText(m_listctrl.GetCurSel(),blockname); //blockname = "CHART-20"; //寻找是否已经定义AcDbDatabase *pCurDb = acdbHos 阅读全文
posted @ 2020-03-01 22:04 中国膜结构网mjgou 阅读(1172) 评论(0) 推荐(0)
摘要: ////////////////////创建窗体图层"Window_Layer"/////////////////AcDbObjectIdcreateWindowsLayer(){//打开层表,打开方式为只写///AcDbLayerTable *pLayerTable;acdbHostApplica 阅读全文
posted @ 2020-03-01 22:01 中国膜结构网mjgou 阅读(500) 评论(0) 推荐(0)
摘要: ARX对象的一些文字说明2008-06-02 10:16节选于《AutoCAD高级开发技术:ARX编程及应用》 一.图块设计技术: 在AutoCAD数据库中,以各图块实际上市存储在块表记录里的实体集合。每个图块从一格AcDbBlockBegin对象开始,紧接着是一个或多个AcDbEntity对象,最 阅读全文
posted @ 2020-03-01 21:59 中国膜结构网mjgou 阅读(515) 评论(0) 推荐(0)
摘要: ARX編程概述2008-05-29 08:53一.图块设计技术:在AutoCAD数据库中,以各图块实际上市存储在块表记录里的实体集合。每个图块从一格AcDbBlockBegin对象开始,紧接着是一个或多 个AcDbEntity对象,最后以AcDbBolckEnd对象结束,按其所属关系得层次结构分为三 阅读全文
posted @ 2020-03-01 21:57 中国膜结构网mjgou 阅读(577) 评论(0) 推荐(0)
摘要: CAD ObjectARX扩展工具的源码(三)//得到文本边界oid CDrawFunction::getTextBoundary(AcDbObjectId objectId,double offset,AcDbObjectId &textBoundaryId){AcDbExtents Ext;Ac 阅读全文
posted @ 2020-03-01 21:56 中国膜结构网mjgou 阅读(574) 评论(0) 推荐(0)
摘要: CAD ObjectARX扩展工具的源码(二) //AcDbObjectId CDrawFunction::createtextAll(AcGePoint3d pt,char *text,AcDb::TextHorzMode hMode,AcDb::TextertMode Mode,double h 阅读全文
posted @ 2020-03-01 21:54 中国膜结构网mjgou 阅读(457) 评论(0) 推荐(0)
摘要: CAD ObjectARX扩展工具的源码(一)收藏的CAD扩展工具的源码: Acad::ErrorStatus CDrawFunction::getAllEntity(AcDbDatabase *pDb,AcDbObjectIdArray& IdArr,const AcArray& layerNam 阅读全文
posted @ 2020-03-01 21:53 中国膜结构网mjgou 阅读(702) 评论(0) 推荐(0)
摘要: ObjectARX常用类和函数 (1)AcAx 开头的全局函数:这些函数通过 COM 的方式来让AutoCAD 完成一些操作。 (a) acutPrintf函数:在 AutoCAD 命令行显示指定的字符串 acutPrintf函数的具体用法如例: acutPrintf("\n输入不合法,请重新输入" 阅读全文
posted @ 2020-03-01 21:27 中国膜结构网mjgou 阅读(4655) 评论(0) 推荐(0)
摘要: 从今天起我陆续贴给大家:AcApLayoutManager 类处理和访问AcDbLayout对象的应用程序特定程序的接口类。这个类也控制着与GUI属性相关的Layout(布局)。继承自AcDbLayoutManager包含文件acaplmgr.h参见AcDbLayout, AcDbLayoutMan 阅读全文
posted @ 2020-03-01 16:52 中国膜结构网mjgou 阅读(1145) 评论(0) 推荐(0)
摘要: ARX错误1 LINK : fatal error LNK1104: 无法打开文件“D:\win10\Desktop\123\x64\Debug\xxx.arx” 有可能没有关闭CAD,文件被cad占用了。 阅读全文
posted @ 2020-03-01 10:57 中国膜结构网mjgou 阅读(245) 评论(0) 推荐(0)