Python node output being previewed in Revit viewport

Hi all,

For some reason points that are output of a python node are being previewed in the Revit viewport which obscures other geometry. This is not a huge deal since the preview can be hidden in the Dynamo workspace, but I still found it interesting as what I am trying to do with my definition is exactly this: to output geometry into the Revit viewport. Now I seem to have done it accidentally.

Can someone possibly explain this behaviour? Below is the code for the python node (can’t upload the .py file as I’m a new user… wtf?).

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

in_points = IN[0]
index_groups = IN[1]
out_points = []

for grp in index_groups:
---- indexes = [grp.A, grp.B, grp.C]
---- if grp.Count == 4:
-------- indexes.append(grp.D)
---- points = [in_points[i] for i in indexes]
---- out_points.append(points)

OUT = out_points

You can turn off the Revit preview too, if you so desire.

1 Like

Try using the Import Instance or Direct Shape nodes

Actually you haven’t, that’s just a preview and only helps provide visual reference. No geometry.