delete selectionset not working?

Discussion in 'AutoCAD' started by Mark Propst, Jul 31, 2003.

  1. Mark Propst

    Mark Propst Guest

    hi

    according to the help files:

    Delete

    The Delete method deletes a selection set and all items in the selection
    set. Neither the selection set, nor the items previously in the selection
    set will exist after a call to the Delete method.

    but in my code:

    'delete blocks
    blksel.Delete
    'why didn't that work?

    'this line will error saying the selection set was deleted
    ' dp "After deleting selection set count is still..." & blksel.Count

    'but if i fill it again with the same block that was just supposedly
    deleted,
    Set blksel = GetBlocksNamed(blkname)

    'they're back again
    dp "After deleting selection set count is still..." & blksel.Count
    'purge definition
    ThisDrawing.Blocks.Item(blkname).Delete

    'that line throws error - still ref'ed

    I get this in the immediate window

    After deleting selection set count is still...5

    and the purge line errors with That object referenced

    and the blocks weren't deleted

    is the help file in error or am I doing something wrong?

    tia

    Mark

    ps dp is debug.print
     
    Mark Propst, Jul 31, 2003
    #1
  2. ThisDrawing.Utility.GetEntity

    (see this? it is a nose.) <esg>

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Mark Propst" <mark-at-atreng-dot-com> wrote in message
    | I thought so, I ran an update to get the vla apropos thing happening,
    maybe
    | it's a different update...yep, that did it
    | thanks Mr. Bell!
    |
    | ...say, while we're on the subject of Selection...is there an equivalent
    to
    | (entsel)?
    | SelectOnScreen seems like (ssget)
    | I cant find any of the methods that allow a single object selection, am I
    | just blind?
    | Thanks again'
    | Mark
    |
    |
    | | > Ah! I have the updated docs for TuTu. Did you ever update yours? Mine
    | reads
    | > correctly, as posted.
    |
    |
    |
     
    R. Robert Bell, Jul 31, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.