Original questions:

>I have over 200 layouts that I would like to convert to Adobe Acrobat and
>then have available to users on our intranet.
>
>1.  How do I convert/save layouts to pdf?
>2.  Can this be done in a batch?  If so, how?

Well, the answer to 1. was easy.  When you install Acrobat PDF Writer, it
"registers" itself as a printer.  Anytime you go File...Print, Adobe Acrobat
PDF Writer is available as a Printer in the dropdown list.  Choose it, and a
dialog box pops up asking you to name the file.  Simple enough.

For question 2., I have created a MapBasic app that does almost everything.
It uses a list of all the workspaces, processes for the filename, and starts
the Adobe print process.  However, I still have to hit Enter to "agree" to
the filename dialog box.

Is there a ANSI/ASCII keystroke to emulate the Enter key in MapBasic?  That
way, MB could zip through all the files with no input from the user.

The MB code is below signature.  I've run it on a 4 record test file and it
works.

Gerald Kornelsen
GIS Technologist
City of Winnipeg
Property Assessment Department


'****************
Include "C:\Mapinfo\Mapbasic\menu.def"
Include "C:\Mapinfo\Mapbasic\mapbasic.def"
Include "C:\Mapinfo\Mapbasic\icons.def"
'****************
Declare Sub main
'****************
Sub main

Dim     strFile, strFname as String,
        intWin_id, intRowcount, i as Integer

'**open a table which contains a list of all workspaces
'**  and get the number of rows
'** Each record is like this   D:\nca\nca_101.wor
Open Table "D:\pdf_\nca_list.TAB" Interactive
intRowcount = TableInfo("nca_test", TAB_INFO_NROWS)

For i = 1 to intRowcount
   select * from nca_list where rowid = i into select2

'**get the file name from the list file
   strFile = select2._col1
   strFname = Right$(strFile, 11)  '**get full file name
   strFname = Left$(strFname, 7)
'**remove the .wor so string is now like  nca_101

   run application strFile    '**open the worspace
   intWin_id = FrontWindow()     '**the Layout window

'**Set the title of the window to the file name, since Adobe
'**  uses the window name as the default filename
  Set Window intWin_id Title strFname
  PrintWin Window intWin_id  '**Adobe set as default printer

'**Open the list table again because each .wor has a
'**  Close All statement
  Open Table "D:\pdf_\nca_test.TAB" Interactive
Next

End Sub
'****************



_______________________________________________________________________
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.

Reply via email to