日常更新

This commit is contained in:
ShrlAlgo
2026-01-16 17:07:43 +08:00
parent b611efeed9
commit 3650f8550e
74 changed files with 2040 additions and 2151 deletions

View File

@@ -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)
{