示例#1
0
        /// <summary>
        /// Generate new addin files for all applicable
        /// versions of Revit.
        /// </summary>
        /// <param name="products">A collection of revit installs.</param>
        /// <param name="dynamos">A collection of dynamo installs.</param>
        internal static void GenerateAddins(IRevitProductCollection products, IDynamoInstallCollection dynamos)
        {
            foreach (var prod in products.Products)
            {
                Console.WriteLine("Generating addins in {0}", prod.AddinsFolder);

                var addinData = new DynamoAddinData(prod, dynamos.GetLatest());

                if (prod.ProductName == "Vasari Beta 3")
                {
                    // Change the addin path because the AddinUtility
                    // reports this incorrectly for vasari
                    var dir    = Path.GetDirectoryName(addinData.AddinPath);
                    var newDir = dir.Replace("Revit", "Vasari");
                    addinData.AddinPath = Path.Combine(newDir, Path.GetFileName(addinData.AddinPath));
                }

                GenerateDynamoAddin(addinData);
            }
        }
示例#2
0
        /// <summary>
        /// Generate new addin files for all applicable
        /// versions of Revit.
        /// </summary>
        /// <param name="products">A collection of revit installs.</param>
        /// <param name="dynamos">A collection of dynamo installs.</param>
        internal static void GenerateAddins(IRevitProductCollection products, IDynamoInstallCollection dynamos)
        {
            foreach (var prod in products.Products)
            {
                Console.WriteLine("Generating addins in {0}", prod.AddinsFolder);

                var addinData = new DynamoAddinData(prod, dynamos.GetLatest());

                if (prod.ProductName == "Vasari Beta 3")
                {
                    // Change the addin path because the AddinUtility 
                    // reports this incorrectly for vasari
                    var dir = Path.GetDirectoryName(addinData.AddinPath);
                    var newDir = dir.Replace("Revit", "Vasari");
                    addinData.AddinPath = Path.Combine(newDir, Path.GetFileName(addinData.AddinPath));
                }

                GenerateDynamoAddin(addinData);
            }
        }