Products

Home Forums eaDocX queries Using JScript or JavaScript from eaDocX

Home Forums eaDocX queries Using JScript or JavaScript from eaDocX

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9017
    Daniel Sherwood
    Participant

    Hi

    I am trying to use JScript or JavaScript in preference to VBScript for generating documentation, however I don’t seem to be able to get this to work. Using the following code as JScript or JavaScript:

    [code]!INC Local Scripts.EAConstants-JScript

    function main()
    {
    Session.Output(“Hello”);
    return “Hello”;
    }

    return main();[/code]

    Results in the following error messages…

    System[code].Runtime.InteroptServices.COMException (0x800A03F7): Unterminated string constant
    at MSScriptControl.ScriptControlClass.AddCode(String code)
    at eaDocXAddIn.EAScript.runUsing(Repository Repository, String ElementType, String ElementGuid, String HeadingLevel, String Param1, String Param2, String Param3)
    [/code]

    …from JScript, or…

    [code]Error running script ID: 4[/code]

    …from JavaScript.

    Please can you confirm that JScript and JavaScript should be supported from eaDocX and provide an example of how it should be used.

    Cheers

    Daniel Sherwood

    #9018
    eadocX Support
    Participant

    i don’t have any examples running with JavaScript, so I can’t say one way or the other.

    #9019
    Daniel Sherwood
    Participant

    Hi – thanks for your response. It appears that the issue is that for VBScript, eaDocX is expecting the ‘return’ value of the script to be stored in a variable with the same name as the script which is achieved as a by-product of setting the return value of the function before the end function call.

    JScript and JavaScript use a more traditional ‘return’ keyword to return data at the end of the function call which does not result in passing any information back to eaDocX. I presume this means that it is not possible to support JScript or JavaScript in eaDocX?

    If this is the case then I will continue using VBScript – but I’d suggest you make a note of this restriction in your documentation.

    Cheers

    Daniel

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Compare licence prices

Choose the licence that’s right for you and your team

Prices

Download a free trial

Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.

Download