How to apply the Conversion Table of file FM.

I have a conversion table generated for a group of files that I am trying to structure. I want to be able to apply the conversion with Extendscript table. The script that I have does not save any file converted. I don't know why is it not save the file. I was under the impression that the "Structure Generator" should create the new file. If this incorrect.

Here is the code I am using.

var myFile = File.openDialog ("Select File to Convert"); 

var myCT = File.openDialog ("Select ConversionTable"); 
var CT = openFile (myCT.fsName, 0); 

applyConversionTable (myFile.fsName, CT) 
closeFile (CT); 

function applyConversionTable(fileName, CT){ 
    var doc= openFile (fileName, 0); 
    var name = fileName.replace(/[\w\.]+$/,"test.fm")  
    CallClient("Structure Generator", "InputDocId " + doc.id); 
    CallClient("Structure Generator", "RuleDocId " + CT.id); 
    CallClient("Structure Generator", "OutputDocName " + name); 
    CallClient("Structure Generator", "GenerateDoc"); 
    closeFile (doc); 
} 

function openFile( fileName, visible){ 
     
    var i = 0; 
    var doc = 0; 
     
    var openParams = GetOpenDefaultParams(); 
    var retParams = new PropVals(); 
     
    i = GetPropIndex(openParams, Constants.FS_AlertUserAboutFailure); 
    openParams[i].propVal.ival = false; 
    i = GetPropIndex(openParams, Constants.FS_MakeVisible); 
    openParams[i].propVal.ival = visible; 
    i = GetPropIndex(openParams, Constants.FS_FileIsOldVersion); 
    openParams[i].propVal.ival = Constants.FV_DoOK; 
    i = GetPropIndex(openParams, Constants.FS_FileIsInUse); 
    openParams[i].propVal.ival = Constants.FV_ResetLockAndContinue; 
    i = GetPropIndex(openParams, Constants.FS_FontChangedMetric); 
    openParams[i].propVal.ival = Constants.FV_DoOK; 
    i = GetPropIndex(openParams, Constants.FS_FontNotFoundInCatalog); 
    openParams[i].propVal.ival = Constants.FV_DoOK; 
    i = GetPropIndex(openParams, Constants.FS_FontNotFoundInDoc); 
    openParams[i].propVal.ival = Constants.FV_DoOK; 
    i = GetPropIndex(openParams, Constants.FS_RefFileNotFound); 
    openParams[i].propVal.ival = Constants.FV_AllowAllRefFilesUnFindable; 
     
    doc = Open(fileName, openParams, retParams); 
     
    if (doc.ObjectValid() ===1){ 
        doc.openedByScript = true; 
    } 
    else{ 
        PrintOpenStatus(retParams); 
    } 
    return doc 
} 

function closeFile(doc){ 
    Constants.FF_CLOSE_MODIFIED = 1; 
    var res = doc.Close(Constants.FF_CLOSE_MODIFIED); 
}

Ah, found the problem. I noticed this earlier, but do not think that it was important, it apparently. The other arguments must be all uppercase. Like this:

    CallClient ("Generator of Structure", "INPUTDOCID" + doc.id);
    CallClient ("Structure Generator", "RULEDOCID" + CT.id);
    CallClient ("Generator of Structure", "OUTPUTDOCNAME" + name);
    CallClient ("Structure Generator", "StructureDoc");

I tested it and it works for me. FWIW, I think that it is a poor quality of a client API feature otherwise very slippery.

Russ

Tags: Adobe FrameMaker

Similar Questions

  • How to apply the upload of a file that does not create an error in edit mode?

    Hello

    It seems rather simple, but maybe I'm missing something (hoping that I'm not)!

    We use the Apex 5.0.1, but I believe that this is the case for other versions as well. At least that which was already identified and fixed in the latest patch.

    Here's the scenario:

    1. we have a table EMP where we maintain details about employees.

    2. we have an EMP_FILES table where we maintain one or more document (s) of support for each employee.

    3 page P1 displays the details of the PMCS with an IR showing the list of documents associated with this employee. This page also has a button called "New Document" when you click on it, takes users to P2 where they can upload a new document. The IR has an 'Edit link ' who also takes users to P2 where they can modify the file information (such as comments, date expiration etc.) or replace an already the document with a new document.

    4. we need to force users to download a document, when they save it in P2, then the easiest option was to highlight ' required ' 'Yes' as shown below:

    5. This works very well for a 'New' file upload / insert features.

    6. when users click on edit link to access the P2 and if they do not want to replace an existing document with a new document, but want to update the rest of the file info (like comments, expiration date etc.), it throws errors illustrated below:

    7. to address this problem, we put 'Value required' on 'No' and check the length of the BLOB in DB trigger BEFORE INSERT or UPDATE, as shown below:

    CREATE OR REPLACE TRIGGER BEFORE INSERT or UPDATE ON Biu_files files FOR EACH ROW

    DECLARE

    BEGIN

    IF NVL () DBMS_LOB.getlength () : NEW.fle_contents ( ), 0 ) < = 0 THEN

    RAISE_APPLICATION_ERROR () -20000, 'Please make sure to download a file not empty'. );

    END IF;

    IF THE INSERTION

    IF : NEW.fle_id IS NULL THEN

    SELECT fle_id. NEXTVAL IN : NEW.fle_id FROM dual;

    END IF;

    ((: NEW.fle_created_by: = APEX_CUSTOM_AUTH.get_user ( ) to REPLACE NVL( ) , "person", USER (), USER ();

    : NEW.fle_created_dt: = SYSDATE;

    ELSIF UPDATE THEN

    ((: NEW.fle_modified_by: = APEX_CUSTOM_AUTH.get_user ( ) to REPLACE NVL( ) , "person", USER (), USER ();

    : NEW.fle_modified_dt: = SYSDATE;

    END IF;

    END;

    /

    SHOW the ERRORS;

    8. If I understand correctly, the file upload in the APEX is nothing other than an action of 'INSERT + UPDATE' in the same folder. For example when we upload the fresh file, it creates a record with EMPTY blob and immediately update the record with the contents of the blob. Thus, regardless of whether or not users select a file, it would raise an error as mark is right at the top of the trigger code.

    9 ok, well move this piece of code at the top to UPDATE section because we want to allow the insert 1 to cross. But the problem is... Download the second part of the APEX file, which is updated would happen only if there is a selected file. If there is no file selected, ONLY the INSERT is pretty good. Thus, within the section of UPDATED trigger validation would never run for a fresh download.

    If someone has encountered this? I can't imagine that we are the 1st :-). Happy to provide / discuss it further. Thank you in advance!

    Kannan Kumara says:

    It seems rather simple, but maybe I'm missing something (hoping that I'm not)!

    We use the Apex 5.0.1, but I believe that this is the case for other versions as well. At least that which was already identified and fixed in the latest patch.

    Here's the scenario:

    1. we have a table EMP where we maintain details about employees.

    2. we have an EMP_FILES table where we maintain one or more document (s) of support for each employee.

    3 page P1 displays the details of the PMCS with an IR showing the list of documents associated with this employee. This page also has a button called "New Document" when you click on it, takes users to P2 where they can upload a new document. The IR has an 'Edit link ' who also takes users to P2 where they can modify the file information (such as comments, date expiration etc.) or replace an already the document with a new document.

    4. we need to force users to download a document, when they save it in P2, then the easiest option was to highlight ' required ' 'Yes' as shown below:

    5. This works very well for a 'New' file upload / insert features.

    6. when users click on edit link to access the P2 and if they do not want to replace an existing document with a new document, but want to update the rest of the file info (like comments, expiration date etc.), it throws errors illustrated below:

    Set the validation property default value is required on file upload on No.element.

    Create a validation of Non Null point about to file download pages and subordinate, for example the button CREATE is clicked and the PK null line item. This will ensure that the validation is done only when you insert a new file and check the updates that do not involve a file upload to be accepted without error.

  • How to select the path to a file icon button to a table?

    I have a SYSTEM_PATHS table name. All physical access paths as 'where the forms of execution are located' or 'where performance reports are located' are stored in its ranks for example (C:\HRMS\FORMS\)
    I memorized the path of the icon files (.ico) inside. The forms of execution can take the path of the icons for the buttons of this table. And access the icon of the chosen path. I use forms 6i. Normally, I put the path of the icon files in the nerve to property of the button as (C:\HRMS\ICON\). But now, here, I don't have a path but its in the column of a table. How to select the path to a file icon button to a table using forms 6i?

    Hello Gul,

    have you tried

    set_item_property('Button name',ICON_FILENAME,);
    

    Concerning
    Marcus

  • How to change the extensions on several files with Windows 7?

    * Original title: Extentions

    How to change the extensions on several files with Windows 7?

    You hear no doubt, is that your movie software will only recognize certain types of image file formats.  If this is the case, you will need to reformat format files to any format PNG is recognizable by the software.

    Rather than we guess, please identify your «film» software

    Download and install IrfanView, which is a free utility for images.  http://www.IrfanView.com/

    IrfanView has the ability to read a great many formats of image files.  It can also convert image files formats.  And even better - for you - it can do all these things on a batch of files.

    As test, after I installed IrfanView, open one of your PNG files.  Now click on file > save as, and select the 'Save as Type' to be little matter the file type of your movie software will accept.  Save the file.  Make sure your movie software can accept the new file.

    Once you are convinced that you can modify files that you have in a format that you can use, use IrfanView

    File > Batch Conversion/Rename command.  If necessary, see IrfanView help on this topic.

  • How to apply a protection password pdf files?

    How to apply a protection password pdf files?  I have some financial documents that need security protection.

    Hi HH2Solutions

    Adobe Acrobat allows to apply the password for PDF files.

    Please visit: http://www.adobe.com/in/products/acrobat/pdf-file-password-permissions.html

  • How to apply the filter to a specific column condition, but not to the report?

    Hello

    I'm having a problem in the application of a filter to one of the column condition.
    I have a scheme with the table around 10 dimension tables and a fact. My requirement is to provide a count on the table of facts with associated with some other columns in the dimension tables.

    Lets consider a scenario with tables as sales (Fact), region (Dimension), Year (Dimension), Type of sale (Dimension).

    Now my requirement is to highlight the fields

    City (Region) - city
    Year-
    Sales Count (dirty table) - number of all sales of the fact table
    Sales Count (dirty table) - count of all sales of the fact which type of sale table is 'Cash'

    Here, my question is how to apply the filter condition of Sales Type = 'MONEY in' only on one of the Sales Count column that comes from the fact table. I want to be ordered for the fourth column, the filter condition.

    Can someone let me know how?

    Thank you

    You must do this:

    1) click the button column fx sales. (This procedure does than on fact, not attributes.0

    2) click on the filter button.

    (3) select the size of sales from the left Type "selection list."

    (4) in the filter window, enter CASH, and click OK.

    This will create one filter on sales 'use' size 'type sales' as the filter. It willl filter only to this column.

  • How to recover the deleted table

    Hai

    How to recover the deleted table

    the IMP log = = file tables =

    fromuser =' 'touser =' '
    are you new on s/n? (Sorry for the request this because you asked the steps to import a single table). If you read the docs of oracle, you would have not asked this question

    Kind regards
    Pavan
    http://pavandba.WordPress.com

  • How to apply the AUTOFILTER on interactive report.

    Hello

    I'll have a report / form based on assume that the table EMP

    Page1 - Interactive (report)
    Page 2 - form

    report query-> select * from EMP;

    1 has created a new employee P2_EMP ('ABC') on page 2 and SAVE the record.
    2. as soon as I save the record on page 2, the control returns to Page1 (Interactive report)
    3. on page 1, all the Archives of the employees are displayed.

    What I want to, whenever I create a new employee P2_EMP = 'ABC' and SAVE the record, control on Page1 (Report) but only recording with employee P2_EMP = 'ABC', should be displayed on page 1...

    HOW can I achieve., I mean how to apply the AUTOFILTER on Page1 (interactive report)

    Currently, I have to manually apply the FILTER on page 1 (employee = ABC), I want to avoid.

    Thank you
    Deepak

    Hi Deepak,

    Could you have another element to the 1 'P1_NEW_EMP' page, pass this back into your branch when control passes from Page 2 to Page 1 and then put it as a condition of your report.

     select * from EMP
    where (employee = :P1_NEW_EMP or  :P1_NEW_EMP = '');
    
  • How to prevent the creation of 15000 files for 300 MB each day Firefox

    Firefox creates files of 'file' in C:\Users\LeRicain\AppData\Local\Mozilla\Firefox\Profiles\dnm04rk5.default\cache2
    There are about 10,000 and 20,000 files I have to remove to get about 300 MB of space each day

    How to prevent the creation of these files in Firefox

    Here are the files from cache. Basically, it takes Web sites that access you a lot and records bits of them so they'll load faster the next time you visit them. FOR EXAMPLE if you visit Google.com much, Firefox will save some elements of this page in the cache so that the next time visit you Google.com, it will not have to re - download.

  • How to read the VI Analyzer config file?

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    Kaspar says:

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    If you have VI Analyzer installed, you can load the configuration file and look at the section select the Tests. There is a test for the maximum size of front under front-> User Interface. The default value is the resolution of the current monitor of the PC (including multiple monitors). You can change to the desired option.

  • How to read the color table in a subvi?

    How to read the color table in a subvi? Is it made by a reference to the table or with a global variable? For a better understanding of the problem, I added to vi. Run the "run.vi." I want to see

    the background color of the table "run.vi" in the subvi called "read color.vi".

    How can I do?

    Thanks in advance

    Norick

    pop up on the wire table refernece and establishes 'control '. Add this control to the icon of the sub - VI decision-making and then wire ref of the appellant to this Terminal VI so the calling VI move the ref to the Subvi.

    Ben

  • How to prolong the time that deleted files stay for me to see

    How to prolong the time that deleted files stay for me to see

    Original title: files deleted

    How to prolong the time that deleted files stay for me to see

    Hello

    You ask about the trash?

    Files remain in the Recycle Bin until you manually clear the location or you or someone else, manages the disk cleanup.

    If you do not ask the trash, please provide details.

    Don

  • How to configure the partition table for SSD?

    Drive: 32 GB SSD

    I accidentally delete without backup partition table information and would like to know how to put the partition table, I can access the tools of partition table, but do not know how to define.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Hello

    Thanks for posting your query in Microsoft Community.

    The SSD could be seen in the disk management window, and you could name and set up as another hard drive internal. To create a partition or volume on a hard disk, you must be logged in as an administrator, and there must be unallocated disk space or free space in an extended hard disk partition. To repartition your hard drive, please consult the following link and check if it helps.

    I can I repartition my hard disk?

    Additional information:

    Create a new Partition on a hard disk in Windows 7

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • How to apply the "Slate Pro Light" using CSS font?

    Hello

    Could you tell me how to apply the font of "Slate Pro Light" using CSS? I have not found a solution for the 'Light' slate Pro variation selection.

    Thank you.

    I usually use the definition of CSS of police-family at the following address on my html and body elements:

    font-family: "Slate Pro", Slate, "Myriad Pro", "BBAlpha Sans", Helvetica;
    

    Potentially adding "slate Pro Light" should do the trick. Alternatively, you could take advantage of the make-weight property when you need a lighter framework:

    font-weight: normal|bold|bolder|lighter|number|initial|inherit;
    

    In this case, lighter, might do the trick?

  • How to compress the data in binary file?

    See some games compressed into bin files and a program to extract these files, I don't know how to compress the game binary form files. I'm not a programmer not so no knowledge of coding, if you can tell me a software suitable for this sick work be grateful.

    I want to compress my games strongly and I noticed this binary format a high compression rate, so I want to compress my files in binary format using a program and extract them easily when necessary.

    Hello

    It doesn't really matter for good compression which is the output format, what matters is the method of compression used to compress.

    I tried some of them and the best compression I've seen is called LZMA2, it practically reduces a file size at least 10 times.

    What you can do to use this compression method is to download and install 7zip free http://www.7-zip.org/

    try to compress the original file (use to create the binary file with the extension BIN) with LZMA2 METHOD ULTRA (it's what we call in 7zip) and then compare the output with the binary size and you should see it is almost the same if they aren't better...

    How ever compression takes awhile.

Maybe you are looking for

  • Toolkit and remote sql server DB

    I have an application that creates a table and inserts the table entries (~ 15 fields of strings and numbers), it works properly when you speak to a local sql server express labview and the db toolkit.  I connect with a udl on windows7 64-bit file. 

  • Synchronization files, music does not appear

    So before that I had no problem syncing to the top of my music to my Sansa Fuze 8 GB, synchronize and music presented themselves. Everything was peachy. But then I got a new computer and I do not remember here what to install, but maybe I'm just wron

  • Wireless, but not wired...

    Hi, I just plugged my new Linksys WRT610n and configure settings wireless thanks to the manual installation. I tried using the disk as it insisted on the fact, but he told me the router is not connected. This disturbs me because I managed to connect

  • File scan-to-PC/does not work, everything else done

    Windows 8.1 Pro x 64 C310a all-in-one (fw TPI2CN1038BR (120910), (FW Patch 10)) Linksys E2500 (fw 1.0.0.7) The PC is connected by wire, the printer is wireless. (Band 2.4, mixed patterns of connection and security) PC is 192.1.1.100 printer 192.1.1.1

  • Could not open the link

    Links do not open when I click on them. Some give me the opportunity to open up when I right click and click open. This problem just started and don't know how to fix it? Please help because some important info that I need does not at all not even if