Create a new selection set with NO members (empty) in C# .NET ???
Hi all,
is it possible to create in C# .NET a new selection set with NO members (empty) and NOT interactively (not by user selection) ??
In Lisp you code (setq ss (ssadd))
and a new sellection set ss is created (ss is a null selection set) also without any editor selection or interaction by the user !
If called with no arguments, ssadd constructs a new selection set with no members !
In C# .NET of course code similar to
will NOT work for the reasons stated in the Error message above !
There isn't a class constructor for this ...
Can anybody help outhere ?
If it is possible, a code snippet of 2 lines would be enough and appreciated !!!!
thanks
Konstantin
is it possible to create in C# .NET a new selection set with NO members (empty) and NOT interactively (not by user selection) ??
In Lisp you code (setq ss (ssadd))
and a new sellection set ss is created (ss is a null selection set) also without any editor selection or interaction by the user !
If called with no arguments, ssadd constructs a new selection set with no members !
In C# .NET of course code similar to
will NOT work for the reasons stated in the Error message above !
There isn't a class constructor for this ...
Can anybody help outhere ?
If it is possible, a code snippet of 2 lines would be enough and appreciated !!!!
thanks
Konstantin
0
Comments
-
SelectionSet is abstract, so you can pretty much only create a sset via SelectionSet.FromObjectIds or one of the editor selection methods. you can store your entities in an objectid array, then build a set as needed
Best
Daniel
0 -
In the meantime I have figured out how to do that using
ObjectId[] ids = new ObjectId[0];
SelectionSet ss = SelectionSet.FromObjectIds(ids);
which is exactly what you have suggested !
thanks, best regards
Konstantin0
This discussion has been closed.