Hi Greg,

You can indeed invoke the structure generator/conversion table process
directly, without going through the menu path. The structure generator
is run by an API client, and this client is exposed through
ApiCallClient calls, which are possible through FrameScript. I believe
it's something like:

CallClient FrameClient ('clientname') Message('message') ReturnVal
(returnval)

...or something like that.  I don't use FrameScript.  Anyway, you can
send the structure generator a series of calls and it will be invoked
programmatically, rather than via the menu command.  I don't know if
the FrameScript documentation contains details about external calls to
the structure generator, and if it doesn't, you'll need to get the FDK
downloaded and read the Developer's Reference in the "Calling Clients
Shipped With FrameMaker" chapter.  One caveat - the messages in the dev
ref didn't work for me last time I tried, due to case and other errors. 
The book says "InputDocId", "RuleDocId", "OutputDocName", and
"GenerateDoc".  In my experience, I only got it to work with
"INPUTDOCID", "RULEDOCID", "OUTPUTDOCID, and "StructureDoc".  Maybe
case isn't that important - it's a tricky process to get working right,
and that's what I use now successfully.

For element validity, there are a host of element properties that deal
with invalidity. You could simply flag a document, or you could even do
something like produce a hyperlinked list of problem elements, all
automatically. The key is in traversing the element tree and checking
the element validation properties. Again, I don't use FrameScript, but
I would assume that these properties are available to you. They will
tell you all you need to know about structural validity.

Good luck
Russ


>> Message: 2
>> Date: Wed, 1 Feb 2006 05:22:40 -0800
>> From: "Typesetting" <typeset at goldeneraproductions.org>
>> Subject: FrameScript commands in Structured FM

>> Hi Framers,

>> I have a lot of unstructured docs and I have conversion table to convert
>> them to structured files.

>> I wrote a FrameScript, but there are two points that I would like to improve
>> on this, and I did not find any commands for these in the FrameScript
>> references:

>> 1. To get the conversion table, I only can do the Execute FC MenuCommand
>> ('SGStructureCurrentDoc') which brings me the window and then I have to
>> press OK. 

>> Is there a direct command that just does with specifying the file name?
>> Similar to importing EDDs or regular templates.

>> 2. Then when the conversion is done I see the structured view and I have to
>> visually look at it to see if the structure is valid. If there are elements
>> in red color, then I know that it is not valid, otherwise, yes.

>> I did not find any command for this. 

>> Is there a command that can say whether the structure is valid or not? Like
>> a document property that is true or false?

>> Best, Greg




Reply via email to