New Member
Posts: 2
Registered: ‎07-01-2006
Message 1 of 1 (99 Views)

Selection Set lists one Entity multiple times!

99 Views, 0 Replies
07-01-2006 09:23 PM
Hi all,

I have a standalone .NET 2.0 application which uses the COM API to control AutoCAD. The application is written in Visual Studio 2005 in VB.NET.

While running this application the AcSelectionSet.Select(AcSelect.acSelectionSetAll, , , FiltType, FiltData) method is called to retrieve some entites from multiple AutoCAD drawings. The Filters are set to return only Block References, Mtext and Text entities, which they appear to do except...

...for some bizarre reason, the Selection Set returns containing three separate instances of one entity (Identical handle - the works) in amongst all the rest. The entity is a peice of AcDbText, yet there are other Dtext entities in the drawing which are only returned once as you would expect.
It appears to pick the entity up 3 times consecutively as each instance is consecutive with the next in the array.

I've looked very closely at the entity and its properties in AutoCAD but see nothing unusual about it.

Has any one else witnessed this behaviour? I don't know if this is peculiar to COM in .NET 2.0 as I haven't tried to reproduce this in any other language/environment.

This isn't a show stopper as I have put in a filter step to prevent the multiple instances from being persisted elsewhere in the application but it is a little unnerving as I only noticed it when fiddling around debugging something else.

It may be a corrupt entity possibly as saving this drawing out using SaveAs and then running the app on each instance shows it is the same entity in each that gets caught repeatedly.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!