Dashed style lines view corrupted after drag (Editor Control)
Moderators: SDS, support, admin
Dashed style lines view corrupted after drag (Editor Control)
Hi
We have strange problem with Editor control .
We draw a cad drawing on the editor (by code) and all thing is ok .
In the editor , when we drag the drawn image , some dashed style lines views become corrupted .
for example , if I click in spot A and drag or I click on element B, the corruption occurs . but if I click and drag in spot C nothing occurs and views stay OK.
Ok state :

views corrupted state :

yellow dashed style lines view corrupted and some lines disappears .
We have strange problem with Editor control .
We draw a cad drawing on the editor (by code) and all thing is ok .
In the editor , when we drag the drawn image , some dashed style lines views become corrupted .
for example , if I click in spot A and drag or I click on element B, the corruption occurs . but if I click and drag in spot C nothing occurs and views stay OK.
Ok state :

views corrupted state :

yellow dashed style lines view corrupted and some lines disappears .
Re: Dashed style lines view corrupted after drag (Editor Control)
Hello,
First of all please make sure that the drawing was created correctly, e. g. the Load and the GetSection methods were not omitted. You can see how to create entities correctly in the AddEntites demo of CAD .NET. Also please make sure that you do not forget to implement rerendering after drag and drop - CadPictBox.Invalidate().
If this does not help, please provide us the CAD drawing you're working with, the code you used to create this drawing and the exact version of the CAD .NET assembly (CADImport.dll) you're using. You can forward this information to our e-mail, e. g. to support@cadsofttools.com
Regards
Andrei
First of all please make sure that the drawing was created correctly, e. g. the Load and the GetSection methods were not omitted. You can see how to create entities correctly in the AddEntites demo of CAD .NET. Also please make sure that you do not forget to implement rerendering after drag and drop - CadPictBox.Invalidate().
If this does not help, please provide us the CAD drawing you're working with, the code you used to create this drawing and the exact version of the CAD .NET assembly (CADImport.dll) you're using. You can forward this information to our e-mail, e. g. to support@cadsofttools.com
Regards
Andrei
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Dashed style lines view corrupted after drag (Editor Control)
Hi
How I must implement rerendering after drag and drop ?
Has it an event ?
How I must implement rerendering after drag and drop ?
Has it an event ?
Re: Dashed style lines view corrupted after drag (Editor Control)
CadPictBox.Invalidate()
This is the way to implement rerendering.
Regards
Andrei
This is the way to implement rerendering.
Regards
Andrei
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Dashed style lines view corrupted after drag (Editor Control)
How I do it just after drag and drop ?
Re: Dashed style lines view corrupted after drag (Editor Control)
Ali
You just need to call cadPictBox.Invalidate
cadPictBox is an instance of the CADPictureBox control where the image is drawn. You can find out more on it
in our documentation:
https://cadsofttools.com/help/cadnet/index.html
You can find out more on the Invalidate method in the Windows Forms documentation, this method is not unique to CAD .NET:
https://docs.microsoft.com/en-us/dotnet ... esktop-5.0
Ultimately you can check the CAD .NET demos, this method is shown in any of them:
This is an example from the Editor demo, cadPictBox.Invalidate is called after selection clearing:
We hope this information will help.
Regards
Andrei
You just need to call cadPictBox.Invalidate
cadPictBox is an instance of the CADPictureBox control where the image is drawn. You can find out more on it
in our documentation:
https://cadsofttools.com/help/cadnet/index.html
You can find out more on the Invalidate method in the Windows Forms documentation, this method is not unique to CAD .NET:
https://docs.microsoft.com/en-us/dotnet ... esktop-5.0
Ultimately you can check the CAD .NET demos, this method is shown in any of them:
This is an example from the Editor demo, cadPictBox.Invalidate is called after selection clearing:
We hope this information will help.
Regards
Andrei
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Dashed style lines view corrupted after drag (Editor Control)
My problem solved by disabling snap feature in tool box .