Design Script/Python Language Reference or Library

Is there a Design Script/Python Language Reference or Library? I can’t seem to find a list of function/methods etc.

Hi Pierre,

For DesignScript have you already seen these documents?
http://dynamobim.org/developer/index.html
http://dynamobim.org/wp-content/links/DesignScriptGuide.pdf
http://dynamobim.org/wp-content/links/DesignScriptDocumentation.pdf

For Python there are lot of examples here:
http://revitpythonwrapper.readthedocs.io/en/latest/index.html

and here

1 Like

Also helpful, this protogeometry xml, which lists ALL classes, properties, methods, etc.

2 Likes

Thanks,
Also, I am trying to extract elements from a list of Element Id’s. How do I do this? I have attached a screen shot of my code. I can’t seem to figure out how to use Document.GetElement() as it is asking for 2 arguments - the Revit SDK does not reveal what the second argument should be.

Hi Pierre,

Have a look at this: https://boostyourbim.wordpress.com/2013/11/18/getting-an-element-from-a-string-id/

The Element.Id node output is an integer therefore you need to convert it back to an ElementId before feeding it to GetElement. It should ask for 1 argument (the element id) not 2: http://www.revitapidocs.com/2018/5fddbd48-643b-9694-21ac-1dcafa112fb4.htm

Archi-lab has a node called Id to Element and another one called Element Ids which you can look at. Hot Gear has a node called Revit Id to Element and Clockwork ElementById.

1 Like

Thanks, I eventually figured it out. I’m not sure why it was asking for a 2nd argument, but it did, as you can see. In the RevitAPI the GetElement method only shows one argument. In python, for some reason I had to provide the elementIds and the document. Possibly because I called the method from the document class without defining the document as you did (doc.getelement…)

image