I´m new using python for rhino.inside Revit. I was wondering if there was some web pages you recommend in order to improve my skills. Thanks in advice.
Also, i was trying to understand a script today but i can´t figure it out. I can´t understand where is defined CGL, and where does CG comes from. Thanks in advice.
from System import Enum
import rhinoscriptsyntax as rs
from Grasshopper.Kernel import GH_RuntimeMessageLevel as RML
from RhinoInside.Revit import Revit, Convert
from Autodesk.Revit import DB
active Revit verison
REVIT_VERSION = Revit.ActiveUIApplication.Application.VersionNumber
access the active document object
doc = Revit.ActiveDBDocument
create and start the transaction
t = DB.Transaction(doc, ‘AddGridLine’)
# change Revit document here
CGL = CG.AddGridLine(U, DB.XYZ(P.X, P.Y, P.Z), False)
# commit the changes after all changes has been made
except Exception as txn_err:
# if any errors happen while changing the document, an exception is thrown
# make sure to print the exception message for debugging
# and rollback the changes made before error
except Exception as rb_err:
The pyrevit tutorials are a good place to start.
The CGL is a Curtain Grid Line, Analyze a Curtain Wall and you will see those outputs.
Thanks a lot!