Select and Delete all objects - Rhinoscript DotNet plugin [C#]


#1

Hello,

I’am writing a Rhinoscript DotNet plugin in C#.

How can I select and delete all objects with C#?

This gives errors:
arr1 = rs.AllObjects;
rs.DeleteObjects(arr1);

Thanks,

Axel


#2

Does rs.AllObjects need parentheses in C# (I don’t know)? rs.AllObjects()

Does arr1 actually contain something? Otherwise you need to check…

arr1 = rs.AllObjects();
if arr1: rs.DeleteObjects(arr1);

–Mitch