Problems using RebarHookType


#1

Hi everybody! I have a quick question, I’m trying to save some parameterse into a list in python, particullary, a list of Rebar Hook Types. I know the types’ID of the ones I need, but I don’t know how to get them.

With the Rebar hook orientation I had no problem, just used " hook_orientation = RebarHookOrientation.Left", but with Rebar Hook Type, it doesn’s work like this.

code

I tried looking by name (line 23), and I get this error message:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 23, in
AttributeError: ‘type’ object has no attribute ‘ByName’

Using the ID didn’t work either (line 24), showing this:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 24, in
TypeError: Cannot create instances of RebarHookType because it has no public constructors

So I can’t find the way to create a new style instance. Does anyone have the answer or a clue?
Thanks in advance!


Hook orientation of the spacer in double curved bridge sidewalk generic model
#2

anyone?


#3

Have you tried the ‘element types’ node in combination with ‘all elements of type’? in python you can use the FileredElementCollector


#4

I did that in dyanmo, but now I’m moving my dynamo script to python, so I’ll give it a try to that FileredElementCollector, I thing the answer is in that direction!
I’ll tell how it works once I get back to that issue.

Thanks Einar!