• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk MapGuide Developer

    Reply
    Active Member
    devcrowley
    Posts: 6
    Registered: ‎10-31-2011

    SaveMWF in VBscript refuses to save

    711 Views, 0 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!

     

     

    Please use plain text.