Results 1 to 4 of 4

Thread: Selection Sets

  1. #1
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,005

    Default Selection Sets

    I am moving the insertion point of a large group of files due to a change in survey standards to NAD83. Most of the files have data in modelspace and a sheet/border in paperspace. If I make a selection set "selectall", it includes paper space. When I move the selected items, the paper space stuff moves with it. I would like to make a selection set of only model space items. I've been trying all morning, and I just can't get it right. Here's what I've come up with:


    Code:
     
    With ThisDrawing
    Dim Entity As AcadEntity
         Dim Sset As AcadSelectionSet
        Dim MSObjects() As AcadEntity
        ReDim MSObjects(.ModelSpace.Count)
        Set Sset = .SelectionSets.Add("Everything")
     
        Dim i As Long
        i = 0
        For Each Entity In .ModelSpace
            Set MSObjects(i) = Entity
            i = i + 1
        Next Entity
     
        Debug.Print UBound(MSObjects) 'this prints correctly
        Sset.AddItems MSObjects
    It's the "additems" last line that bombs out. Anyone see what I'm doing wrong?
    "everything you know is wrong...." -FST

  2. #2
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,215

    Default Re: Selection Sets

    Perhaps, problem is in this line:

    Code:
    ReDim MSObjects(.ModelSpace.Count - 1)
    ~'J'~
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

  3. #3
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,005

    Default Re: Selection Sets

    That was it!!!!!! I have an "option base 0" statement, so I should have known better, especially when I have other code that begins counting at 0.

    Thanks
    "everything you know is wrong...." -FST

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,215

    Default Re: Selection Sets

    Always glad to help
    Happy computing

    ~'J'~
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

Similar Threads

  1. Selection sets
    By garethace in forum DV - Tutorials
    Replies: 0
    Last Post: 2010-06-01, 09:46 AM
  2. Selection Sets
    By beamer in forum AutoCAD General
    Replies: 7
    Last Post: 2008-08-11, 12:04 PM
  3. Too many Selection Sets
    By ccowgill in forum AutoLISP
    Replies: 8
    Last Post: 2007-03-02, 02:03 PM
  4. Selection Sets
    By hostetterkl in forum AutoLISP
    Replies: 1
    Last Post: 2005-05-17, 07:43 PM
  5. Help relating to selection and selection sets
    By csgohjmj in forum AutoLISP
    Replies: 3
    Last Post: 2004-09-17, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •