public Result OnStartup(UIControlledApplication application) { RvtWindow = null; // no dialog needed yet; the command will bring it This = this; // static access to this application instance return Result.Succeeded; }