Infrastructure Map Server Developer

Infrastructure Map Server Developer

Active Member
Posts: 6
Registered: ‎10-31-2011
Message 1 of 2 (813 Views)

SaveMWF in VBscript refuses to save

813 Views, 1 Replies
10-31-2011 09:39 AM

I'm trying to use the SaveMWF command in a VBA application.  I have a control called MapControl which is the MGmap ActiveX control.  It's able to load the maps up just fine, but it won't save to an MWF no matter what I try.  The error code returned is -5 (security violation) but I've tried saving it to numerous locations, including my temp files, without any success.


Here's the line I'm attempting to use to save the file:

MapControl.saveMWF("C:\\temp\\test.mwf", "")


I also tried:

Dim myMap As MGMap

Set myMap = MapControl

myMap.saveMWF("C:\\temp\\test.mwf", "")

msgbox myMap.getLastError.getCode    'Returns -5

Any ideas?  Thanks!



Valued Mentor
Posts: 422
Registered: ‎10-10-2003
Message 2 of 2 (19 Views)

Re: SaveMWF in VBscript refuses to save

11-02-2014 03:03 PM in reply to: devcrowley
Do you have a password on the MWF? You need to send it if you do.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.