I am using Rhythms
Walls.HasEditedProfile node and it seems to be removing dimension overrides. Not sure why. Has anyone else had this problem?
This is the warning I got when I Ran it.
Sample Revit 2019 File.
ARCH_B38_SHELL AND CORE_detached.rvt (3.5 MB)
Same Result with Dynamo 1.3.3 and 2.0.1
Edit Profile error test.dyn
Whoops. I am using this method from the building coder which uses transaction rollback and it might be affecting other things,
that being said, Revit 2018.1 + has the method “GetDependentElements” and I should be able to pivot to that. Let me get that updated in the next version.
I have this updated and published in Rhythm v2019.4.3, now on the package manager.
Here is the node in action:
And my open source code is here, if anyone was curious how the fix worked.
This file has been truncated.
/// This node will try to check if the walls profile has been modified using the dependent elements method available in Revit 2018.1+
/// <param name="wall">The walls to check.</param>
/// <returns name="bool">The result.</returns>
/// profile, wall
public static bool HasEditedProfile(global::Revit.Elements.Element wall)
Autodesk.Revit.DB.Document doc = DocumentManager.Instance.CurrentDBDocument;
Autodesk.Revit.DB.Wall internalWall = (Autodesk.Revit.DB.Wall )wall.InternalElement;
//dependent elements method (available in Revit 2018.1 +)
Autodesk.Revit.DB.ElementFilter elemFilter = new ElementIsElementTypeFilter(true);
IList<ElementId> elemIds = internalWall.GetDependentElements(elemFilter);
//get the elements
List<Autodesk.Revit.DB.Element> elems = new List<Element>(elemIds.Select(e => doc.GetElement(e)));
PS: use LINQ Any() instead of Where(), saves you from having to instantiate a List and then count it.
Thanks for the feedback
No problem (and so am I! Life-long learning = recipe for success).
Thanks yet again for the quick reply. Also, thank you for the extra mile with the code samples.
I have also used the Temporary transaction method. It is interesting that Revit kicked out an error before the transaction could be rolled back (if I am not mistaken). This solved another problem I was having where nodes in my larger graph were failing due to a transaction already being open. I think when Revit errored out the transaction did not close properly and prevented the other nodes from opening their transaction.
Any way just downloaded your update and it is working great.