Skip to content

Commit c73ac1b

Browse files
authored
Update README.md
1 parent be81eb2 commit c73ac1b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@ The library consists of the following modules:
2929

3030
## A Quick Look
3131

32-
You may write this elegant code with the code pack:
32+
You may write this elegant code with the code pack. Let's say you want a command to clean up all 0-length polylines.
3333

3434
```csharp
35-
/// <summary>
36-
/// Eliminate zero-length polylines
37-
/// </summary>
3835
[CommandMethod("PolyClean0", CommandFlags.UsePickSet)]
3936
public static void PolyClean0()
4037
{
@@ -52,7 +49,7 @@ public static void PolyClean0()
5249
}
5350
```
5451

55-
instead of the verbose version using original API:
52+
Crazy simple, right? Can you imagine how much extra code you would have to write using the original API:
5653

5754
```csharp
5855
[CommandMethod("PolyClean0_Old", CommandFlags.UsePickSet)]
@@ -61,9 +58,16 @@ public static void PolyClean0_Old()
6158
string message = "\nSelect polyline";
6259
string allowedType = "LWPOLYLINE";
6360
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
64-
PromptSelectionOptions opt = new PromptSelectionOptions { MessageForAdding = message };
61+
PromptSelectionOptions opt = new PromptSelectionOptions
62+
{
63+
MessageForAdding = message
64+
};
6565
ed.WriteMessage(message);
66-
SelectionFilter filter = new SelectionFilter(new TypedValue[] { new TypedValue(0, allowedType) });
66+
SelectionFilter filter = new SelectionFilter(
67+
new TypedValue[]
68+
{
69+
new TypedValue(0, allowedType)
70+
});
6771
PromptSelectionResult res = ed.GetSelection(opt, filter);
6872
if (res.Status != PromptStatus.OK)
6973
{

0 commit comments

Comments
 (0)