CAD向控件注册一个命令(com接口VB语言)
2020-12-13 01:38
                         标签:com接口   执行   ber   col   参数   ddl   fun   mtab   rcu    主要用到函数说明:   
    MxDrawXCustomFunction::Mx_RegistUserCustomCommand
 
     
    向控件注册一个命令,用户在命令行输入命令名这个字符串,就会触发执行命令事件 命令事件的id就是该注册时的id值,详细说明如下:
 
     
                    CString sCommandName
                 
                    命令名称
                 
                    LONG lId
                 
                    命令id
                 
     
    VB代码实现如下:
 
     CAD向控件注册一个命令(com接口VB语言) 标签:com接口   执行   ber   col   参数   ddl   fun   mtab   rcu    原文地址:https://www.cnblogs.com/yzy0224/p/11003398.html
 
                参数
             
                说明
             
        
 
 
 
        
 
 
 
        
 
 
 
Set param2 = New MxDrawXLib.MxDrawResbufparam2.AddString "testcommand", -10
param2.AddLong 55, -10MxDrawX1.CallEx "Mx_RegistUserCustomCommand", param2
‘或者MxDrawX1.Call "Mx_RegistUserCustomCommand", "(""testcommand"",55)"
文章标题:CAD向控件注册一个命令(com接口VB语言)
文章链接:http://soscw.com/index.php/essay/23946.html