Search code examples
c#.netautocadautocad-pluginobjectarx

getting input on netloading assembly...?


i have developed an autocad plugin where i have hard coded some parameters that should be provided by the user.... I want the user to be able to provide the values of parameters right after he run the NETLOAD command in autocad and loads the assembly file.... So in short what i want is to get the user input before he runs the command that i have defined in the plugin code.

i have looked over the internet and found out that i can get user input by using editor class... but the my problems remains as it gets user input after running the command....

Thank you for you time.. I really appreciate it if u can help me with that...

Thank you :)


Solution

  • If you use Autocad .Net wizard to start coding. It will automatically create two classes.. .MyCommands class and MyPlugin class which is similar to this https://github.com/ADN-DevTech/AutoCAD-Net-Wizards/blob/master/AutoCAD%20CSharp%20plug-in/myPlugin.cs

    The code you write inside MyPlugin.cs will be excuted once NETLOAD has loaded the assembly

    public class MyPlugin : IExtensionApplication
    {
        void IExtensionApplication.Initialize()
        {
             //Your code goes here
        }
    }