;返回 -> ()
(1 699)
命令: (GetDwgScrPt)
(-8 677)
命令:
命令: (GetDwgScrPt)
(-704 494)
//<<代码
<<>>
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using System.Runtime.InteropServices;
<<<<<<
[LispFunction("GetDwgScrPt")]
public static ResultBuffer GetDwgScrPt(ResultBuffer resBufIn)
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
ResultBuffer resBufOut = new ResultBuffer();
Point3d p1;
System.Drawing.Point p2;
p1 = new Point3d(1.0, 1.0, 0);
p2=ed.PointToScreen(p1, 1);
resBufOut.Add(
new TypedValue((int)LispDataType.Int16, p2.X));
resBufOut.Add(
new TypedValue((int)LispDataType.Int16, p2.Y));
//resBufOut.Add
return resBufOut;
}