Autocad Map file still in use after import

Autocad Map file still in use after import

andrew_demerchant
Enthusiast Enthusiast
868 Views
5 Replies
Message 1 of 6

Autocad Map file still in use after import

andrew_demerchant
Enthusiast
Enthusiast

I'm able to import some shp files without any trouble...but for some reason, autocad is keeping the files open after the import, and I want to delete them. I've tried disposing and/or setting vars to nothing, but can't seem to get them released without closing Autocad completely. Anyone have any tips?

 

0 Likes
869 Views
5 Replies
Replies (5)
Message 2 of 6

fieldguy
Advisor
Advisor

They have to be removed from the attached drawing set.  You can check for .DWK files (lock). 

0 Likes
Message 3 of 6

fieldguy
Advisor
Advisor

Something like this.

 

if (prjModel.DrawingSet.AllDrawingsCount > 0)
                        while (prjModel.DrawingSet.AllDrawingsCount > 0)
                            prjModel.DrawingSet.DetachDrawing(0);

 

0 Likes
Message 4 of 6

andrew_demerchant
Enthusiast
Enthusiast
Thanks for the reply, but these shp files are imported, not attached...There are being brought in using an Autodesk.Gis.Map.HostMapApplicationServices.Application.Importer
0 Likes
Message 5 of 6

fieldguy
Advisor
Advisor

I see.  You could try posting in the Map 3D Developer forum.  Dcoumentation seems to be a bit scarce.

 

http://forums.autodesk.com/t5/autocad-map-3d-developer/bd-p/84

0 Likes
Message 6 of 6

andrew_demerchant
Enthusiast
Enthusiast
That's putting it lightly! Thanks - I'll try the Map 3D forum.
0 Likes