为什么不能运行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命令的啊,请各位指教。
你换台机器试试,偶印象中也遇到过类似的情况,在公司的机器上运行正常的代码,到家里就提示“没有这个命令”,有时却一切正常。
偶目前也没有找到原因。。。。