Are you trying to use the node equivalent or the backend method? For the node, simply try this:
If you want to dig deeper, you’ll need to check out the freely available source code here:
There’s a ready-made “Convert” method, so all we need to do is to get to the Revit primitive and apply the conversion method:
What I want is exactly in your first screenshot.
This is weird, because I have already tried to use .Geometry()! But it works now… Maybe, I was drunken too much.
Hi @DIMITAR VENKOV
How to convert code in pic 1 and pic 2 to revit python shell, when i use element.Geometry in revit python shell, the result is not Solid, and in pic 2, i can not use method Convert(),
Can you please show me that code in revit API (i use revit python shell)
Thanks you !!
still need help !!!
still need help !!!
You always need help, but never help anyone.
How did you know that ??
If you don’t want to help me, or don’t know the answer, please don’t comment like spammer.
Could you show me the last time you helped someone on this forum?
Why you care about my help, this is very important with you ?? Maybe you care about you obtained than things you can help someone ?? ^_^
If you have ever use revit python shell, it’s different than dynamo, with dynamo just use element.geometry, i finding a solution in revit python shell and it’ using python code not in C#, if i use C# it’s very easy to me.
Sorry, unfortunately my script doesn’t work anymore, when i use the Convert() method Revit crashes. In your script the error is in line 7, something related with that reference.
I’m using Revit 2014 and the Installer for Autodesk Revit 2014.
Thanks. I found solution for this issue, my code like this :
<div style=”color: #222222;”>
<div class=”IVILX2C-Db-b” style=”color: #888888;”>selection = [ doc.GetElement( elId ) for elId in __revit__.ActiveUIDocument.Selection.GetElementIds() ]
opt = Options()
for i in selection:
geo = i.get_Geometry(opt)
for a in geo:
geo = a.GetInstanceGeometry()
for g in geo:
if ( g != None) & (g.Faces.Size >0):
Oh, you need the geometry of family instances, hahaha.
This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.