How to create error red circles?

How to create error red circles?

jamalkhah
Contributor Contributor
707 Views
2 Replies
Message 1 of 3

How to create error red circles?

jamalkhah
Contributor
Contributor

Hi,

When we have errors while creating boundaries, the errors are displayed as a red circle. I wanted to know what kind of red circles are and how can I create them for other purposes?

Error Circles.jpg

 

0 Likes
Accepted solutions (1)
708 Views
2 Replies
Replies (2)
Message 2 of 3

hosneyalaa
Advisor
Advisor
Accepted solution

 

@jamalkhah 

hi

try code @Jeff_M 

 

/// https://forums.autodesk.com/t5/civil-3d-customization/example-c-code-to-temporarily-show-high-low-points-of-a/m-p/3272841

 showHighpoint(high);
 showLowpoint(low);
removeMarkers();



        private void showCircle(Point3d pt, int color)
        {
            //code to temporarily display a circle of the specified color. Uses a simple color index, 1-255.
            Vector3d v3d = new Vector3d(0, 0, 1); //this is the Normal of the object. May want to include code for use in UCS other than World
            double size = 10;//this is the radius of the circle. Adjust as desired, or, better yet, make this a ratio of the current screen size.
            Circle circle = new Circle(pt, v3d, size);
            m_mrkers.Add(circle);
            circle.ColorIndex = color;
            aGi.TransientManager.CurrentTransientManager.AddTransient(circle, aGi.TransientDrawingMode.DirectShortTerm, 128, intColl);
        }

        private void showHighpoint(Point3d pt)
        {
            showCircle(pt, 2); //add a yellow circle
        }


        private void showLowpoint(Point3d pt)
        {
            showCircle(pt, 3); //add a green circle
        }

        private void removeMarkers()
        {
            //remove them all when we are done....don't want screen clutter!
            for (int i = 0; i < m_mrkers.Count; i++)
            {
                aGi.TransientManager.CurrentTransientManager.EraseTransient(m_mrkers[i], intColl);
                m_mrkers[i].Dispose();
            }
            m_mrkers.Clear();
        }
Message 3 of 3

Anton_Huizinga
Advocate
Advocate

You can also register an event to the REGEN command which will call the RemoveMarkers().