Appearently MapInfo has some trouble saving workspaces from MapBasic. You can prevent this error by saving your workspace thru a command string.
Try this: ... If logworkspace = true then strworkspace = filesaveasdlg("","","WOR","Save Workspace") If not strworkspace = "" then Run Command "save workspace as " & Chr$(34) & strworkspace & Chr$(34) End if End If ... This way to avoid the problems is also used when using the function to change paper size, printers etc. Maybe someone can explain why this gives these problems ? Peter ------------------------------------------------------------------------------------------------ Peter Horsbøll Møller, GIS Udviklingskonsulent / GIS-Developer Kampsax A/S - GIS Software & Solutions Rugaardsvej 55, 5000 Odense, DK tel: +45 6313 5013, dir:+45 6313 5008, fax: +45 6313 5090 mailto:[EMAIL PROTECTED] www.kampsax-gis.dk and www.kampsax.dk Authorized MapInfo Partner & Distributor in Denmark and Norway. ------------------------------------------------------------------------------------------------ Klik ind på http://www.kortal.dk og se det hele lidt fra oven! ----- Videresendt af Peter Møller/Kampsax - 01-05-2002 15:06 ----- Dan Irwin <danirwin@streetmanageme Til: "Mapinfo-L (E-mail)" <[EMAIL PROTECTED]> nt.org.uk> cc: Vedr.: MI-L MI-L: Saving workspaces through mapbasic 01-05-2002 12:44 Hi all, I'm having trouble saving a workspace at the end of a process which is run, with that oh so useful error message "Unable to save workspace". Now i know that the workspace can be saved because immeadiately after the message, the user can go to File>>Save Workspace and this works fine. Here is the code i'm using - could someone please advise: Dim strworkspace as string If commandinfo(CMD_INFO_DLG_OK) then If logworkspace = true then strworkspace = filesaveasdlg("","","WOR","Save Workspace") If not strworkspace = "" then save workspace as strworkspace End if End If If logerrorviewer = true then Run program "notepad.exe " + strlogfile End If If logsummaryviewer = true then run program "notepad.exe " End If End if TIA Daniel Irwin GIS Officer Transport for London Street Management Software Services - IS/IT Department 25 Eccleston Place London SW1P 1SB Tel: 020-7941-2316 ************************************************************************* The contents of the e-mail and any transmitted files are confidential and intended solely for the use of the individual or entity to whom they are addressed. Transport for London Street Management hereby excludes any warranty and any liability as to the quality or accuracy of the contents of this e-mail and any attached transmitted files. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please notify [EMAIL PROTECTED] This footnote also confirms that this email message has been swept for the presence of computer viruses. ************************************************************************* --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]