Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to write a function to extract elevation from tinsurface from x & y coordinates. I've written following code but it's giving error and I'm not able to solve it.
[LispFunction("SURFELEV")]
public object GETSURFACEELEVATION (ResultBuffer resbuf)
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
Database db = Application.DocumentManager.MdiActiveDocument.Database;
TypedValue[] args = resbuf.AsArray();
TinSurface surf = args[0];
double PointX = Convert.ToDouble(((TypedValue)args.GetValue(1)).Value);
double PointY = Convert.ToDouble(((TypedValue)args.GetValue(2)).Value);
double z = surf.FindElevationAtXY(PointX, PointY);
return z;
}my lisp function will be:
(SurfElev <SurfaceEntity> <XCoord> <YCoord>)
Thanks & Regards,
Satish
Solved! Go to Solution.