当前位置: 首页>>代码示例>>C#>>正文


C# Autodesk.GetLibraryPaths方法代码示例

本文整理汇总了C#中Autodesk.GetLibraryPaths方法的典型用法代码示例。如果您正苦于以下问题:C# Autodesk.GetLibraryPaths方法的具体用法?C# Autodesk.GetLibraryPaths怎么用?C# Autodesk.GetLibraryPaths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Autodesk的用法示例。


在下文中一共展示了Autodesk.GetLibraryPaths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BUYLSetContentLibraryPath

        public static void BUYLSetContentLibraryPath(Autodesk.Revit.ApplicationServices.Application app)
        {
            if(BUYLTools.ContentLoader.GitContentLoader.CheckForContentRepositoryDirectory())
            {
                if(app != null)
                {
                    bool contained = false;

                    IDictionary<string, string> libs = app.GetLibraryPaths();
                    if(libs.ContainsKey(BUYLTools.ContentLoader.GitContentLoader.buylContent))
                    {
                        contained = true;
                    }
                    else
                    {
                        foreach (string item in libs.Keys)
                        {
                            if(libs[item] == BUYLTools.ContentLoader.GitContentLoader.pathToLocalContentRepository)
                            { contained = true;
                                break;
                            }
                        }
                    }

                    if(!contained)
                    {
                        libs.Add(BUYLTools.ContentLoader.GitContentLoader.buylContent, BUYLTools.ContentLoader.GitContentLoader.GetLibraryPath());
                        app.SetLibraryPaths(libs);
                    }
                }
            }
        }
开发者ID:BIMUpYourLife,项目名称:CodeUpYourLife,代码行数:32,代码来源:ContentLoader.cs

示例2: Stream

        private void Stream(ArrayList data, Autodesk.Revit.ApplicationServices.Application app)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(Autodesk.Revit.ApplicationServices.Application)));

             data.Add(new Snoop.Data.Object("Cities", app.Cities));
             data.Add(new Snoop.Data.Enumerable("Documents", app.Documents));
             data.Add(new Snoop.Data.String("Language", app.Language.ToString()));
             data.Add(new Snoop.Data.Enumerable("Library Paths", app.GetLibraryPaths()));
             data.Add(new Snoop.Data.String("Shared Parameter File", app.SharedParametersFilename));
             data.Add(new Snoop.Data.String("Family Template Path", app.FamilyTemplatePath));
             data.Add(new Snoop.Data.String("Product", app.Product.ToString()));
             data.Add(new Snoop.Data.String("Recording journal filename", app.RecordingJournalFilename));
             data.Add(new Snoop.Data.String("Version build", app.VersionBuild));
             data.Add(new Snoop.Data.String("Version name", app.VersionName));
             data.Add(new Snoop.Data.String("Version number", app.VersionNumber));

             data.Add(new Snoop.Data.String("Current Accelerator", app.CurrentRevitServerAccelerator));
             data.Add(new Snoop.Data.String("User Name", app.Username));

             data.Add(new Snoop.Data.Double("Vertex Tolerance", app.VertexTolerance));
             data.Add(new Snoop.Data.Object("Schema", Schema.ListSchemas()));

             data.Add(new Snoop.Data.Bool("IsArchitectureEnabled", app.IsArchitectureEnabled));
             data.Add(new Snoop.Data.Bool("IsElectricalAnalysisEnabled", app.IsElectricalAnalysisEnabled));
             data.Add(new Snoop.Data.Bool("IsElectricalEnabled", app.IsElectricalEnabled));
             data.Add(new Snoop.Data.Bool("IsEnergyAnalysisEnabled", app.IsEnergyAnalysisEnabled));
             data.Add(new Snoop.Data.Bool("IsMassingEnabled", app.IsMassingEnabled));
             data.Add(new Snoop.Data.Bool("IsMechanicalAnalysisEnabled", app.IsMechanicalAnalysisEnabled));
             data.Add(new Snoop.Data.Bool("IsMechanicalEnabled", app.IsMechanicalEnabled));
             data.Add(new Snoop.Data.Bool("IsPipingAnalysisEnabled", app.IsPipingAnalysisEnabled));
             data.Add(new Snoop.Data.Bool("IsPipingEnabled", app.IsPipingEnabled));
             data.Add(new Snoop.Data.Bool("IsStructuralAnalysisEnabled", app.IsStructuralAnalysisEnabled));
             data.Add(new Snoop.Data.Bool("IsStructureEnabled", app.IsStructureEnabled));
             data.Add(new Snoop.Data.Bool("IsSystemsEnabled", app.IsSystemsEnabled));
        }
开发者ID:jeremytammik,项目名称:RevitLookup,代码行数:35,代码来源:CollectorExtApp.cs

示例3: findFile

        //  Helper function - find the given file name in the set of Revit library paths.
        public string findFile(Autodesk.Revit.ApplicationServices.Application rvtApp, string fileName)
        {
            IDictionary<string, string> paths = rvtApp.GetLibraryPaths();
            IEnumerator<KeyValuePair<string, string>> iter = paths.GetEnumerator();
            string filePath = null;
            // loop through each path in the collection.

            while ((iter.MoveNext()))
            {
                string path = iter.Current.Value;
                //libPaths += ControlChars.Tab + path + ";" + ControlChars.NewLine;
                filePath = SearchFile(path, fileName);
                if ((filePath != null))
                {
                    return filePath;
                }

            }
            filePath = SearchFile(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), fileName);
            if ((filePath != null))
            {
                return filePath;
            }
            return null;
        }
开发者ID:kdaner,项目名称:04_ProjSpecificPanel_SkyRise-Canopy-Creator,代码行数:26,代码来源:Controller.cs


注:本文中的Autodesk.GetLibraryPaths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。