Using EnvironmentVariables and ExportRootPath in user scripts

I found that the Page Images property had changed in FC11, from full path to the file name.
This troubles me because I need to export a field with a full path of the export image. To fulfill this request I should utilize
1) ExportRootPath in IProject
2) EnvironmentVariables(IProperties) in IProject

However, the default layer in user scripts is IRuleContext, I cannot find a way to look up the corresponding IProject object.
Can anyone suggest me a proper approach to these variables?

Была ли эта статья полезной?

Пользователи, считающие этот материал полезным: 0 из 0


Комментариев: 5

  • Avatar
    Herr Gerritsen
    Hello Stella,

    You can get to the Project properties by accessing the document, than the batch and finally the project.
    For example the get the Root Path you can use the following:

  • Avatar
    Alberto Torino
    Hello Stella,
    You can always have access to FCtools global object. Through it, you can access FCTools.ScriptContext.Project.ExportRootPath to find out the ExportRootPath and, FCTools.ScriptContext.Project.EnvironmentVariables.Get("MyEnvironmentVar") to get the value of "MyEnvironmentVar".
    Hope this helps.
  • Avatar
    Hi Willem & atorino,

    Really thanks & the problem is solved!

    Instead of "Context" in C# .Net, I change to "Me" in VBScript to avoid the escape sequence.

    I also tried the FCtools global object, it is very helpful.
  • Avatar


    Good Morning.

    I am new in ABBYY .

    Please help me on below requirements.

    There is a Vendor Level --> PO Level -->Invoice Level.

    Payment Terms Filed exists in all Stages I mean it will be available in VENDOR,PO and Invoice Level.

    My requirement is we need to get PAYMENT TERM Value from Vendor (If there is no PO DATA)and assign the value to Invoice level MEANWHILE Users can able to edit the payment term field in INVOICE Level if users wants to change with different value.

    If PO DATA Available we need to copy the PO Payment Term value to Invoice Level.

    Could you please help me out.

    Thanks and Regards,

    Nageshwar Reddy Porla.

  • Avatar
    Frank Delgado

    Hello Nageshwar,

    Please, create a new post rather than commenting on a non-related one.

    Regarding your request, it's hard to figure it out without a project and samples.
    In order to help you out, I've created a ticket for our Support team.
    We will continue the communication there.

    Thanks for understanding.


Войдите в службу, чтобы оставить комментарий.