Findclippingplanesforviewport" method


#1

Hi,
I am trying to use “findclippingplanesforviewport” method as the below codes.
RhinoDoc doc = RhinoDoc.ActiveDoc; RhinoView viewe = doc.Views.ActiveView;
ClippingPlaneObject[] cpl = Rhino.DocObjects.Tables.ObjectTable.FindClippingPlanesForViewport(viewe.ActiveViewport);

but it gives the error “An object reference is required for the non-static field, method, or property”, why is it?

Thanks


(Menno Deij - van Rijswijk) #2

You should use doc.FindClippingPlanesForViewport(viewe.ActiveViewport)

The FindClippingPlanesForViewport method is an instance method, not a static method. If it were static you could use it like your code above. But now, you need an instance of the class RhinoDoc and call the method on that instance.


C# data types
#3

great, thank you :slight_smile: