日常更新
This commit is contained in:
@@ -187,6 +187,30 @@ namespace Szmedi.Test
|
||||
// {
|
||||
// Document.FamilyManager.ReplaceParameter(parameter, "测试", BuiltInParameterGroup.PG_TEXT, true);
|
||||
// });
|
||||
var docs = Application.Documents;
|
||||
if (docs.Size != 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var doc1 = docs.OfType<Document>().First();
|
||||
var doc2 = docs.OfType<Document>().Last();
|
||||
var elements1 = doc1.OfCollector().WhereElementIsNotElementType().Where(e => e.Category?.CategoryType == CategoryType.Model && e.get_BoundingBox(null) != null);
|
||||
var elements2 = doc2.OfCollector().WhereElementIsNotElementType().Where(e => e.Category?.CategoryType == CategoryType.Model && e.get_BoundingBox(null) != null);
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
foreach (var e1 in elements1)
|
||||
{
|
||||
foreach (var e2 in elements2)
|
||||
{
|
||||
if (e1.Id.IntegerValue == e2.Id.IntegerValue)
|
||||
{
|
||||
stringBuilder.Append($"重复图元:{e1.Id};");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Show(stringBuilder.ToString());
|
||||
return;
|
||||
var doc = Document;
|
||||
if (doc.IsFamilyDocument)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user