John1951 Posted February 10, 2012 Share Posted February 10, 2012 Hello I need to be able to renumber a series of text objects, (all the text are numerals) I wrote some code that works if none of the text objects are erased. If I erase one of the text objects, the code still works, but if I erase another I get Run Time error Method Item of object IAcadSelectionSet failed. at this line in the code: Set returnObj = ssetObj.Item(i&) (i& is a valid number for the selection set) I noticed that ssetObj.Count remains equal to the original number of text objects before any where erased. I think that these erased or phantom objects are causing the code to crash. I get the text objects using a filter for Text. FilterType(0) = 0 FilterData(0) = "Text" ssetObj.SelectOnScreen FilterType, FilterData The example dwg has only the text that I am using to try the code, there are no other objects in the drawing. Any ideas? Thank you John Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.