Clear CadPixctureBox's Content

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Masoud
Posts: 13
Joined: 25 May 2022, 18:57

Clear CadPixctureBox's Content

Post by Masoud » 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();

support
Posts: 3253
Joined: 30 Mar 2005, 11:36
Contact:

Re: Clear CadPixctureBox's Content

Post by support » 26 May 2022, 11:48

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply