Author Topic: How to Highlight list Pline is Square in the drawing?  (Read 11 times)

0 Members and 1 Guest are viewing this topic.

Sieu khung khiep

  • Mosquito
  • Posts: 5
Hi, I have searched for answers in many forums but have not found the answer yet.
This is the code I wrote, however my list pline have not been highlighted as expected

Code - [Select]
  1. Dim lstRec As New List (Of Polyline)
  2. Dim Prsel As PromptSelectionResult = ed.GetSelection (New PromptSelectionOptions () With {
  3.           .MessageForAdding = "Select Pline:"})
  5.   With cadTrans
  6.                  For Each ID As ObjectId In Prsel.Value.GetObjectIds
  7.                      Dim pli As Polyline = DirectCast (.GetObject (ID, OpenMode.ForRead), Polyline)
  8.                      If isSquare (pli) Then
  9.                          lstRec.Add (pli)
  10.                      End If
  11.                  next
  12. ...
  13. End with
  14.   ed.SetImpliedSelection (lstRec. [Select] (Function (ent) ent.ObjectId) .ToArray ()) 'from gile
  15. ed.regen
  16. ed.UpdateScreen ()
  17. 'Continue code...

I want only the pline is Square to be highlighted
Can you give me more instructions?
Thank for all.
« Last Edit: Today at 04:51:39 AM by Sieu khung khiep »