找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 459|回复: 2

[讨论]:在objectARX 中有没有与VBA相对应的函数?

[复制链接]
发表于 2004-4-15 12:23:05 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
在objectARX 中有没有与VBA相对应的函数?
例如: VBA中
Set pl = ThisDrawing.ModelSpace.AddLightWeightPolyline(pt)
在objectARX 中有没有与之相对应的函数?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2004-4-15 21:19:06 | 显示全部楼层
VBA启动ACAD的自动化模型,找到模型空间,在pt位置创建AcDbPolyline,然后将它加入到模型空间中。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 145个

财富等级: 日进斗金

发表于 2004-4-15 21:34:29 | 显示全部楼层

Re: [讨论]:在objectARX 中有没有与VBA相对应的函数?

最初由 fundoll 发布
[B]在objectARX 中有没有与VBA相对应的函数?
例如: VBA中
Set pl = ThisDrawing.ModelSpace.AddLightWeightPolyline(pt)
在objectARX 中有没有与之相对应的函数? [/B]


任何二次开发工具,最终都是通过ARX来实现的,ARX是最底层接口,所以只能有VBA没有的,不会有ARX没有的。

你可以查看联机帮助,索引里面输入setLineWeight就可以看到了。凡是派生自AcDbEntity 的子类,都可以用。

[field]
AcDbEntity::setLineWeight Function virtual Acad::ErrorStatus

setLineWeight(

AcDb::LineWeight newVal,

Adesk::Boolean doSubents = true);

newVal Input AcDb::LineWeight for the entity
doSubents Input to apply the lineweight change to subentities

This method sets the entity to use lineweight. If the entity owns subentities
and doSubents == Adesk::kTrue, then the line weight change will be
applied to the subentities as well.

Returns Acad::eOk if successful.

Function implementation in derived classes

If this function is overridden and wishes to set the line weight of the entity,

then it must call AcDbEntity::setLineWeight() passing on the lineweight
and doSubents arguments.

It is also possible for this function's implementation to deal directly with any
subentities and pass a doSubents value of Adesk::kFalse to AcDbEntity:: setLineWeight().

If the line weight setting operation is successful, then this function should

return Acad::eOk. If lineweight is not an acceptable value, then this
function should return Acad::eInvalidInput. Any other error return values
are up to the implementor.
[/field]
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-21 15:38 , Processed in 0.174802 second(s), 36 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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