Path reinforcement

Path reinforcement

office
Enthusiast Enthusiast
509 Views
1 Reply
Message 1 of 2

Path reinforcement

office
Enthusiast
Enthusiast

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

 

0 Likes
510 Views
1 Reply
Reply (1)
Message 2 of 2

mikako_harada
Community Manager
Community Manager

Hi Koppevi, 

 

Looks like this issue is very similiar to another post of yours: 

http://forums.autodesk.com/t5/revit-api/create-area-reinforcement-by-boundary/m-p/5523536#M8910

 

Using dynamo certainy narrow the help you can get here.  So again, I would suggest the same:

 

1. try posting to dynamo discussion forum: 

http://dynamobim.com/forums/forum/dyn/

 

2. if you can reproduce using/modifying the SDK sample or something, we have more people who can take a look.

 

Sorry for being not much help on this.   


Mikako Harada
Developer Technical Services
0 Likes