Im trying to develop script for myself in dynamo(Revit 2021), but I don't understand how can I create the slanted wall? According to this blog of changes in revit 2021, there are such parameters for creating inclined walls as BuiltInParameter.WALL_CROSS_SECTION. However, there are no examples of using them to existing parameters or classes. Therefore, I do not understand exactly where to use it at the stage of creating a line or wall and what should be the appeal?
The part of the code where the wall itself is created, in the end I tried to turn to the wall and change its orientation parameter to an inclined one, because there are no other appeals.
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
# points for line
p_tp_1_1 = XYZ(x_tp_1_1, y_tp1, levels.get_Parameter(BuiltInParameter.LEVEL_ELEV).AsDouble() + size_of_batten_1v_width)
p_tp_1_2 = XYZ(x_tp_1_2, y_tp1, levels.get_Parameter(BuiltInParameter.LEVEL_ELEV).AsDouble() + size_of_batten_1v_width)
# Draw a line
wall_line_tp1 = Line.CreateBound(p_tp_1_1, p_tp_1_2)
# Create a Wall
wall_tp1 = Wall.Create(doc, wall_line_tp1, type.Id, levels.Id, h_tp_1, z_tp1, 0, 1)
wall_tp1.Orientation(BuiltInParameter.WALL_CROSS_SECTION(1))
All informations for points are getting from excel file.
I waiting for feedback. Also if you have С# or С++ cod - it count too, I'll try to adapt it to python. Thanks for any help!