-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCommands.cs
37 lines (32 loc) · 912 Bytes
/
Commands.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
#region Autodesk
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
#endregion
namespace AcadNet
{
public class Commands
{
[CommandMethod("Command1")]
public void DescLayerLines()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
List<Datas> list = Select.Lines();
if(list != null)
{
foreach (Datas x in list)
Mleader.Create(x.Position, x.Content);
ed.WriteMessage("\n" + list.Count + " Mleaders created.");
}
else
{
ed.WriteMessage("\nNo lines found!");
}
}
}
}