Hi,
I 'm new to AutoCAD Map 3D programming and working through sample code in the Geospatial Platform Developer's Guide for AutoCAD Map 3D 2010. The example in chapter 3 doesn't work. The following line raises an error:
MgSelectionBase selection = currentMap.GetFeatureSelection();
The error is:
Error 1 'Autodesk.Gis.Map.Platform.AcMapMap' does not contain a definition for 'GetFeatureSelection' and no extension method 'GetFeatureSelection' accepting a first argument of type 'Autodesk.Gis.Map.Platform.AcMapMap' could be found (are you missing a using directive or an assembly reference?) C:\Temp\VStudio2010\GettingStarted\GettingStarted\Class1.cs 95 56 GettingStarted
According to the Developer's Guide I have to add a reference to AcMapApiMgd.dll to my solution in Visual Studio, but this dll can't be found on my workstation, so I've added C:\Program Files\AutoCAD Map 3D 2010\Autodesk.Map.Platform.dll.
I am using AutoCAD Map 3D 2010 and Visual Studio 2010 Express.
Any help would be appreciated.
Kind regards,
Willy
That documentation is definitely wrong there.
I'm guessing selection handling should be pretty similar to how it's done in MapGuide.
So try replacing this:
MgSelectionBase selection = currentMap.GetFeatureSelection();
With this:
MgSelectionBase selection = new AcMapSelection(currentMap);
- Jackie
Hi,
You did check the following ?
AcMapLayer:: SelectFeatures()
Does it help ?
Thanks,
Partha Sarkar
Autodesk Developer Network