Delete all entitys

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Megapit
Posts: 6
Joined: 31 Jul 2007, 11:25

Delete all entitys

Post by Megapit » 31 Jul 2007, 11:28

Hello Its my first post here in this forum and my english isn't so good. Sorry for that!

I code in VB.NEt and purchased the CadImport-Lib already. But I cont find a way, to delete all entitys with my programm. Can you please give me a hint?

Thanks !

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

Post by support » 31 Jul 2007, 14:31

Hello!

Please use the following code:

Code: Select all

<font color="blue">Private Sub</font id="blue"> btnDeleteAll_Click(<font color="blue">ByVal</font id="blue"> sender <font color="blue">As</font id="blue"> System.Object, <font color="blue">ByVal</font id="blue"> e <font color="blue">As</font id="blue"> System.EventArgs) <font color="blue">Handles</font id="blue"> btnDeleteAll.Click
    <font color="blue">Dim</font id="blue"> I <font color="blue">As Integer</font id="blue">

    <font color="blue">For</font id="blue"> I = FCADImage.CurrentLayout.Converter.GetCounts(ConvSection.Entities) - 1 <font color="blue">To</font id="blue"> 0 <font color="blue">Step</font id="blue"> -1
        FCADImage.Converter.Layouts(0).Entities.Remove(I)
    <font color="blue">Next</font id="blue"> I

    <font color="blue">Me</font id="blue">.cadPictBox.Invalidate()
<font color="blue">End Sub</font id="blue">
Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Megapit
Posts: 6
Joined: 31 Jul 2007, 11:25

Post by Megapit » 31 Jul 2007, 15:03

Thanks

Post Reply