明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2071|回复: 6

请教:如何在VB程序内得到用户在CAD命令行敲入的字符串?

[复制链接]
发表于 2003-2-26 13:11 | 显示全部楼层 |阅读模式
我希望在程序中得到用户输入的字符串,根据内容转入不同的处理函数
发表于 2003-2-26 19:20 | 显示全部楼层

用GetKeyword方法来获取用户输入的字符串,然后处理

发表于 2003-2-26 19:21 | 显示全部楼层

具体内容请查看二次开发栏目的文章

http://www.mjtd.com/a2/list.asp?id=72
 楼主| 发表于 2003-2-27 12:24 | 显示全部楼层

先谢谢斑竹,我的意思由cad触发命令行键入事件,由VB程序捕捉。

发表于 2003-2-27 12:41 | 显示全部楼层

private withevents Thisdrawing as acaddocument

 楼主| 发表于 2003-2-27 14:06 | 显示全部楼层

我需要捕捉的是用户键入的字符串,根据他调用相应的函数

发表于 2003-2-28 14:44 | 显示全部楼层

如果你在命令行输入:hello,thisdrawing就会产生一个事件,例如:

(defun c:hello()
(princ))
Private Sub AcadDocument_BeginLisp(ByVal FirstLine As String)
if ucase(firstline)=ucase("(c:hello)") then
   'do something
endif
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-3 15:27 , Processed in 1.371988 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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