Google Analytics

Wednesday, July 20, 2011

Some Arbortext Tips

As we work on some projects that require automation I find that one of the things that keeps you busy is learning new terminology.  For example,  I have a automated report that ti want to put out in Arbortext for out Technical Publications Team.

It should be easy enough to do.  We populate an .xml file and then if we could just invoke Arbortext from the command line, we could set it up to compose and print or whatever else we need.   Searched the help without success.

To the web. Arbortext has an active community but they tend to focus on slightly more advanced topics.  No real sources of real beginner stuff.

Eventually I found the solution by accident.  The biggest problem was the names that I use.  Command line arguments? Command line options? Were not right - or ate least not used by the Arbortext community.  So Startup Commands and Options is the term.  Now that I found it it is very easy to do what I need to.

I guess that this will get easier as I get more involved.

Anyway,  this has given me some idea where some good Arbortext web resources are.


Are some of my favorite.

By the way: that command that you can call from the command line to compose in batch mode:

"C:\Program Files (x86)\PTC\Arbortext Editor\bin\editor" -styler -C2 "$myparams['stylesheet']='stylesheetname.style'; $myparams['outputFile']='outfilename.pdf'; execute compose::compose_for_pdf(current_doc(),$myparams); exit" "filename.xml" 
 The key tricks are the use of single quotes and double quotes and using the execute call for the function.

3 comments:

  1. Hi Mark,

    Great thing to comment on and something that's obviously missing in the wiki documentation. Sometimes we take a good bit of knowledge for granted -- and this is no exception. Arbortext can be driven from the command line. I could probably be of more help if I had a better idea about exactly what you are trying to do.

    Cheers!

    Liz

    ReplyDelete
  2. Hi Liz,

    Actually what I was wanting to do was pretty simple. Compose in batch mode. I ran out of time to tine tune it so I ended up calling an interactive compose command:

    "editor.exe" -styler -stylesheet "stylesheet.style" -C2 "compose_pdf() ; exit" "file.xml"

    This was messy and not ideal but it got the job done.

    It would be neat to share ACL code for composing in batch mode. If I can find some time I will make a start at it.


    Mark

    ReplyDelete
  3. Hi Mark.

    I'm very pleased to see this command line but I'm a very, very beginner.
    I don't understand why the compose function batch mode is not embedded in the editor !
    It's crazy !
    I'm an author and I must open hundred files one by one to compose them !
    When I try to search a solution on the web, I found nothing or something which is not for non-programmer user.
    Could you give me some helps about the command you wrote ?
    Do you write, launch the command since the dos emulator (win xp: cmd.exe) ?
    Is it a script ?
    If you could help me...
    Best regards.
    Stephen.

    ReplyDelete