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 - OpenIT Solutions

Pages: 1 ... 25 26 [27] 28 29 ... 32
391
Hi,

Just to confirm, something like:

theVariation = InputBox ("Please enter the variation", "", theElement.Name & "#")
            
Works when using VBScript in Sparx in all versions...so you could have your JScript call a VBScript as Helmut mentions or just re-write in VBScript...

Regards,

Jon.

392
Automation Interface, Add-Ins and Tools / Tagged Values
« on: July 11, 2014, 09:05:17 pm »
Hi,

Is it possible to specify that a given tagged value MUST have a value ? In my specific case as default will not suffice.

Also is it possible to specify that if a given tagged value is given a value then one or more other tag values must also be given a value ?

Regards,

Jon.

393
Text orientation - you will have to create a shape script or edit an existing one. To edit the existing BPMN shapescripts - import the BPMN 2.0 Technology.xml file found in Program File (x86)\Spark Systems\EA\MDG Technologies. Open the Resources tab, right click on MDG Technologies and select Import Technology. Then go to Settings->UML Types... You should find the imported BPMN stereotypes and associated shapescripts.

Hope this helps,

Jon.

394
Hi,

One you might want to add into your book qwerty - see response from Sparx re this:

Hello Jon,

Thank you for your enquiry.

Try using Repository.GetElementSet() instead of GetElementsByQuery.
GetElementSet supports loading of a collection of elements based upon a SQL query, and should observe any ORDER BY clause that is applied.

Example (JScript):

      var sql, i;
      var elements as EA.Collection;
      
      sql = "SELECT [...] FROM [...] WHERE [...] ORDER BY [...]";
      elements = Repository.GetElementSet(sql, 2);
      
      Repository.EnsureOutputVisible("Script");
      Session.Output("elements.Count=" + elements.Count);
      for (var i = 0; i < elements.Count; i++)
      {
            Session.Output("elements[" + i + "]=" + elements.GetAt(i).Name);
      }


This worked for me after i realised that Object_ID must be a column returned in the resultset....


Regards,


Jon.

395
OK - Do you know how i can get the RectLeft and RectTop coordinates from t_diagramobjects via the automation interface, ie i have a Diagram object, i can call Diagram.DiagramObjects, but this returns a collection of Elements....i need the rectleft and recttop in order to sort the collection ???

Any ideas ?

Thanks,

Jon.

396
Hi,

Your Model Search will need the CLASSGUID and CLASSTYPE columns, ie:

SELECT distinct t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.name, t_diagramobjects.RectLeft, t_diagramobjects.RectTop FROM t_object, t_diagramobjects, t_connector, t_diagramlinks
WHERE t_diagramobjects.Diagram_ID = '<Search Term>'
AND t_object.Object_ID = t_diagramobjects.Object_ID
AND t_object.Object_Type IN ('Activity')
AND t_connector.Stereotype = 'SequenceFlow'
AND (t_connector.Start_Object_ID = t_object.Object_ID OR t_connector.End_Object_ID = t_object.Object_ID)
AND t_connector.Connector_ID = t_diagramlinks.ConnectorID
AND t_diagramlinks.DiagramID = t_diagramobjects.Diagram_ID
ORDER BY t_diagramobjects.RectLeft ASC, t_diagramobjects.RectTop DESC

I then call Repository.GetElementsByQuery ("My Query Name", <diagram_id>). I'd expect the activities returned to be in the order returned by the SQL query - they are not !

Regards,

Jon.

397
Hi,

I'm using GetElementsByQuery. The query has an order by clause. However the collection returned by GetElementsByQuery is not using the same order.

(its not using TreePos and Pos is not avalible)...Any idea how i can force the ordering of the collection returned by GetElementsByQuery ?

Regards,

Jon.

398
Hi,

Solved this one. FYI we use a Template package - so the placement of the 'label' on the Template diagram overrode whatever i had in the script  :(.

Regards,

Jon.

399
Hi,

I'm struggling with a specific problem. I have a shapscript for a Gateway. I want to add a label under the gateway in the center. I've tried various combiniations of setorgin:

shape label
{
      setorigin("S",0,0);      
      if (HasTag("gatewayType","Inclusive")) {
            println ("ANY");
      }
      if (HasTag("gatewayType","Parallel")) {
            println ("AND");
      }
      if (HasTag("gatewayType","Exclusive")) {
            println ("OR");
      }                  
}

The lable always seems to pop up to left. Any idea what i'm doing wrong/missing ?

Regards,

Jon.

400
I found that if the statement didn't start with SELECT ... it would fail - so recursive queries in SQL Server for example...the solution we used was to create a VIEW on the SQL Server and issues simple SELCT against the VIEW from Sparx...

401
Hi,

Old topic but following advice here http://community.sparxsystems.com/tutorials/603-75ea-as-an-unattended-windows-service-on-windows-server-2008r2-and-higher doesn't seem to work for me.

A bit of a twist - which might be causing the issue - i've deployed an c# / .net 4+ app to IIS7 that uses the Sparx automation interface. All is fine when i'm logged on to the server - when i'm logged of users receive:

The server process could not be started because the configured identity is incorrect. Check the username and password.

From IIS. I appreciate that this isn't a Sparx issue - but has anyone got the automation interface running within IIS7 ?

Any hints / tips beyhond the guide referenced above ???

Regards,

Jon.

402
Automation Interface, Add-Ins and Tools / Re: Shape script: text color
« on: April 23, 2014, 02:15:23 am »
Hi,

Have you looked at template packages ? These can be used to set colour/font/font size etc of elements. Not helpful if your looking to deploy your mdg to third parties.

However i think you can also set things such as font/size/colour of an element in your mdg profile ... set as required on the mdg profile diagram and it will be added to the xml...


Regards,

Jon.

403
To find Elements by name you could also use  Repository.GetElementSet (<SQL>, 2);

i.e. Repository.GetElementSet ("SELECT * FROM t_object WHERE name LIKE '%" + name + "%'", 2);

It returns a collection of EA.Element.

404
The best quicklinker examples i have found are in the bpmn mdgs...have a look in the MDGTechnologies folder under your sparx install dir.

405
Its probably a PATH or CLASSPATH issue. Is Jenkins using the same JRE/Java instance ? Assume you have added eaapi.jar onto the classpath used by Jenkins and that SSJavaCOM.dll is on the PATH ? I typically just add the SSJavaCOM.dll to the bin folder of my JRE/Java runtime....

Pages: 1 ... 25 26 [27] 28 29 ... 32