How do I close an RFA document after opening it - Orchid Package

I am using Orchid to open an RFA file. I then create a family type, set some parameters, and then need to close it.The question is, how do I close the document AFTER I have created the type(s) and set parameters? I don’t get any sort of document object back after setting parameters to then pass to the Document.Close node.

Thanks!

You can use DataStream.Await from Orchid (or there are similar nodes in other packages) to force Dynamo to wait for the parameter setting to be be complete before closing the RFA. This ensures you have your desired order of execution

2 Likes

Thanks, Thomas! Can I stack the Awaits when setting more than one parameter? I’m setting 3 params on possible 100 new types. Does the Await “release” after setting just one param?

You could put together the outputs from Parameter.SetValue into a single list using List.Create and then feed that into waitFor on the DataStreamAwait node. That way it will wait until all the parameters have been set until proceeding.

You could use multiple DataStream.Await nodes chained together but I think that would be more complicated

1 Like