ToggleExtension(bool enable, string cloneName, string extName)
        {
            if (extName != null)
            {
                PyRevitClone clone = null;
                if (cloneName != null)
                {
                    clone = PyRevitClones.GetRegisteredClone(cloneName);
                }

                if (enable)
                {
                    if (clone != null)
                    {
                        PyRevitExtensions.EnableShippedExtension(clone, extName);
                    }
                    else
                    {
                        PyRevitExtensions.EnableInstalledExtension(extName);
                    }
                }
                else
                {
                    if (clone != null)
                    {
                        PyRevitExtensions.DisableShippedExtension(clone, extName);
                    }
                    else
                    {
                        PyRevitExtensions.DisableInstalledExtension(extName);
                    }
                }
            }
        }