Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Aaron B

Pages: 1 2 [3] 4 5 ... 60
31
How is EA setup on your machine? Is it installed locally? What operating system are you running?

You mentioned "The script works fine in another environment". What other environment? Was this an installation of EA on another PC? Any differences you are aware of between these installations? What version of EA is installed? Is it the same as yours? Were they both installed the same way?

For example - if your EA was setup using the "Zero Configuration Client" method described on the following page, scripting will not work. See:
http://sparxsystems.com/enterprise_architect_user_guide/13.0/introduction/zero_config_support.html

32
Usage of println() would probably depend on the Javascript engine that you are using. The engine that EA uses is based on Mozilla SpiderMonkey (version 1.8 I think), which doesn't seem to know about this function.

The equivilent in EA would be to call Session.Output().  E.g. Session.Output("test");

If you like the style of having println() in your code though, you could just write a little wrapper function like this:

Code: [Select]
function println(message)
{
Session.Output(message);
}

33
Automation Interface, Add-Ins and Tools / Re: Connector Validation
« on: April 26, 2017, 11:19:19 am »
It's been a while since I last looked at it, but I'm pretty sure you can only initiate validation at the package level. Once the validation has initiated however you can then validate any diagrams, elements, etc within that package.

34
As Geert suggested, assign your value to StereotypeEx, not Stereotype.

Assigning values to Element.Stereotype intentionally does not overwrite existing stereotypes. If there is an existing stereotype on the element, then assigning a value to Stereotype will set that new value as the primary stereotype and the old value becomes a secondary stereotype.

Assigning to Element.StereotypeEx will overwrite any existing stereotypes on the element.

It's been that way for a very long time. (EA 6.5?)

35
General Board / Re: Change language of all elements of a package
« on: March 30, 2017, 12:15:42 pm »
In EA 13 - Configure > Model > Options > Source Code Engineering : Default Language for Code Generation.
http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_domains/code_generation_options.html

36
Hi Martin,

Unfortunately the help is referencing a version of MDG Link for DOORS that is still in development and not yet released, but there is an early (unsupported) pre-release version that we can provide to registered users. If you wish to get this download, please email support to request a link.

37
General Board / Re: New Cloud Services: Publishing Feature
« on: March 09, 2017, 03:09:25 pm »

38
In scripting just use stInternal, not EnumScenarioTestType.stInternal.  Enums such as this are defined in Local Scripts.EAConstants-JScript.

Code: [Select]
!INC Local Scripts.EAConstants-JScript
[...]
var test = stInternal;

Regarding your original problem, you need to pass the ElementGUID for the element that contains the scenarios, not the GUID of a specific scenario.  Using GUIDtoXML is also optional here - EA will recognize it either way.

Code: [Select]
Project.GenerateTestFromScenario(element.ElementGUID, stInternal);

39
You should be able to call ExpandEnvironmentStrings on the WScript.Shell object.
https://msdn.microsoft.com/en-us/library/dy8116cf(v=vs.84).aspx

Example:
Code: [Select]
'Expand Environment variables such as %TEMP% and %APPDATA%
function ExpandEnvironmentStrings(s)

dim WshShell, retval
retval = ""

set WshShell = CreateObject("WScript.Shell")
if not WshShell is nothing then
retval = WshShell.ExpandEnvironmentStrings(s)
end if

ExpandEnvironmentStrings = retval
end function

Session.Output(ExpandEnvironmentStrings("username=%username%"))

40
General Board / Re: Addition/subtraction in DLL templates ?
« on: February 27, 2017, 12:44:05 pm »
Hi Qal,

There are actually function macros available in the code gen / transformation templates for MATH_ADD, MATH_SUB and MATH_MULT.  Unfortunately they don't seem to be documented though.  We will look into getting the help updated.

MATH_ADD(x, y)
Returns the value of x+y.

MATH_MULT(x, y)
Returns the value of x*y.

MATH_SUB(x, y)
Returns the value of x-y.

Note: x and y for above parameters can be passed as either numerals or strings.  E.g. %MATH_ADD("10", "2")% returns 12.

41
Automation Interface, Add-Ins and Tools / Re: DOORS MDG
« on: February 15, 2017, 09:40:02 am »
Something I'm not getting trying to read the posts is whether the MDG link connects directly to the DOORS server, or through a local DOORS client. [...] Does using the MDG require a local DOORS client to work?

Yes, MDG Link for DOORS requires the DOORS Client.  Information is pulled via the API of the DOORS Client, it does not connect directly to the DOORS database.  To connect your DOORS module from EA, you need to have the DOORS client open and connected to your database, and have the specific module open that you want to connect with.

42
General Board / Re: Webinars
« on: February 01, 2017, 10:07:04 am »
There were also webinars in December and January.  You can find them here:
http://sparxsystems.com/resources/webinar/webinar-series.html

43
What are the strings you are returning for your menu items (particularly the root menu)?  Do any of them contain a hyphen at the beginning (indicating a submenu) followed by one or more spaces?

For example: We had a report from another user who was returning a string like "- My Menu" for their root menu.  For some reason the space following the hyphen was getting stripped by EA, which then failed on later comparison, resulting in no menu items getting displayed under EA 13.  Deleting the space after the hyphen resolved the problem.

If you are still having problems, please provide a copy of the code for your EA_GetMenuItems method so we can take a closer look.

44
Just to be clear though, the upcoming webinar is primarily focused on installation of Enterprise Architect itself under WINE.  I don't think it will be covering installation of keystore or cloud services (at least not as far as I know).

45
Root (Model) packages are a special case.  They do not have an associated Element class and will not have Tagged Values either.

Pages: 1 2 [3] 4 5 ... 60