Path reinforcement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
as working with reinforcements i was trying to create a path reinforcement based on the example code provided by "help"
whatever i do i get that error message:
Exception: pathReinforcementTypeId should refer to an PathReinforcementType element.
Parameter name: pathReinforcementTypeId
but in my opinion i am referring to a PathReinforcementType ????
my programming enviroment is dynamo and i am trying to solve this in ironpython and am a bad programmer........
here is my code:
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
icurves= UnwrapElement(IN[1])
wall=UnwrapElement(IN[0])
curves=[]
for i in icurves:
start=i.GeometryCurve.GetEndPoint(0)
end=i.GeometryCurve.GetEndPoint(1)
curves.append(Line.CreateBound(start,end))
TransactionManager.Instance.EnsureInTransaction(doc)
defaultRebarBarTypeId = doc.GetDefaultElementTypeId(ElementTypeGroup.RebarBarType)
defaultPathReinforcementTypeId = doc.GetDefaultElementTypeId(ElementTypeGroup.PathReinforcementType)
defaultHookTypeId = ElementId.InvalidElementId;
rein = Autodesk.Revit.DB.Structure.PathReinforcement.Create(doc, wall, curves, True, defaultPathReinforcementTypeId, defaultRebarBarTypeId, defaultHookTypeId, defaultHookTypeId);
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable
OUT =rein
tx peter