aske
(Aske)
October 28, 2020, 3:31pm
1
I’m super excited about the RhinoCommon API to write STP files. Yay! No more RunScript!
Wish: overload the Write method to take to take en Enumerable:
// Current:
public static bool Write(
string filename,
RhinoDoc doc,
FileStpWriteOptions options
)
// Wish:
public static bool Write(
string filename,
IEnumerable<RhinoObject/Geometry> objectsToExport,
FileStpWriteOptions options
)
gankeyu
(Keyu Gan)
October 28, 2020, 4:07pm
2
1 Like
aske
(Aske)
October 28, 2020, 5:15pm
3
gankeyu
(Keyu Gan)
October 28, 2020, 5:29pm
4
headless doc wont show up in the UI. You will need to copy geometry from the active doc to the headless doc first. Don’t know if it fits your workflow
aske
(Aske)
October 30, 2020, 12:40pm
5
That’s exactly what I asked about in the other thread… that workflow seems much more logical to me. But apparently it’s not the recommended way to do things.
Do you do that in your plugins?
stevebaer
(Steve Baer)
October 30, 2020, 4:16pm
6
This is not true. You should be able to create a headless doc and fill it with whatever geometry you want in V7 for export. That said, doing this seems like a lot of overhead compared to your request for just exporting a subset of the current doc.
I added your request to our wishlist at https://mcneel.myjetbrains.com/youtrack/issue/RH-61227
aske
(Aske)
October 30, 2020, 4:20pm
7
Thanks for clearing that up @steve ! I misunderstood the answer in the other thread. I would much rather do it this way.
aske
(Aske)
October 30, 2020, 4:22pm
8
Thanks for answering this for me @gankeyu !
visose
(Vicente Soler)
August 9, 2022, 4:03pm
9
Is there any chance of having an overload for FileStp.Write
that uses a stream rather than saving to disk?