Autodesk.Revit.DB.AssemblyDifferenceNamingCategory
类是用于表示Revit程序集之间的差异命名类别的对象。
AssemblyDifferenceNamingOptions
对象。AssemblyDifferenceNamingOptions namingOptions = new AssemblyDifferenceNamingOptions();
AssemblyDifferenceNamingCategory
属性。namingOptions.AssemblyDifferenceNamingCategory = AssemblyDifferenceNamingCategory.Full;
CompareAssembly
方法并将namingOptions
作为参数传递。AssemblyComparisonResult result = AssemblyUtils.CompareAssembly(path1, path2, namingOptions);
以下是使用AssemblyDifferenceNamingCategory
类的示例代码。
AssemblyDifferenceNamingOptions namingOptions = new AssemblyDifferenceNamingOptions();
namingOptions.AssemblyDifferenceNamingCategory = AssemblyDifferenceNamingCategory.Full;
AssemblyComparisonResult result = AssemblyUtils.CompareAssembly(path1, path2, namingOptions);
if (result.IsSame)
{
Console.WriteLine("两个程序集相同");
}
else
{
Console.WriteLine("两个程序集不同");
}