private ObjectId promptForSurface(Colibra.Document doc) { SingleObjectSelector <TinSurface> selector = new SingleObjectSelector <TinSurface>(); selector.PromptMessage = "\nSelect TIN surface: "; selector.RejectMessage = "\nThe selected object is not a TIN surface."; selector.Select(doc); return(selector.SelectedId); }
public void CDS_SurfaceTrianglesAndPointsDemo() { Colibra.Document doc = DocumentManager.ActiveDocument; ObjectId surfaceId = promptForSurface(doc); if (surfaceId == ObjectId.Null) { write("\nNo TIN surface selected."); return; } using (Colibra.Transaction tr = doc.StartTransaction()) { TinSurface surface = surfaceId.GetObject(OpenMode.ForRead) as TinSurface; foreach (TinSurfaceVertex v in surface.Vertices) { displayVertex(v); } } }