ToggleExtension(bool enable, string extName) { if (extName != null) { if (enable) { PyRevitExtensions.EnableExtension(extName); } else { PyRevitExtensions.DisableExtension(extName); } } }