Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to loop through DrawObjects, is there a way to identify a line vs. say text?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to loop through DrawObjects, is there a way to identify a line vs. say text?

    Im trying to identify drawn lines by doing this:

    foreach(DrawingTool dt in DrawObjects.ToList())
    {

    if(dt.GetType() == DrawingTools.Line) {
    //Do something
    else
    //Do something else
    }

    }

    This is not working, can anyone help me change the syntax to identify if the dt is a line?

    #2
    Hi ErikY, thanks for posting. The DrawingObjects list documentation has an example on how to properly cast the DrawObject type. See " Looping through the collection to find specific draw objects" on this page:



    Best regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    63 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    87 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    47 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    104 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    63 views
    0 likes
    Last Post PaulMohn  
    Working...
    X