A non-ActiveX solution using P/Invoke is possible, but not
trivial. That is because the managed selection set is not
like the unmanged or 'native' selection set.
To do it, you must call acedSSGet() directly through P/Invoke,
and hadk the result buffer that you pass in to it, by calling the
ResultBuffer's UnmanagedObject.ToPointer() member. There
is example code posted here that shows how to do the latter.
You don't have to deal with the resulting ADS_NAME,
because if there is a selection set, it becomes the Previous
selection set and you can just use SelectPrevious to get the
managed counterpart.
I agree that binding to AutoCAD's type libraries is a problem
because of versioning, but there is a way to do late-binding
that does not require binding to any type library. You must
use reflection and System.Type.InvokeMember().
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
wrote in message news:4948509@discussion.autodesk.com...
Referring back to my original message:
"Selection Set with relational filter" posted on:
Aug/03/05 - 13:09 (EDT)
http://discussion.autodesk.com/thread.jspa?threadID=419571
I had kind of hoped this problem would have been addressed in Service Pack 1 for AutoCAD 2006, but it was not. Will this ever be fixed, or do I need to go with Tony Tanzillo's fix and reference AutoCAD ActiveX Libraries as well? I am trying to NOT have a reference to AutoCAD's ActiveX libraries at all.
If this problem will never be fixed could you (Autodesk) give us an example using P/Invoke?
Thanks,
CG
Oh yeah, Tony, thanks for your help.