using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.GraphicsInterface;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
using WinApp = System.Windows.Forms.Application;
public class Script
{
private ObjectId _idField;
private ObjectId _idFrom;
private ObjectId _idTo;
public string Open(string hField, string hFrom, string hTo)
{
return Regen(hField, hFrom, hTo);
}
public string Regen(string hField, string hFrom, string hTo)
{
Document doc = AcadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
try
{
Database db = doc.Database;
long ln1 = Convert.ToInt64(hField, 16);
Handle hn1 = new Handle(ln1);
_idField = db.GetObjectId(false, hn1, 0);
long ln2 = Convert.ToInt64(hFrom, 16);
if(ln2>0){
Handle hn2 = new Handle(ln2);
_idFrom = db.GetObjectId(false, hn2, 0);
}
long ln3 = Convert.ToInt64(hTo, 16);
if(ln3>0){
Handle hn3 = new Handle(ln3);
_idTo = db.GetObjectId(false, hn3, 0);
}
}
catch(Autodesk.AutoCAD.Runtime.Exception e)
{
return e.Message;
}
return "암호되지 않은 블로그 POST코드 테스트2";
}
public bool Modified(string hnd)
{
return true;
}
public bool Erased(string isErasing)
{
return true;
}
public bool Copied(string newId)
{
return true;
}
public bool Exit(string msg)
{
return true;
}
}
댓글 없음:
댓글 쓰기