Page 1 of 1

Dashed style lines view corrupted after drag (Editor Control)

Posted: 10 Oct 2021, 18:45
by AliHatam
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 :
Image

views corrupted state :
Image

yellow dashed style lines view corrupted and some lines disappears .

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 11 Oct 2021, 12:39
by support
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

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 11 Oct 2021, 17:14
by AliHatam
Hi
How I must implement rerendering after drag and drop ?
Has it an event ?

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 11 Oct 2021, 17:27
by support
CadPictBox.Invalidate()

This is the way to implement rerendering.

Regards
Andrei

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 11 Oct 2021, 18:22
by AliHatam
How I do it just after drag and drop ?

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 12 Oct 2021, 11:56
by support
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:
a216-e701-c402-4a07.png
a216-e701-c402-4a07.png (5.55 KiB) Viewed 4850 times
This is an example from the Editor demo, cadPictBox.Invalidate is called after selection clearing:
3194-e3b2-b1cb-ce3c.png
3194-e3b2-b1cb-ce3c.png (8.91 KiB) Viewed 4850 times
We hope this information will help.

Regards
Andrei

Re: Dashed style lines view corrupted after drag (Editor Control)

Posted: 01 Feb 2022, 11:04
by AliHatam
My problem solved by disabling snap feature in tool box .