Import Revit nodes in python

Hello there,

is there any way of importing the nodes of Rhino.Inside within my python script? I want to import particulary AddWall.ByCurve and AddFamilyInstance.ByLocation.

Thanks in advance

https://www.rhino3d.com/inside/revit/beta/guides/rir-ghpython

1 Like


thanks for the link you sent, it is an useful link to understand to use transactions and import the Revit API but i was trying to import the RhinoInside Revit grasshopper nodes, that you see in red in the picture. Is there a way to import them? maybe to copy them into a c# node within the grasshopper script? (https://github.com/mcneel/rhino.inside-revit/tree/master/src/RhinoInside.Revit.GH/Components)
For instance we can see here that the grasshopper nodes are imported(https://developer.rhino3d.com/guides/rhinopython/ghpython-call-components/). Well I am looking for a similar workflow but for the Revit nodes.
thanks in advance!

heres an example of NodeInCode

import ghpythonlib.components as gh
gh.PLUGIN_NAMESPACE.COMPONENTNAME()
# An example with the Weaver Bird plugin
outputPolygons = gh.WeaverBird.WeaverbirdsFacePolylines(inputMesh)
1 Like

image
I needed to comment the line "gh.PLUGIN_NAMESPACE.COMPONENTNAME()
" cause it throws an error, “module” object hast not attribute “PLUGIN_NAMESPACE”:
Nevertheless I can call the gh.RhinoInside nodes, the problem is that it doesnt generate the walls but it doesnt have any error either, so I dont know anymore what is wrong actually.
Thanks in advance

This is way out of my arena.

Doesn’t revit require you to open a transaction?

https://www.rhino3d.com/inside/revit/beta/guides/rir-ghpython#handling-transactions

Hello Rickson,
the transaction is within the definition already in this case within the gh.RhinoInside.AddWallByCurve(),
I tried though to open a transaction and create the wall but it threw an error.

Filed an issue for this