manipulating headers / footers through API?

2006-01-13 Thread Jakob Fix
Niels, Rick, Hedley,

thanks for your respective replies.  The idea to update markers or
variables is interesting indeed.

On 12/01/06, hedley.finger at myob.com  wrote:
> Can you explain what the problem is and why you think it is necessary to
> write a plug-in to solve it?

Well, Hedley, it's not so much about *writing* a plugin, but about
integrating the functionality into an existing one.  We already have a
powerful API client for FrameMaker+SGML we've been using for a long
long time now (so people are used to it), mainly to add the
possibility to add structured cross-references to other files.

Up to now we, as administrators, had to modify the FrameMaker file
that contains the two cross-reference targets for the two footer
fields (date and short publication title). Now we're looking to unify
and centralize meta information for our publications in one place
which can easily be manipulated by our authors. Of course, this could
be a Frame document, but a text ini file feels more appropriate
somehow.

--
cheers,
Jakob.



manipulating headers / footers through API?

2006-01-12 Thread hedley.fin...@myob.com
Can you explain what the problem is and why you think it is necessary to 
write a plug-in to solve it?  There are many ways to skin the FrameMaker 
rabbit and there might be solution which can be implemented with FM's many 
devious capabilities and existing plug-ins.
--
Hedley Finger
Technical Communications Tools & Processes Specialist
MYOB Australia 
P.O. box 371   Blackburn VIC 3130   Australia
12 Wesley Court   Tally Ho Business Park   East Burwood VIC 3151 Australia

Tel. +61 3 9222 9992 x 7421,   Mob. (cell) +61 412 461 558

? MYOB Technology Pty Ltd 2005



manipulating headers / footers through API?

2006-01-11 Thread Jakob Fix
Hello,

I'm currently exploring the feasibility to modify/update what is
displayed in the running footer through an API client which reads
information from an initialization file, and updates the footer
accordingly, like this:

maker.ini
8<8<
[MyInitSection]
initfile = TestInit.ini

TestInit.ini
8<8<
[Publication1]
FooterCenter="DRAFT"
FooterBinding="January 2006"


Now, it can't be very hard to read these configuration settings from
within an API client.  However, what I'm currently struggling with is
how to access the footer of my document.  So far, I've found this:

FO_MasterPage
-> FP_PageFrame (which is a FO_UnanchoredFrame)
   -> FP_FirstGraphicInFrame and then
   -> FP_NextGraphicInFrame (apparently TextFrames are "graphics")
  -> use this object's objId with F_ApiGetText
  -> and then F_ApiDeleteText and F_ApiAddText

All this comes from reading the FDK reference and the FDK Guide. As I
said I'm investigating this because we may hire a programmer to do
this (and more), but I'm no C++ programmer myself, so testing out the
above would take me quite some time.

BTW, we're currently updating the information in the footer through
text insets located in a separate file (I guess that this may be your
first suggestion to "do it another way"), but we'd like to centralize
information like this in one easy-to-manage configuration text file
for each publication.

Thanks in advance.
--
cheers,
Jakob.



manipulating headers / footers through API?

2006-01-11 Thread Niels Fanøe
Hi Jakob,

Can't you manipulate the markers "Header/Footer $1" and "Header/Footer $2" 
instead, and just include those markers in the footer? 

I've made a FrameScript program that does this in order to create footers for 
an index, so I guess you can do that with the API. Might prove easier.

Best regards,
Niels

> -Original Message-
> From: framers-bounces+nfa=maconomy.dk at lists.frameusers.com 
> [mailto:framers-bounces+nfa=maconomy.dk at lists.frameusers.com] 
> On Behalf Of Jakob Fix
> Sent: 11. januar 2006 12:25
> To: Framers List
> Subject: manipulating headers / footers through API?
> 
> Hello,
> 
> I'm currently exploring the feasibility to modify/update what 
> is displayed in the running footer through an API client 
> which reads information from an initialization file, and 
> updates the footer accordingly, like this:
> 
> maker.ini
> 8<8<
> [MyInitSection]
> initfile = TestInit.ini
> 
> TestInit.ini
> 8<8<
> [Publication1]
> FooterCenter="DRAFT"
> FooterBinding="January 2006"
> 
> 
> Now, it can't be very hard to read these configuration 
> settings from within an API client.  However, what I'm 
> currently struggling with is how to access the footer of my 
> document.  So far, I've found this:
> 
> FO_MasterPage
> -> FP_PageFrame (which is a FO_UnanchoredFrame)
>-> FP_FirstGraphicInFrame and then
>-> FP_NextGraphicInFrame (apparently TextFrames are "graphics")
>   -> use this object's objId with F_ApiGetText
>   -> and then F_ApiDeleteText and F_ApiAddText
> 
> All this comes from reading the FDK reference and the FDK 
> Guide. As I said I'm investigating this because we may hire a 
> programmer to do this (and more), but I'm no C++ programmer 
> myself, so testing out the above would take me quite some time.
> 
> BTW, we're currently updating the information in the footer 
> through text insets located in a separate file (I guess that 
> this may be your first suggestion to "do it another way"), 
> but we'd like to centralize information like this in one 
> easy-to-manage configuration text file for each publication.
> 
> Thanks in advance.
> --
> cheers,
> Jakob.
> ___
> 
> 
> You are currently subscribed to Framers as NFA at maconomy.dk.
> 
> To unsubscribe send a blank email to
> framers-unsubscribe at lists.frameusers.com
> or visit 
> http://lists.frameusers.com/mailman/options/framers/nfa%40maconomy.dk
> 
> Send administrative questions to lisa at frameusers.com. Visit 
> http://www.frameusers.com/ for more resources and info.
> 



manipulating headers / footers through API?

2006-01-11 Thread Rick Quatro
Hi Jakob,

Instead of adding text to the footer directly, you can add variables to the 
footers. Then, use your API client to modify the variables' values.

You are right that text frames are graphics. The FDK has a function for 
determining if a graphic is a text frame, etc. Header/Footer text frames are 
untagged, that is, their flow name is a NULL string; you can use this to 
distinguish them from main flow text frames on the master pages.

You may find this easier to code with FrameScript rather than the FDK. 
FrameScript has functions for reading and writing INI files.

Rick Quatro
Carmen Publishing
585-659-8267
www.frameexpert.com


Hello,

I'm currently exploring the feasibility to modify/update what is
displayed in the running footer through an API client which reads
information from an initialization file, and updates the footer
accordingly, like this:

maker.ini
8<8<
[MyInitSection]
initfile = TestInit.ini

TestInit.ini
8<8<
[Publication1]
FooterCenter="DRAFT"
FooterBinding="January 2006"


Now, it can't be very hard to read these configuration settings from
within an API client.  However, what I'm currently struggling with is
how to access the footer of my document.  So far, I've found this:

FO_MasterPage
-> FP_PageFrame (which is a FO_UnanchoredFrame)
   -> FP_FirstGraphicInFrame and then
   -> FP_NextGraphicInFrame (apparently TextFrames are "graphics")
  -> use this object's objId with F_ApiGetText
  -> and then F_ApiDeleteText and F_ApiAddText

All this comes from reading the FDK reference and the FDK Guide. As I
said I'm investigating this because we may hire a programmer to do
this (and more), but I'm no C++ programmer myself, so testing out the
above would take me quite some time.

BTW, we're currently updating the information in the footer through
text insets located in a separate file (I guess that this may be your
first suggestion to "do it another way"), but we'd like to centralize
information like this in one easy-to-manage configuration text file
for each publication.

Thanks in advance.
--
cheers,
Jakob.
___