How to make the plug-in commands not available in .NET

<?xml encoding=”UTF-8″>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);
}

Comments

2 responses to “How to make the plug-in commands not available in .NET”

  1. Thanks for the infomation

  2. Sun Son Avatar
    Sun Son

    Dear Sir,
    I have just signed for ADN membership and I would like to be a ACAD.net api developer using
    ACAD.net API.
    I am very beginner for the both the Visual basic 2010 express and the Autocad.net api,
    when I try with “My first plug-in” the “Autocad plug-in” is not appear after I clicked
    New project – Visual Basic in the Installed Templates in both the Visual basic 2010 express
    and Visual studio 2015 express which are just downloaded and tried respectively,
    it means those are never used with autocad 2014 installed in my computer.
    Which work should I do first and which files do I need?
    Any material for the plug-in you recommend?
    Your kind instruction would be highly appreciated.
    Thanks and Regards,
    Sun, Son from Seoul, Korea
    My E-mail : sonsun@sunyang.co.kr

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading