might be a dumb question but I'm very new to grasshopper and I can't for the life of me figure out what the first box used to specify the view name is... tried with just a panel and text but doesn't seem to work...
Thanks! It is very helpful. From a Revit perspective I would say it is easier and more consistent in the long run if one works in the way you presented first: create an output view to Rhino, so you can easily control and manage the content of that view in your Revit model. This should be helpful if working with many Design Options or a fluid project, so one skips the need of redoing too many steps each time the model in Rhino needs to be updated
Python Script Text here: """Provides a scripting component. Inputs: G: Geometry to bake L: Layer name for bake B: Bake Activate Output: a: The a output variable""" __author__ = "ScottD" __version__ = "2019.08.10" import rhinoscriptsyntax as rs import scriptcontext import Rhino scriptcontext.doc = ghdoc if B:
#debug message to Python output print(type(G))
#we obtain the reference in the Rhino doc doc_object = rs.coercerhinoobject(G, True, True) print(type(doc_object))
attributes = doc_object.Attributes print('the type of attributes is: ' + str(type(attributes))) geometry = doc_object.Geometry print('the type of geometry is: ' + str(type(doc_object)))
#we change the scriptcontext scriptcontext.doc = Rhino.RhinoDoc.ActiveDoc
#we add both the geometry and the attributes to the Rhino doc rhino_brep = scriptcontext.doc.Objects.Add(geometry, attributes) print('the Rhino doc ID is: ' + str(rhino_brep))
#we can for example change color in Rhino... # rs.ObjectColor(rhino_line, color) if not rs.IsLayer(L): rs.AddLayer(L) rs.ObjectLayer(rhino_brep, L)
#we put back the original Grasshopper document as default scriptcontext.doc = ghdoc a = rhino_brep
I'm working in a full building and I'm trying your method but it takes way too long to export all the elements I need. Is there any way to speed up the process (aside from turning off the visibility of what I don't need, I'm already doing that)? I have to export files from revit to rhino quite often and usually I just export them as a DWG and open in rhino, but if I can use rhino.inside.revit it would be better since I'd rather skip the DWG part.
Where can I find the Python script?
might be a dumb question but I'm very new to grasshopper and I can't for the life of me figure out what the first box used to specify the view name is... tried with just a panel and text but doesn't seem to work...
great explanation! is the title correct tho?
Thanks! It is very helpful. From a Revit perspective I would say it is easier and more consistent in the long run if one works in the way you presented first: create an output view to Rhino, so you can easily control and manage the content of that view in your Revit model. This should be helpful if working with many Design Options or a fluid project, so one skips the need of redoing too many steps each time the model in Rhino needs to be updated
Please share the python script
Python Script Text here:
"""Provides a scripting component.
Inputs:
G: Geometry to bake
L: Layer name for bake
B: Bake Activate
Output:
a: The a output variable"""
__author__ = "ScottD"
__version__ = "2019.08.10"
import rhinoscriptsyntax as rs
import scriptcontext
import Rhino
scriptcontext.doc = ghdoc
if B:
#debug message to Python output
print(type(G))
#we obtain the reference in the Rhino doc
doc_object = rs.coercerhinoobject(G, True, True)
print(type(doc_object))
attributes = doc_object.Attributes
print('the type of attributes is: ' + str(type(attributes)))
geometry = doc_object.Geometry
print('the type of geometry is: ' + str(type(doc_object)))
#we change the scriptcontext
scriptcontext.doc = Rhino.RhinoDoc.ActiveDoc
#we add both the geometry and the attributes to the Rhino doc
rhino_brep = scriptcontext.doc.Objects.Add(geometry, attributes)
print('the Rhino doc ID is: ' + str(rhino_brep))
#we can for example change color in Rhino...
# rs.ObjectColor(rhino_line, color)
if not rs.IsLayer(L):
rs.AddLayer(L)
rs.ObjectLayer(rhino_brep, L)
#we put back the original Grasshopper document as default
scriptcontext.doc = ghdoc
a = rhino_brep
did we confirm this works?
Any chance anyone managed to find the Python script he said was in the description or the guide?
I cannot find it here or in their website :(
I'm working in a full building and I'm trying your method but it takes way too long to export all the elements I need. Is there any way to speed up the process (aside from turning off the visibility of what I don't need, I'm already doing that)?
I have to export files from revit to rhino quite often and usually I just export them as a DWG and open in rhino, but if I can use rhino.inside.revit it would be better since I'd rather skip the DWG part.
It is Revit to Rhino process, non?😁
Don't you think the name of the video should be "Revit to rhino"