개정판 e7770ee1
dev issue #1230 : edit coordinate correction
Change-Id: Iafc7c84c265dd0e1b92a37f0ab08328e92ca445c
DTI_PID/APIDConverter/Model/PlantItem/Document.cs | ||
---|---|---|
666 | 666 |
else if (rows[0]["DATA1"].ToString() == "SIGNAL") |
667 | 667 |
item.Aveva.Type = Type.Signal; |
668 | 668 |
} |
669 |
|
|
670 |
item.Aveva.Start_X = Math.Round(item.Aveva.Start_X); |
|
671 |
item.Aveva.Start_Y = Math.Round(item.Aveva.Start_Y); |
|
672 |
item.Aveva.End_X = Math.Round(item.Aveva.End_X); |
|
673 |
item.Aveva.End_Y = Math.Round(item.Aveva.End_Y); |
|
669 | 674 |
} |
670 | 675 |
else |
671 | 676 |
result = false; |
DTI_PID/APIDConverter/PIDCustomization.cs | ||
---|---|---|
408 | 408 |
[CommandMethod("TestS", Autodesk.AutoCAD.Runtime.CommandFlags.UsePickSet)] |
409 | 409 |
public static void TestSelection() |
410 | 410 |
{ |
411 |
Autodesk.AutoCAD.Interop.AcadApplication acadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication as Autodesk.AutoCAD.Interop.AcadApplication; |
|
412 |
AcadUtility acutil = (AcadUtility)acadApplication.ActiveDocument.Utility as AcadUtility; |
|
413 |
acutil.Prompt("HI"); |
|
414 |
//Thread tt = new Thread(AvevaThread.Test); |
|
415 |
//tt.IsBackground = true; |
|
416 |
//tt.Start(); |
|
417 |
|
|
418 |
Autodesk.AutoCAD.ApplicationServices.Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; |
|
419 |
Editor editor = acDoc.Editor; |
|
420 |
editor.PromptingForPoint += Editor_PromptingForPoint; |
|
421 |
} |
|
422 |
|
|
423 |
private static void Editor_PromptingForPoint(object sender, PromptPointOptionsEventArgs e) |
|
424 |
{ |
|
425 |
Autodesk.AutoCAD.ApplicationServices.Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; |
|
426 |
Editor editor = acDoc.Editor; |
|
427 |
editor.PromptingForPoint -= Editor_PromptingForPoint; |
|
428 |
|
|
429 |
Autodesk.AutoCAD.Interop.AcadApplication acadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication as Autodesk.AutoCAD.Interop.AcadApplication; |
|
430 |
AcadUtility acutil = (AcadUtility)acadApplication.ActiveDocument.Utility as AcadUtility; |
|
431 |
|
|
411 | 432 |
} |
412 | 433 |
|
413 | 434 |
[CommandMethod("PicTest", Autodesk.AutoCAD.Runtime.CommandFlags.UsePickSet)] |
DTI_PID/APIDConverter/Utils/AvevaThread.cs | ||
---|---|---|
272 | 272 |
|
273 | 273 |
return result; |
274 | 274 |
} |
275 |
|
|
276 |
public static void Test() |
|
277 |
{ |
|
278 |
while (true) |
|
279 |
{ |
|
280 |
Autodesk.AutoCAD.Interop.AcadApplication acadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication as Autodesk.AutoCAD.Interop.AcadApplication; |
|
281 |
Autodesk.AutoCAD.ApplicationServices.Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; |
|
282 |
Editor editor = acDoc.Editor; |
|
283 |
} |
|
284 |
} |
|
275 | 285 |
|
276 | 286 |
} |
277 | 287 |
} |
내보내기 Unified diff