예제 #1
0
        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);
                    }
                }
            }
        }