Ejemplo n.º 1
0
        BuildImage(string cloneName, string configFile, string imageFilePath)
        {
            if (configFile == null || configFile == string.Empty)
            {
                throw new pyRevitException("Config file must be specified.");
            }
            else
            {
                var paths = File.ReadAllLines(configFile);

                var destPath = Path.GetDirectoryName(imageFilePath);
                if (!CommonUtils.VerifyPath(destPath))
                {
                    throw new pyRevitException(
                              string.Format("Destination path does not exist: \"{0}\"", destPath)
                              );
                }

                PyRevit.CreateImageFromClone(PyRevit.GetRegisteredClone(cloneName), paths, imageFilePath);
            }
        }