@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();
}