本文整理汇总了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);
}
}
}
}
示例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));
}
示例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;
}