AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No method GetFeatureSelection is found

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
571 Views, 2 Replies

No method GetFeatureSelection is found

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

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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

 

Message 3 of 3
Anonymous
in reply to: Anonymous

Hi,

 

You did check the following ?

 

AcMapLayer:: SelectFeatures()

 

 

Does it help ?

 

Thanks,

 

Partha Sarkar

Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost