I want to create this diagonal wall with dynamo, so I tried to extract edge from the wall, using SelectModelElement, which i can change the Z point of the edge, but I couldn’t find the node for extracting edge.
I even downloaded GeniusLoci package, but it doesn’t work, keep saying edges are null.
The code of the Wall Edges References node was written using the Python 2.7 engine.
So the DynamoIronPython2.7 package version 2.5 must also be installed for the custom node to run, as explained in the package description.
hello
I used this python code to create diagonal wall, and created successfully.
However, what I originally wanted to do was to extend and reduce the size of the wall freely.
It also works well, but the problem is, if I extend and reduce it, the wall that I just extended also exist on the revit, which originally does not have to exist. I don’t want to delete the useless wall, that I created before, one by one.
Is there a solution for this as well?
Also, I wanted to use this python code to create tilted ceiling. So I edited the code like this, but doesn’t work. How can I solve this problem? Could you please help?
Thank you.
Here is the code:
import clr
import System
from System.Collections.Generic import *
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
Hi, if you want to modify the profile of your wall,
Check that the sketch is modifiable
You have a method in the Wall class
you will need
its skecthId (wall property)
Recover your skecth
Use the SketchEditScope Class
From what I understand, nothing is set in stone, I’m still babbling
It doesn’t seem that simple, I’ll try to dig deeper next weekend
Try it on your side in the meantime
Try not to digress in your post, people looking for it need to be able to find their way around it.
Sincerely
christian.stan
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument
wall_initial=UnwrapElement(IN[0])
prof_new_wall=IN[1]
cond_bool=wall_initial.CanHaveProfileSketch()
sketch_wall=doc.GetElement(wall_initial.SketchId)
if sketch_wall==None:
TransactionManager.Instance.EnsureInTransaction(doc)
sketch_wall=wall_initial.CreateProfileSketch()
doc.Regenerate()
TransactionManager.Instance.TransactionTaskDone()
out=[i.ToProtoType() for i in sketch_wall.Profile]
else:
out=[i.ToProtoType() for i in sketch_wall.Profile]
a=[i.Reference.ElementId for i in sketch_wall.Profile[0]]
sec=SketchEditScope(doc,'Delete and change the lines')
#open editscope
sec.Start(sketch_wall.Id)
TransactionManager.Instance.EnsureInTransaction(doc)
#Delete the Lines
for i in a:
doc.Delete(i)
#Send the new Lines
for i in prof_new_wall:
doc.Create.NewModelCurve(i.ToRevitType(),sketch_wall.SketchPlane)
TransactionManager.Instance.TransactionTaskDone()
sec.Commit()
OUT = cond_bool,out,a,sketch_wall