Quinton,
This is an issue that Josh and I bumped up against while developing
Layers2PDF. The key concept to understand is the difference between an
object's "title" (the name that appears in the title window) and its
"handle" (the name that the program uses to distinguish between
objects). The title can be changed at any time, but the handle is set
permanently when the object is created; it would be extraordinarily
difficult to keep track of objects otherwise. And it is the handle,
not the title,that is being passed to the printer (PDFCreator).
There is no perfect solution to this issue, but here are a few ideas,
in increasing levels of complexity:
1) Upgrade to PDFCreator 0.9.5. It has a "counter" function that will
prevent each printed layout from overwriting the preceding printouts.
It just sticks "00000000001" on to the first filename, "00000000002"
to the second, and so on. You can create a good old DOS batchfile to
rename the files when it's done.
2) Create a new layout for each printout, and instead of using the GUI
to create the layouts, use GISDK. You mention having an automated
process, so I assume you are already using the DK. But for those
reading this message who do normally only use the menus, I want to
note that it doesn't take any programming knowledge to do this:
Step #1: Select "Tools... add-ins" from the menu bar.
Step #2: Select "GIS Developer's Kit" from the dialog box that pops up.
Step #3: Click the rightmost button on the toolbar that pops up (the
one with the lightning bolt).
Step #4: Paste 'CreateLayout("call the layout this", null)' (skip the
single quotes) into the "immediate execution" box, then click OK.
You will get a layout with "call the layout this" for both its title
and its handle; it will be set to the default printer, etc. just as if
you had selected "New...layout" within the nenu system. But PDFCreator
will create "call the layout this.pdf" instead of "Untitled.pdf"
3) Adopt the solution that we used for Layers2PDF
(http://www.directionsmag.com/files/index.php/view/750). Create a PDF
under the default name, have Maptitude pause while the file completes
printing, rename it to our desired name, and loop back to make the
next one. Since we released our code under GPLv3, you are free to
reuse snippets of our code in your own programs, just so long as you
do not sell said programs... in fact, the idea that bits of the code
might be useful to others was the rationale both for posting the code
instead of a compiled utility and for setting up the print/check
printing as its own macro, which Layers2PDF in turn calls as a
subroutine.
--- In [email protected], "qv.smith" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I really hope someone has come across this problem that I have.
>
> It seems that when you print a layout to PDF, Maptitude sends the
> layout name as the title rather than the title itself.
>
> The only way to set the layout name is with the CreateLayout() function
> (it would seem). Layout name = 'Untitled' when creating a layout
> through Maptitude even if you change the title and save your layout to
> disk.
>
> I'm creating layouts on the fly (automated process) and want PDF
> Creator to save file as RefNo.pdf (and not untitled.pdf).
>
> So if there is any function you know of to set the layout name or a
> patch that lets Maptitude send the actual title instead, please help.
>
> Thanks,
>
> Quinton
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Maptitude/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/Maptitude/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/