I want to edit profile of curved walls in revit without "Attach Top/Base” feature, but it seems impossible. So I wonder if I can edit profile in flat wall and change it into curved by dynamo. Is it seems possible? If it is, is there any node can help with?
In short: No you cannot edit the profile of a curves wall like you can do with a straight wall. Also you cannot make a straight profiled wall curved.
But there are other options to make profiled curved walls in Revit. On of them is indeed Attach top/base.
Another is to use a model inplace and make a void extrusion through the wall with the desired profile and cut in while in editing mode.
Sadly both options are not possible in Dynamo I think
BUT
You can do something else. You can create a Solid in Dynamo which goes through you wall, simulating the “Cut”. You can make a solid family out of this with dynamo and join in with all the curves walls that need to be cut. If you supply a sub-category to it you can turn this Solid Family off in the visibily graphics. See pics below
“Solid placed with Dynamo”
“Solid joined with curves wall”
“Script”
“Turn off VG sub category”
@Joelmick …damn a sneeky way
Works better then I expected actually
““Join Elements Python Code””
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#Import the Revit Services
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
#Import the Revit Nodes
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
#Import the Revit API
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
#Define tolist function
def tolist(obj1):
if hasattr(obj1,"__iter__"):
return obj1
else:
return [obj1]
#Define Input (IN)
elements = tolist(UnwrapElement(IN[0]))
cuttingElements = tolist(UnwrapElement(IN[1]))
output = []
# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
for element in elements:
for cuttingElement in cuttingElements:
try:
JoinGeometryUtils.JoinGeometry(doc, element, cuttingElement)
#output.append(element.Name + " is joined with " cuttingElement.Name)
output.append(element.Name.ToString() + " is joined with " + cuttingElement.Name.ToString())
except:
#output.append(element.Name + " is NOT joined with " cuttingElement.Name)
output.append(element.Name.ToString()+ " is joined with " + cuttingElement.Name.ToString())
#End Transaction
TransactionManager.Instance.TransactionTaskDone()
#Define Output (OUT)
OUT = output
““Regenerate SubCategories Python Code””
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('System')
clr.AddReference("System.IO")
clr.AddReference("System.Collections")
from System import *
from System.Reflection import *
from System.Collections.Generic import *
from System.IO import *
#Use elemIds = List[ElementId](ids) for ICollection(ElementId)
#Import the Revit Services
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Import the Revit Nodes
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
#Import the Revit API
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
#Import math functions
import math
#GetInternalParameter
def GetInternalProperty(obj, propertyName):
type = obj.GetType()
property = type.GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance)
value = property.GetValue(obj)
return value
#Define Input (IN)
cat = GetInternalProperty(IN[0], "InternalCategory")
output = []
materials = dict()
# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
dummyMaterial = FilteredElementCollector(doc).OfClass(Material).ToElements()[0]
for sub in cat.SubCategories:
subMaterial = sub.Material
subName = sub.Name
if subMaterial != None:
materials.Add(subName, subMaterial)
sub.Material = dummyMaterial
doc.Regenerate()
for sub in cat.SubCategories:
subMaterial = sub.Material
subName = sub.Name
if subMaterial != None:
material = materials[subName]
sub.Material = material
#End Transaction
TransactionManager.Instance.TransactionTaskDone()
#Define Output (OUT)
OUT = materials.Values
Thank you very much! I’ll try it!