The directory that comes up would either be the preset workspaces directory,
or the directory of the last file opened/saved.

In MapBasic Help File - Look up:
    FileOpenDlg()
    PathToFileName$()
     PathToDirectory$()
    FileSaveAsDlg ()
    Save  Workspace  As

sample code suggestion:

Global filename, path as String

SubButton1
filespec = FileOpenDlg( path ,  filename ,  ".WOR" ,  prompt )
filename = PathToFileName$( filespec )
path = PathToDirectory$( filespec )

SubButton3
filespec = FileSaveAsDlg ( path ,  filename,  ".WOR",  prompt )
Save  Workspace  As  filespec


SubAlternateButton3
Save  Workspace  As  path+filename

- Steve

On 1/20/06, Robert DeRubeis <[EMAIL PROTECTED]> wrote:
>
> Hi list,
>
> I have a mapbasic program I wrote with 3 seperate push buttons.  The first
> opens a dialog box to open a workspace.  The second closes a list of the
> old streetpro bottom portion of the hwy shields for every state that is no
> longer used, but referenced in the saved workspace.  The third button
> saves the workspace.
>
> My problem is in getting mapbasic to resave the current workspace.  I'm
> using the following command- Run menu command 109.  This has the correct
> workspace name that was opened up, but prompts the user to select save
> workspace and the directory where it is prompting to be saved in is not
> the correct directory where that workspace was opened.
>
> Is there a way to simply have the workspace saved to the same directory it
> was opened up in so that it overwrites the old workspace and no longer
> references the old streetpro tables?  I cannot define a certain directory
> for the workspaces to be saved because they are all in many different
> directories.
>
> I'm using v7.8 on winXP.
>
> Any help is appreciated.
>
> Thansk,
> Bob
>
>
>
>
> _______________________________________________
> MapInfo-L mailing list
> [email protected]
> http://www.directionsmag.com/mailman/listinfo/mapinfo-l
>
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to