...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Document activeDocument = docManager.MdiActiveDocument; Editor ed = activeDocument.Editor; PromptIntegerOptions op = new PromptIntegerOptions("Input a positive integer"); op.AllowNegative = false; PromptIntegerResult res =(PromptIntegerResult) ed.DoPrompt(op); if( res.Status == PromptStatus.OK) { int retVal = res.Value; } |
Creating .NET Extension Application
.NETExtension Application allow user to run their code while loading the plugin.i.e when plugin is loaded it want to add some entries in Ribbon or want to show some UI palatte in ARES Commander then creating the extension application is the right choice. But it is optional and totally depend upon the requirement.
To make Plugin as Extension Application one has add a class into project and this class has to implement IExtensionApplication interface and each plugin can have only one class of such type.
public void Initialize() get called when this plugin loaded via NETLOAD command and Terminate one this plugin unloaded by the System.