明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 王咣生

ObjectARX工作日志

    [复制链接]
 楼主| 发表于 2004-11-12 22:21 | 显示全部楼层

回复

要在VC6.0下编译,在AutoCAD2000,2002下运行.


我没有装VC6.0,


编译成功未必能运行,没有AutoCAD2002(2000)怎么测试结果呢?
发表于 2004-11-13 10:17 | 显示全部楼层
我来帮你测试结果!
 楼主| 发表于 2004-11-13 11:30 | 显示全部楼层
本帖最后由 作者 于 2004-11-13 14:52:25 编辑

王咣生发表于2004-11-12 12:13:00回复:(王咣生)回复为什么? 你自己为什么不编译? 还要我下载ObjectARX2000,再为你编译我提供给你的代码? 我这里没有AutoCAD2002.

我没有装VC6.0, 哪位大侠有时间帮zcsoft编译吧!
 楼主| 发表于 2004-11-27 17:18 | 显示全部楼层

回复

创建文字样式的一段例子: static void setTextStyle_test(void)
{
// Add your code for command setTextStyle._test here
Acad::ErrorStatus es;
AcDbTextStyleTable *pTsTable; es = curDoc()->database()->getSymbolTable(pTsTable,AcDb::kForRead);
if (es != Acad::eOk)
{
AfxMessageBox("Couldn't get the text style table.");
} CString theFont = "宋体"; if (!pTsTable->has((LPTSTR)(LPCSTR)theFont))
{
AcDbTextStyleTableRecord *pStyle = new AcDbTextStyleTableRecord; pStyle->setFont((LPTSTR)(LPCTSTR)theFont,Adesk::kFalse,Adesk::kFalse,0,34);
pStyle->setFileName(theFont);
pStyle->setBigFontFileName(theFont); pStyle->setTextSize(8);
pStyle->setXScale(2);
pStyle->setObliquingAngle(0);
pStyle->setName(theFont);
pStyle->setIsShapeFile(Adesk::kFalse);
pStyle->setIsVertical(Adesk::kFalse); pTsTable->upgradeOpen();
es = pTsTable->add(pStyle);
if (es != Acad::eOk)
{
CString message;
message.Format("%d",es);
AfxMessageBox(message);
}
pStyle->close();
}
// Get the style record we just created, to ensure that it was
// added properly to the style table.
AcDbObjectId styleId; es = pTsTable->getAt(theFont,styleId);
if (es != Acad::eOk)
{
CString message;
message.Format("%d",es);
AfxMessageBox(message);
}
else
{
AfxMessageBox("Got the style!");
} pTsTable->close(); AcDbText * text = new AcDbText(AcGePoint3d(10,10,0),"你好",styleId,10,0);
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable,AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
pBlockTable->close();
AcDbObjectId textId;
es = pBlockTableRecord->appendAcDbEntity(textId,text);

text->close();
pBlockTableRecord->close();
} 如图:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2005-1-8 21:55 | 显示全部楼层
王斑竹,我原来用lisp现在想学ARX,本人严重支持你的论坛,希望能和你的论坛一起成长……
 楼主| 发表于 2005-1-11 13:06 | 显示全部楼层
最近没有做论坛, 想交流就到这里吧: www.mjtd.com/bbs www.cadhelp.net/bbs
 楼主| 发表于 2005-1-20 17:50 | 显示全部楼层

TabbedViews管理Drawings文档

TabbedViews管理Drawings文档:


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2005-1-24 18:05 | 显示全部楼层
大哥能给我一份吗?


beetle_928@eyou.com
发表于 2005-1-26 10:47 | 显示全部楼层
太可怕了,我要学习!!!!!!!!!!
 楼主| 发表于 2005-1-27 17:47 | 显示全部楼层

回复

还没时间整理代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-20 09:59 , Processed in 4.147175 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表