updated to Revit 2023 SDK

This commit is contained in:
Jeremy Tammik
2022-04-07 09:12:58 +02:00
parent e3434c5200
commit ab02648986
342 changed files with 6496 additions and 3140 deletions
@@ -314,8 +314,8 @@ namespace Revit.SDK.Samples.FindColumns.CS
FamilyInstance familyInstance = (FamilyInstance)referenceElement;
ElementId familyInstanceId = familyInstance.Id;
ElementId wallId = wall.Id;
int categoryIdValue = referenceElement.Category.Id.IntegerValue;
if (categoryIdValue == (int)BuiltInCategory.OST_Columns || categoryIdValue == (int)BuiltInCategory.OST_StructuralColumns)
BuiltInCategory categoryValue = referenceElement.Category.BuiltInCategory;
if (categoryValue == BuiltInCategory.OST_Columns || categoryValue == BuiltInCategory.OST_StructuralColumns)
{
// Add the column to the map of wall->columns
if (m_columnsOnWall.ContainsKey(wallId))
@@ -108,8 +108,8 @@ namespace Revit.SDK.Samples.MeasureHeight.CS
if (e is FamilyInstance)
{
FamilyInstance instance = e as FamilyInstance;
bool isWindow = (instance.Category.Id.IntegerValue == (int)BuiltInCategory.OST_Windows);
bool isHostedByRoof = (instance.Host.Category.Id.IntegerValue == (int)BuiltInCategory.OST_Roofs);
bool isWindow = (instance.Category.BuiltInCategory == BuiltInCategory.OST_Windows);
bool isHostedByRoof = (instance.Host.Category.BuiltInCategory == BuiltInCategory.OST_Roofs);
if (isWindow && isHostedByRoof)
m_skylight = instance;
@@ -201,7 +201,7 @@ namespace Revit.SDK.Samples.RayTraceBounce.CS
{
MakeLine(startpt, endpt, m_direction, "bounce");
m_RayCount = m_RayCount + 1;
string info = "Intersected Element Type: [" + referenceElement.GetType().ToString() + "] ElementId: [" + referenceElement.Id.IntegerValue.ToString();
string info = "Intersected Element Type: [" + referenceElement.GetType().ToString() + "] ElementId: [" + referenceElement.Id.ToString();
m_face = referenceObject as Face;
if (m_face.MaterialElementId != ElementId.InvalidElementId)
{