Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
69a3d80
initial commit
pawelbaran Jan 13, 2026
267aa7d
inspiration how to add a follow up transaction on push
pawelbaran Jan 15, 2026
43ec45e
set with SlabShapeEditor - fix with slope arrow
WojciechBuda00 Jan 22, 2026
788fc89
slope arrow fixed
WojciechBuda00 Jan 26, 2026
1ce7f7a
Update description attributes and correct slope calculation methods
WojciechBuda00 Feb 2, 2026
5588c71
Tweaks - moved IsValid method to Query and changed errorMsg to warni…
WojciechBuda00 Feb 5, 2026
244a8bc
Tweaks and clean up
WojciechBuda00 Feb 10, 2026
8f6afa1
Coordinates fixed
WojciechBuda00 Mar 19, 2026
adaa5b7
Slope Arrow and Coordinates tweaks
WojciechBuda00 Mar 20, 2026
953a5c6
Coordinate mismatch fixed
WojciechBuda00 Mar 25, 2026
cd0ba9d
Flat surface tweaks
WojciechBuda00 Mar 25, 2026
9d57186
Copyright added
WojciechBuda00 Mar 25, 2026
4460140
tweaks
WojciechBuda00 Mar 25, 2026
3b64b8e
IBounds tweak
WojciechBuda00 Mar 31, 2026
7722e70
init commit
WojciechBuda00 Mar 31, 2026
d1fea72
ToRevit PadFoundation added
WojciechBuda00 Mar 31, 2026
058cff8
Rotation and thickness tweaks
WojciechBuda00 Mar 31, 2026
99c2a19
Description added
WojciechBuda00 Apr 1, 2026
a8946d5
Method names tweaks
WojciechBuda00 Apr 2, 2026
deb89be
Naming tweaks
WojciechBuda00 Apr 3, 2026
2fed8b4
Update assembly file version to 9.2.0.0
BHoMBot Apr 7, 2026
029a2a4
Remove previous version attributes for 9.2
BHoMBot Apr 7, 2026
d149a03
Start of milestone changes for 9.2 (#1654)
michaelhoehn Apr 9, 2026
fa1aae9
Rectangular and non-rectangular foundation tweaks
WojciechBuda00 Apr 14, 2026
e6fd450
space logic updated
michal-pekacki Apr 28, 2026
74f21be
TriangPad update
WojciechBuda00 Apr 29, 2026
730cde0
Merge branch 'develop' into Revit_Toolkit-#1628-UpdateFloorRoofOutline
WojciechBuda00 Apr 29, 2026
5e927d0
Updated floor outline using SketchEditScope (#1632)
pawelbaran Apr 29, 2026
d7bbdf5
`Query.Space` - find nearest space logic updated (#1655)
michal-pekacki Apr 29, 2026
de593b6
Refactor padfoundation create and update
WojciechBuda00 May 14, 2026
1fa59ac
element type generation cleaned up
pawelbaran May 15, 2026
4c75b7b
update cleaned up, SetLocation left
pawelbaran May 15, 2026
d3ac3e9
SetLocation cleaned up
pawelbaran May 15, 2026
8bc34f9
cleanup & comments
pawelbaran May 15, 2026
9154211
section and elevation boxes for solids added
pawelbaran May 15, 2026
53ca9ea
Freeform generation and setlocation tweaks
WojciechBuda00 May 20, 2026
fc91316
Section and elevation boxes for solids added (#1656)
pawelbaran May 20, 2026
d1d13ce
FoundationGeometry and compliance issues tweaks
WojciechBuda00 May 21, 2026
03514b9
LongestEdgeDirection: Vector calc update
WojciechBuda00 May 21, 2026
56cbea4
Clean up
WojciechBuda00 May 22, 2026
a5e1037
PadFoundation placement fixed
WojciechBuda00 May 22, 2026
3e2fc84
Migrated methods clean up
WojciechBuda00 May 22, 2026
b4dae9d
IsRectangle tolerance added
WojciechBuda00 May 22, 2026
4e2b386
Update PadFoundation - tweaks
WojciechBuda00 May 26, 2026
3d69437
Tweaks
WojciechBuda00 May 28, 2026
5374ca7
TransformToOrigin clean up
WojciechBuda00 May 28, 2026
03e54b1
Update type generation and dimension naming
WojciechBuda00 Jun 1, 2026
70331ff
transform to origin fixed
pawelbaran Jun 3, 2026
a8b510b
Rectangular type generation clean-up and freeform extrusion tweak
WojciechBuda00 Jun 8, 2026
e11394e
Rectangular type name rounding: int to long
WojciechBuda00 Jun 8, 2026
31a1ef8
Add unit to rectangular type name
WojciechBuda00 Jun 8, 2026
f16a647
Rectangular pad family clean-up
WojciechBuda00 Jun 9, 2026
b0c914e
Freeform family naming tweaks
WojciechBuda00 Jun 9, 2026
5fa8a47
Generate pad foundation from geometry and name mismatch warning
WojciechBuda00 Jun 9, 2026
f5b4b59
Fix freeform pad family index parsing with regex and ElementType tweak
WojciechBuda00 Jun 9, 2026
30ff852
Push of pad foundation (#1651)
pawelbaran Jun 10, 2026
9634bbc
Padfoudantion freeform family rename
WojciechBuda00 Jun 16, 2026
6c8c1d8
profile type creation bugfixed
pawelbaran Jun 17, 2026
a7f8f56
diameter parameter removed from freeform pile template
pawelbaran Jun 17, 2026
775e621
Padfoudantion freeform family rename (#1659)
pawelbaran Jun 17, 2026
1009dd1
Pile (and general profile) type creation bugs fixed (#1661)
pawelbaran Jun 18, 2026
81ba96a
RoofBase bug fixed
WojciechBuda00 Jun 22, 2026
51f0ba9
code cleanup
pawelbaran Jun 22, 2026
0eb148b
RoofBase Revit 2026 bug fixed (#1662)
pawelbaran Jun 22, 2026
bfe3970
Freeform profile warning behaviour fixed
pawelbaran Jun 25, 2026
4288e50
Freeform profile warning behaviour fixed (#1665)
pawelbaran Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Revit_Adapter/Revit_Adapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Adapter.Revit</RootNamespace>
<FileVersion>9.1.0.0</FileVersion>
<FileVersion>9.2.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
108 changes: 70 additions & 38 deletions Revit_Core_Adapter/AdapterActions/Push.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using BH.oM.Adapters.Revit.Elements;
using BH.oM.Base;
using BH.Revit.Engine.Core;
using System;
using System.Collections.Generic;
using System.Linq;

Expand Down Expand Up @@ -60,7 +61,7 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
BH.Engine.Base.Compute.RecordError("BHoM objects could not be removed because another transaction is open in Revit.");
return new List<object>();
}

// If unset, set the pushType to AdapterSettings' value (base AdapterSettings default is FullCRUD). Disallow the unsupported PushTypes.
if (pushType == PushType.AdapterDefault)
pushType = PushType.UpdateOrCreateOnly;
Expand All @@ -69,7 +70,7 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
BH.Engine.Base.Compute.RecordError("Full Push is currently not supported by Revit_Toolkit, please use Create, UpdateOnly or DeleteThenCreate instead.");
return new List<object>();
}

// Set config
RevitPushConfig pushConfig = actionConfig as RevitPushConfig;
if (pushConfig == null)
Expand All @@ -81,7 +82,7 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
// Suppress warnings
if (UIControlledApplication != null && pushConfig.SuppressFailureMessages)
UIControlledApplication.ControlledApplication.FailuresProcessing += ControlledApplication_FailuresProcessing;

// Process the objects (verify they are valid; DeepClone them, wrap them, etc).
IEnumerable<IBHoMObject> objectsToPush = ProcessObjectsForPush(objects, pushConfig); // Note: default Push only supports IBHoMObjects.

Expand Down Expand Up @@ -131,6 +132,7 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
{
List<string> distinctNames = group.Select(x => x.Name).Distinct().ToList();
if (distinctNames.Count > 1)

BH.Engine.Base.Compute.RecordWarning($"BHoM objects with names {string.Join(", ", distinctNames)} correspond to the same Revit assembly that has finally been named {group.Key.AssemblyTypeName}.");
}
}
Expand All @@ -149,55 +151,85 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",

private List<IBHoMObject> PushToRevit(Document document, IEnumerable<IBHoMObject> objects, PushType pushType, RevitPushConfig pushConfig, string transactionName)
{

SketchUpdateQueue.SketchUpdates.Clear();

List<IBHoMObject> pushed = new List<IBHoMObject>();
using (Transaction transaction = new Transaction(document, transactionName))

using (TransactionGroup tg = new TransactionGroup(document, transactionName))
{
transaction.Start();
tg.Start();

if (pushType == PushType.CreateOnly)
pushed = Create(objects, pushConfig);
else if (pushType == PushType.CreateNonExisting)
using (Transaction transaction = new Transaction(document, transactionName))
{
IEnumerable<IBHoMObject> toCreate = objects.Where(x => x.Element(document) == null);
pushed = Create(toCreate, pushConfig);
}
else if (pushType == PushType.DeleteThenCreate)
{
List<IBHoMObject> toCreate = new List<IBHoMObject>();
foreach (IBHoMObject obj in objects)
transaction.Start();

if (pushType == PushType.CreateOnly)
pushed = Create(objects, pushConfig);
else if (pushType == PushType.CreateNonExisting)
{
Element element = obj.Element(document);
if (element == null || Delete(element.Id, document, false).Count() != 0)
toCreate.Add(obj);
IEnumerable<IBHoMObject> toCreate = objects.Where(x => x.Element(document) == null);
pushed = Create(toCreate, pushConfig);
}

pushed = Create(toCreate, pushConfig);
}
else if (pushType == PushType.UpdateOnly)
{
foreach (IBHoMObject obj in objects)
else if (pushType == PushType.DeleteThenCreate)
{
List<IBHoMObject> toCreate = new List<IBHoMObject>();
foreach (IBHoMObject obj in objects)
{
Element element = obj.Element(document);
if (element == null || Delete(element.Id, document, false).Count() != 0)
toCreate.Add(obj);
}

pushed = Create(toCreate, pushConfig);
}
else if (pushType == PushType.UpdateOnly)
{
Element element = obj.Element(document);
if (element != null && Update(element, obj, pushConfig))
pushed.Add(obj);
foreach (IBHoMObject obj in objects)
{
Element element = obj.Element(document);
if (element != null && Update(element, obj, pushConfig))
pushed.Add(obj);
}
}
else if (pushType == PushType.UpdateOrCreateOnly)
{
List<IBHoMObject> toCreate = new List<IBHoMObject>();
foreach (IBHoMObject obj in objects)
{
Element element = obj.Element(document);
if (element != null && Update(element, obj, pushConfig))
pushed.Add(obj);
else if (element == null || Delete(element.Id, document, false).Count() != 0)
toCreate.Add(obj);
}

pushed.AddRange(Create(toCreate, pushConfig));
}

transaction.Commit();
}
else if (pushType == PushType.UpdateOrCreateOnly)

if (SketchUpdateQueue.SketchUpdates.Count > 0)
{
List<IBHoMObject> toCreate = new List<IBHoMObject>();
foreach (IBHoMObject obj in objects)
foreach (Action call in SketchUpdateQueue.SketchUpdates)
{
Element element = obj.Element(document);
if (element != null && Update(element, obj, pushConfig))
pushed.Add(obj);
else if (element == null || Delete(element.Id, document, false).Count() != 0)
toCreate.Add(obj);
try
{
call.Invoke();
}
catch (Exception ex)
{
string errorMsg = $"Sketch update failed: {ex.Message}";
if (ex.InnerException != null)
errorMsg += $" Inner: {ex.InnerException.Message}";

BH.Engine.Base.Compute.RecordError(errorMsg);
}
}

pushed.AddRange(Create(toCreate, pushConfig));
}

transaction.Commit();
tg.Assimilate();
}

return pushed;
Expand Down
2 changes: 1 addition & 1 deletion Revit_Core_Adapter/Revit_Core_Adapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Revit.Adapter.Core</RootNamespace>
<FileVersion>9.1.0.0</FileVersion>
<FileVersion>9.2.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Loading