Jump to content

Fastest way to delete entities from a drawing


abraxus

Recommended Posts

Fist of all, i'm really sorry for creating all these topics, but you guys are so helpful, it's hard not to use you as a valuable resource

 

is there a faster way to delete an array of entities that you have written code to collect than this?

 

    For nStart = 0 To UBound(remItem)
     remItem(nStart).Delete
   Next

 

maybe I should use a named selection set instead of an array to iterate?

 

because based on what ive read online, one still has to iterate the selection set and delete them one by one....

 

there are typically about 5 thousand items that need to be deleted, it takes less than a minute to do, but i want it to take less than a second

Link to comment
Share on other sites

in short, i am processing a selection set, using if/then logic, and building an array of entities, should i be creating a new selection set instead? and then just "Erasing" the selection set?

 

i'm so used to doing things with arrays as it is faster in most cases

Link to comment
Share on other sites

My guess, your current method is faster. But guesses are dubious. It might be worth setting up a test routine, especially if this is a recurring task. A near minute delay would become tiresome, and that knowledge would likely be useful for subsequent projects.

Link to comment
Share on other sites

My guess, your current method is faster. But guesses are dubious. It might be worth setting up a test routine, especially if this is a recurring task. A near minute delay would become tiresome, and that knowledge would likely be useful for subsequent projects.

 

could be very useful indeed. pleas Abraxus let us know

consider testing the "erase" method of the selectionset object also. this way you don't need to iterate through items. but at the end remember to delete the selectionset object itself

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...