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:
It's the "additems" last line that bombs out. Anyone see what I'm doing wrong?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


Reply With Quote