Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: EXploringEA on October 01, 2014, 02:14:22 am
-
Doing some testing exploring the capabilities of Scripts and the simple example provided in user guide
Session.Output "The square root of 9 is " & Maths.sqrt(9)
fails to work with "Object required: 'Maths'"
so checked case and other potential issues with typos but still same error.
User guide states that it is "inbuilt Maths object" so assume I don't need to install anything else or do I?
BTW: Does anybody have reference to details of scripting engines - whose are they? what documentation exist?
Thanks
-
Doesn't work for me either. The snippet from the help
Session.Output "2^10 = " & Maths.pow(2,10)raises an error. Using V11.
HELP: Various mathematical functions are available within the Script Editor, through the use of the inbuilt Maths object.
You can access the Maths object within the Script Editor by typing Maths followed by a period. The Intelli-sense feature displays a list of the available mathematical functions provided by the Cephes Mathematical Library. For example:
Session.Output "The square root of 9 is " & Maths.sqrt(9)
Session.Output "2^10 = " & Maths.pow(2,10)
q.
-
Which edition of EA are you running? The Maths object is not available in EA Corporate edition.
See "Math Support built into Script Engines" on the Compare Editions page:
http://www.sparxsystems.com/products/ea/compare-editions.html
-
OK, that restriction was not mentioned in the section of Help dealing with the Maths object. It is now, but it won't be seen until the next major release of EA.
-
Thanks - was using Corporate edition and wasn't aware of restriction. Good idea to mention in user guide as unlikely to go back and check sales info after the purchase. However, I know with my own developments how easy is to miss something.
BTW: Tested with a ultimate and works fine.
So back to EXploringEA :)
-
Me too. And yes: would not harm to mention the restriction in the help.
q.