乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 55|回复: 4

acedCommand在按扭事件中无法执行

[复制链接]

2

主题

3

帖子

1

银币

初来乍到

Rank: 1

铜币
11
发表于 2007-1-4 15:20:00 | 显示全部楼层 |阅读模式
acedCommand(...,"open",0),直接在一个ARX命令函数中可以执行,但如果是在 窗口上的一个button的onclick事件中执行该代码,则无法运行(模式和无模式窗口都不行,用的是CDialog)
回复

使用道具 举报

0

主题

6

帖子

2

银币

初来乍到

Rank: 1

铜币
6
发表于 2007-1-12 11:02:00 | 显示全部楼层
是你自己的问题,
setFocus转换焦点
回复

使用道具 举报

2

主题

54

帖子

3

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
62
发表于 2007-1-13 10:44:00 | 显示全部楼层
文档中有介绍:
Avoiding Problems with NEW and OPEN
To avoid loss of synchronization between the AutoCAD and ARX communication interface, do not pass acedCommand() or acedCmd() NEW or OPEN. Instead, pass a script that executes NEW and OPEN, answers the prompts, and calls a function in the ARX application to return control to the ARX application.
就是说无论如何acedCommand也不能用以OPEN和NEW命令
回复

使用道具 举报

0

主题

35

帖子

2

银币

初来乍到

Rank: 1

铜币
35
发表于 2007-1-17 13:10:00 | 显示全部楼层
acedGetAcadWinApp()->OpenDocumentFile( filename );
试试看上面代码,可以和open命令一样的。
回复

使用道具 举报

0

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
2
发表于 2007-3-7 08:42:00 | 显示全部楼层
用acDocManager->sendStringToExecute()函数执行
如:
acDocManager->sendStringToExecute(acDocManager->curDocument(),
  "line 0,0 1,1 \n",false, true);
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-5 22:54 , Processed in 0.152264 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表