By Virupaksha Aithal
Question: Recently I received a question on how to avoid exposing commands in the custom plug-in when the license verification fails.
Answer: One of the procedure to achieve this requirement is to do license verification in IExtensionApplication.Initialize() and throwing an exception if license verification fails. After throwing exception, none of the commands in plug-in will be available for the user.
void IExtensionApplication.Initialize()
{
//your check...
//throw LoadFailed error...
throw new Autodesk.AutoCAD.Runtime.Exception(
Autodesk.AutoCAD.Runtime.ErrorStatus.LoadFailed);
}
http://adndevblog.typepad.com/autocad/2016/05/how-to ... mands-not-available-in-net-.html
[本日志由 tiancao1001 于 2018-07-13 11:19 PM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |