AutoCAD Map 3D Developer

Reply
Contributor
pwned555
Posts: 16
Registered: ‎12-19-2011
Message 1 of 2 (267 Views)

-mapexport losing my selection "0 object(s) of 0 selected, exported in 0 sec(s)

267 Views, 1 Replies
05-15-2012 07:47 AM

Hi, when I select some polygons and try to use -mapexport from the command line manually and programmatically it gives me "0 object(s) of 0 selected, exported in 0 sec(s).".

This is what I try to run programmatically (and the same thing from the command line)

 

docum.SendCommand("-mapexport" + vbCr + "shp" + vbCr + inFile + vbCr)

If isOverW Then
docum.SendCommand("O" + vbCr)
End If
docum.SendCommand("Y" + vbCr + "X:\Legends\Test.epf"+ ".epf" + vbCr + "S" + vbCr)
docum.SendCommand("P" + vbCr + "M" + vbCr + "last" + vbCr + vbCr + "*" + vbCr + "*" + vbCr + "N" + vbCr)
docum.SendCommand("P" + vbCr)


It is not an issue with my profile because I can use it with Map->Tools->Export->Shape. It seems like when I try to run the command the selections are lost and I'm not sure why.

I also get a problem when I try to select polygons and then go to Map->Tools->Export->Shape where they are lost there as well. However, if I select them again, import the same profile I am trying to use above and run it, it exports to a shape file correctly.

I have AutoCAD Map3D 2011 set to allow selections before command and it works for other commands

Any help would be appreciated, thanks.

ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 2 of 2 (259 Views)

Re: -mapexport losing my selection "0 object(s) of 0 selected, exported in

05-15-2012 10:47 PM in reply to: pwned555

Hi,

Did you try using UI tools and check if that works fine for your data?

I would suggest you to try the command line options and see the parameters it accepts and then use the same parameters in your code.

 

You might find the following topic useful to you :

 

http://adndevblog.typepad.com/infrastructure/2012/03/how-to-use-command-line-version-of-mapexport-fo...

 

Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community