Skip to main content
Participant
September 3, 2021
Question

How to set "userString" on tables and images in FrameMaker

  • September 3, 2021
  • 1 reply
  • 432 views

We are looking to set userString on tables and images in the FrameMaker tool and read the value of the userString for that object from the script to decide weather a table or figure should appear in landscapre or portrait orientation.

But we are unable to find a way to set the "userString" attribute for images and tables in FrameMaker.

Is there any other way to set some kind of hidden attibute to set the orientation for tables and images, so that we can read the value and set the object body page orientation accordingly?

Any help in this is much appreciated.

    This topic has been closed for replies.

    1 reply

    frameexpert
    Community Expert
    Community Expert
    September 3, 2021

    I think you are referring to the UserString property on most FrameMaker objects. This property is not exposed to the FrameMaker interface but you can set it via the FDK, ExtendScript, and FrameScript. Here is ExtendScript code to set the UserString property on the selected table. Note that property names in FrameMaker are case-sensitive. I tested this with FrameMaker 2020.

    #target framemaker
    
    var doc, tbl;
    
    doc = app.ActiveDoc;
    tbl = doc.SelectedTbl;
    
    tbl.UserString = "process";
    
    Participant
    September 6, 2021

    Thank you very much for your response.

    Is there any other way to set hidden values (some kind of unique value) for a table or image in the FrameMaker interface and leverage those values in the script to decide whether a table or figure should appear in landscape or portrait orientation?

    frameexpert
    Community Expert
    Community Expert
    September 7, 2021

    You could use a custom marker type and insert that somewhere in the table or anchored frame.