Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8565

C# How to find from a List of data a Geometry Class? and check if is not None?

$
0
0

@andresobregonlopez wrote:

Could someone explain How you could write this Python code in C# script?

import rhinoscriptsyntax as rs

for m in data:
if(m!=None and rs.IsCurve(m)):
curve = m

I try this but did not work:

private void RunScript(System.Object data, ref object A)
{
if (data != null){
Print(" Great, Data is not Null! “);
Print(” I found data");

 /*
// not work
  if (data ==  Rhino.DocObjects.Custom.CustomCurveObject){ 
 
    Print(" I found an Object Curve ");
    A = data; // data is a Curve!
  }
*/  

}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8565

Trending Articles