Comments (3)
In order to fix this I needed to do some changes in Rhino WIP.
A new Release will be available next Tuesday with those changes included.
My plan was to do a sample using a C# Script component that shows how to use it in this repo.
I will tell you when all the pieces are in their place.
from rhino.inside-revit.
Just checked the new commit and still getting the same error.
Could you please confirm if the following code in a python node in Grasshopper?
import rhinoscriptsyntax as rs
import clr
clr.AddReference('RevitNodes')
import Revit
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
import System
doc=DocumentManager.Instance.CurrentDBDocument
uiapp= DocumentManager.Instance.CurrentUIApplication
t = Transaction(doc, 'Place an Adaptive Component.')
t.Start()
collector = FilteredElementCollector(doc)
collector.OfCategory(BuiltInCategory.OST_Walls)
t.Commit()
a=collector
That is the error I am getting:
Runtime error (ArgumentNullException): The input argument "document" of function `anonymous-namespace'::Transaction_constructor or one item in the collection is null at line 97 of file d:\ship\2018_px64\source\revit\revitdbapi\gensrc\APIUndoTransactionProxy.cpp.
Parameter name: document
Traceback:
line 43, in script
from rhino.inside-revit.
It should work with the last update to the repo.
I modified a bit your script to use RhinoInside to get acces to the active Document.
import clr
clr.AddReference('RhinoInside.Revit')
from RhinoInside.Revit import Revit, Convert
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitAPIUI')
doc=Revit.ActiveDBDocument
uiapp= Revit.ActiveUIApplication
t = Transaction(doc, 'Place an Adaptive Component.')
t.Start()
collector = FilteredElementCollector(doc)
collector.OfCategory(BuiltInCategory.OST_Walls)
t.Commit()
a=collector
Does it work in your case?
from rhino.inside-revit.
Related Issues (20)
- Add family component curve with option to be symbolic line = true comes in as model line.
- Grids do not output or convert to a reference needed for annotations.
- Adding a Detail Item to a Locked 3D view returns error.
- Add Wall as Reference to Annotation throws exemption
- Change Name of Phase Element HOT 1
- Add Multisegement Grid support HOT 1
- Unassigned Subcategories in Families return a Subcategory.
- Expose Rotation by Default in Add Detail Item component
- New component that sets a view range offset and level HOT 1
- Arc Length Dimension not returning proper length
- Component to edit existing Revision Properties HOT 1
- Setting Beam System isn't recognized by Beam System Component.
- Exclude geometry on linked elements 2024 error HOT 1
- rhino 8 cast view to material (image)
- revit stop resopnsing when create or modify duct with rinoinside started
- Get Revit Point errors out in Revit 3d view.
- Add optional Visible Element Tracking State to components that allow tracking HOT 1
- Workplane component doesn't allow Setting of the workplane
- Active View to update on change of view (without refreshing solver) HOT 1
- Components for working with Reveals in Revit.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rhino.inside-revit.