Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created April 26, 2022 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/c78b05a387492f4c2172096dbc6007e5 to your computer and use it in GitHub Desktop.
Save chuongmep/c78b05a387492f4c2172096dbc6007e5 to your computer and use it in GitHub Desktop.
public override void Action()
{
GetInfoClash();
}
void GetInfoClash()
{
Document doc = Application.ActiveDocument;
DocumentClash documentClash = doc.GetClash();
foreach (SavedItem savedItem in documentClash.TestsData.Tests)
{
ClashTest clashTest = (ClashTest) savedItem;
SavedItemCollection savedItemCollection = clashTest.Children;
foreach (SavedItem item in savedItemCollection)
{
ClashResult clashResult = item as ClashResult;
if (clashResult != null)
{
PropertyCategoryCollection categories = clashResult.Item1.PropertyCategories;
foreach (PropertyCategory category in categories)
{
Logger.WriteLine(category.DisplayName);
GetPropertiesClashTest(category);
}
break;
}
}
}
Logger.Open();
}
void GetPropertiesClashTest(PropertyCategory propertyCategory)
{
foreach (DataProperty dataProperty in propertyCategory.Properties)
{
Logger.Write($"||Name:{dataProperty.Name}");
Logger.Write($"||DisplayName:{dataProperty.DisplayName}");
Logger.Write($"||Value:{dataProperty.Value}");
Logger.Write($"||CombinedName:{dataProperty.CombinedName}");
Logger.Write("\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment