Page 1 of 1

Clear CadPixctureBox's Content

Posted: 25 May 2022, 19:03
by Masoud
Hello
How can I reset the entire cadimage environment?
In fact, I will delete all the drawn shapes and prepare the new environment for drawing
I used this methods but did not get the desired result

this.cadImage = new CADImage();
this.cadImage.InitialNewImage();
CADPictureBox.Invalidate();

Re: Clear CadPixctureBox's Content

Posted: 26 May 2022, 11:48
by support
Masoud wrote:
25 May 2022, 19:03
Hello
How can I reset the entire cadimage environment?
In fact, I will delete all the drawn shapes and prepare the new environment for drawing
I used this methods but did not get the desired result

this.cadImage = new CADImage();
this.cadImage.InitialNewImage();
CADPictureBox.Invalidate();
Hello,
You could clear all the data before creating new CADImage:
if(cadImage != null)
cadImage.Dispose();
Also, please, have a look at the Editor demo in the CAD .NET demo package. There you can find a code snippent on how to create a new file by clicking the button.
In addition, please, check the CADImage settings, e.g. the SetCADImageOptions() method.

Catherine.