明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1736|回复: 4

怎样用vb开发即时命令

[复制链接]
发表于 2009-9-28 22:53:00 | 显示全部楼层 |阅读模式
   各位高手,请教vba或者.net能开发出向CAD内部命令一样使用的命令么?想学习一下cad二次开发,还没有想好学哪个,请大侠不吝赐教,谢谢。
发表于 2009-9-28 23:05:00 | 显示全部楼层

vba是不能直接实现的,必须借助Lisp

.NetApi没问题

如果有VB的基础,不如直接学VB.Net或C#

 楼主| 发表于 2009-10-28 23:06:00 | 显示全部楼层

谢谢飞狐兄,前段时间比较忙,一直没有来,我对vb还是比较熟悉,vba经常用,现在正准备抽取时间学习。net

发表于 2010-6-8 09:37:00 | 显示全部楼层
呵呵,我还提问说能不能利用VBA编写内部命令呢,看来不行啊,但是我想能否用VBA调用LISP的语句写一个命令,达到lisp的效果呢,请赐教
发表于 2010-6-28 17:11:00 | 显示全部楼层

选择用

Sends a command string from a VB or VBA application to the document for processing

Use a space or the ASCII carriage return character (vbCr) at the end of the command string to end the command; this is equivalent to pressing ENTER on the keyboard.

This method processes any AutoCAD command-line function, including LISP expressions.

If the drawing specified is not active, it will be made active.

This method is generally synchronous. However, if the command sent with this method requires any user interaction (such as picking a point on the screen) then this method will continue as soon as the user input begins. The command will then continue to be processed asynchronously.

When this method is called from an event handler it is processed asynchronously.

You should never use this method to issue a command for which there is an ActiveX method available. For example, do not use SendCommand "VBALOAD ". Instead, use the LoadDVB method.

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

本版积分规则

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

GMT+8, 2024-11-25 23:33 , Processed in 0.156611 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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