AutoCAD like selection style

Was this article helpful?
2 out of 2 found this helpful

Comments

10 comments
Date Votes
  • I follow this help, but i have and problem, can you help me.

    0
  • Hello, can you help me how to use this one in eyeshot 2020, i think that code is error.

     

    //IList<Entity> myEnts = Entities.CurrentBlockReference != null
                    //    ? Blocks[Entities.CurrentBlockReference.BlockName].Entities
                    //    : new List<Entity>(Entities);
    0
  • You can replace the code snippet with the following:

    EntityList myEnts = CurrentBlockReference != null
    ? Blocks[CurrentBlockReference.BlockName].Entities
    : Entities;

     

    0
  • I tried this but I am having the same issue as NGUYEN PHUONG LAM. The selections work, but the selection preview rectangle is shifted down by as shown in the gif above. Also, this only happens when displaying on laptop. When docked, the rectangles display correctly.

    0
  • Are you using a Text scaling different from 100% on the non-docked laptop?

    0
  • Are you referring to windows display scaling? Mine is set to 125%. Is there a way to adjust for this?

    0
  • Hi Timothy,

    we discussed this topic by ticket, but for future readers:

    In a previous version of the sample, MyDesign.DrawSelectionBox used to use ActualWidth/ActualHeight;
    however, one can now directly use the Size property instead of ActualWidth/ActualHeight properties in order to show the correct size, because it already considers the dpi scaling level:
     

    void DrawSelectionBox(System.Drawing.Point p1, System.Drawing.Point p2, Color transparentColor, bool drawBorder, bool dottedBorder)
    {
    //p1.Y = (int)(ActualHeight - p1.Y);
    //p2.Y = (int)(ActualHeight - p2.Y);
    p1.Y = (int)(Size.Height - p1.Y);
    p2.Y = (int)(Size.Height - p2.Y);

    // ...
    }
    0
  • Thanks for the article. I'm trying to expand it by filtering the selection by selectionFilterType, to allow only the selection of vertices or edges for example, but I'm having hard time to replace GetAllCrossingEntities/GetAllEnclosedEntities with something suitable.
    Would it be possible in some way? Any advice?

    0
  • Crossing or Enclosed selection is not possible with sub-items such as edges or vertices. Sub-items can only be selected using visible selection methods, such as GetAllVisibleItem.

    0
  • i want to change the selection color yellow  to red.how to do that??

    0

Please sign in to leave a comment.

Articles in this section