Skip to main content
Bubbly_Crystal0D4D
Participating Frequently
May 14, 2015
Question

Display tags of a frame document in an alert box using FDK

  • May 14, 2015
  • 3 replies
  • 531 views

Hi All,

I'am learning to use the fdk , wanted to know if its possible to get all the tags present in the active frame document can someone point me out to a function or a snippet to do this ? Lost in the sea of functions.Trying to generate the conversion table programatically.Any help is much much appreciated.Thanks in advance.

[Moved to Scripting forum by moderator]

This topic has been closed for replies.

3 replies

Legend
May 14, 2015

Apoorva, this is a reasonable task for an FDK client, but it is not for the beginner. You can get the first paragraph format with the following, where docId is a valid document F_ObjHandleT handle:

F_ObjHandleT pgfFmtId;

StringT pgfFmtName;

pgfFmtId = F_ApiGetId(FV_SessionId, docId, FP_FirstPgfFmtInDoc);

//then you can get the format name with:

pgfFmtName = F_ApiGetString(docId, pgfFmtId, FP_Name);

//then you can get the next format with:

pgfFmtName = F_ApiGetId(docId, pgfFmtId, FP_NextPgfFmtInDoc);

...but as I say, the full implementation of conversion table generation is a significant and complicated task. You really have to know a lot about a lot of FDK things.

I'll mention this... the GUI provides a function to do this already, StructureTools > Generate Conversion Table. Can you just use that? I think you should be able to invoke this programmatically as well, so maybe there is no need to reinvent the wheel here.

Russ

Bubbly_Crystal0D4D
Participating Frequently
May 14, 2015

Hi Russ,

Thanks a ton for the reply, however I did see another discussion your answer has been very useful here also.

Re: FDK - apply Conversion Table to document

But all i need is a program structure i cant get started with this since i do not know where to begin or which sample to look at , perhaps something like the ones in the samples directory of fdk , can you help me with the structure ?

Legend
May 15, 2015

Apoorva,

Do you have Visual C++ installed? This is your first step. You'll need VC++ 2010 for the latest versions of FM and the FDK. You can get VC++ 2010 Express for free that will compile an FDK client. Then, maybe open some of the FDK samples and begin to experiment. There is a big learning curve here if you have never worked in a development environment before.

You might consider ExtendScript instead. It is much easier for the beginner and it can do quite a lot. Consider getting some samples and playing around:

FrameMaker ExtendScript Samples - West Street Consulting

Russ

Inspiring
May 14, 2015

Hi,

You can have a look at a utility shared at ExtendScript of the Week: “Change Styles – (Para/Char/Table)” « TechComm Central by Adobe

You will get the desired code snippet to get a list of all tags from here.

Regards,

Anchal

FM Engineering

Bubbly_Crystal0D4D
Participating Frequently
May 14, 2015

Thank you so much Anchal , I'll take a look at this

Jeff_Coatsworth
Community Expert
Community Expert
May 14, 2015

Have a look over in the Scripting forum.