查看单个帖子
旧 2009-04-20, 05:48 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】为什么不能运行command

为什么不能运行command
www.dimcax.com
为什么不能运行command
,
using system;
using autodesk.autocad.runtime;
using cooperationtool;
//[assembly: commandclass(typeof(cooploader.coopcommands))]
[assembly: extensionapplication(typeof(cooploader.coopcommands))]
namespace cooploader
{
/// <summary>
/// summary description for coopcommands.
/// </summary>
public class coopcommands : iextensionapplication
{
projectdesign m_design = null;
public coopcommands()
{
//
// todo: add constructor logic here
//
}
public void initialize()
{
m_design = new projectdesign();
m_design.run();
}
public void terminate()
{
m_design.close();
}
// define command "asdkcmd1"
[commandmethod("test")]
public void test() // this method can have any name
{
// put your command code here
}
}
}
当load 这个dll时,initialize是执行了的,但我输入test运行时,提示我没有这个命令,请问这是为什么,我看到很多代码都这样写的,按道理是可以执行test命令的啊,请各位指教。
你换台机器试试,偶印象中也遇到过类似的情况,在公司的机器上运行正常的代码,到家里就提示“没有这个命令”,有时却一切正常。
偶目前也没有找到原因。。。。
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)