Peter You asked
> I am trying to automatically print the Application Directory (of the
current
> workspace) on a Layout from within a workspace.
>...when I try the following, the workspace opens ok but the directory does
> not appear
>
> Create Text
> Str$(ApplicationDirectory$())
> (1.1604,32.0389) (1.8535,32.1986)
> Font ("Arial",0,10,0)
The MapBasic 6 Help says this about ApplicationDirectory$()
<QUOTE>
By calling the ApplicationDirectory$( ) function from within a compiled
MapBasic application, you can determine the directory or folder from which
the application is running. If no application is running (e.g. if you call
the function by typing into the MapBasic window), ApplicationDirectory$( )
returns a null string.
</QUOTE>
So it looks like you're out of luck.
Why don't you ask Mapinfo Corp for an enhancement to MapInfo Pro for
Christmas :0)
Maybe like:
WorkspaceFileName$() Function
-------------------------------------------------
Purpose
------------
Returns a string containing the full file name of the most recently opened
workspace (WOR) file
Syntax
-----------
WorkspaceFileName$( )
Return Value
-----------------
String expression, representing a full file name including directory path.
Description
----------------
By calling the WorkspaceFileName$( ) function
a. from within a WOR file
b. from within a compiled MapBasic application, or
c. by typing into the MapBasic window
you can determine the full file name, including the directory path, of the
current or most recently opened workspace. If no workspace has been opened
since MapInfo was launched, the function returns a null string.
You open a workspace in MapInfo Pro by:
a. in the Quick Start dialog choosing one of the startup options: "Restore
previous session", "Open last used workspace", "Open a workspace" then
clicking OK
b. executing the File>Open Workspace... command
c. running a compiled MapBasic program containing a statement Run
Application < file> where <file> is a WOR file
d. by typing the statement Run Application < file> in the MapBasic window.
Regards
David M Haycraft
Information Analysis Associates Pty Ltd
A MapInfo Technology Partner
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.