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 - Tony D

Pages: [1]
1
We have experienced issues where a script has not finished executing and is run a second time, the second instance overwrites execution of the first.  Sscripter.exe then hangs and the first instance never completes.

The following sample illustrates the fact.  You need to initiate execution of the second whilst the first is still progressing.

Does anyone have any ideas how to prevent this?

Code: [Select]
!INC Local Scripts.EAConstants-JScript

function ReportInfo( message )
{
Session.Output( "[INFO] " + message );
}


function expMultiInstance()
{
// Get the type of element selected in the Project Browser
var treeSelectedType = Repository.GetTreeSelectedItemType();

try
{
switch ( treeSelectedType )
{
case otElement :
{
for (var i=0; i <= 40; i++)
{
var theElement as EA.Element;
theElement = Repository.GetTreeSelectedObject();
ReportInfo("expMultiInstance: " + i);
}
break;
}

default:
{
// Error message
Session.Prompt( "This script does not support items of this type.", promptOK );
}
}
}
catch (err)
{
ReportInfo("expMultiInstance: **Caught exception Name: " + err.Name + ", Message: " + err.Message);
// throw(err);
}
}

expMultiInstance();

Here is the output (note execution interruption after #22):
Code: [Select]
[INFO] expMultiInstance: 0
[INFO] expMultiInstance: 1
[INFO] expMultiInstance: 2
[INFO] expMultiInstance: 3
[INFO] expMultiInstance: 4
[INFO] expMultiInstance: 5
[INFO] expMultiInstance: 6
[INFO] expMultiInstance: 7
[INFO] expMultiInstance: 8
[INFO] expMultiInstance: 9
[INFO] expMultiInstance: 10
[INFO] expMultiInstance: 11
[INFO] expMultiInstance: 12
[INFO] expMultiInstance: 13
[INFO] expMultiInstance: 14
[INFO] expMultiInstance: 15
[INFO] expMultiInstance: 16
[INFO] expMultiInstance: 17
[INFO] expMultiInstance: 18
[INFO] expMultiInstance: 19
[INFO] expMultiInstance: 20
[INFO] expMultiInstance: 21
[INFO] expMultiInstance: 22
[INFO] expMultiInstance: 0
[INFO] expMultiInstance: 1
[INFO] expMultiInstance: 2
[INFO] expMultiInstance: 3
[INFO] expMultiInstance: 4
[INFO] expMultiInstance: 5
[INFO] expMultiInstance: 6
[INFO] expMultiInstance: 7
[INFO] expMultiInstance: 8
[INFO] expMultiInstance: 9
[INFO] expMultiInstance: 10
[INFO] expMultiInstance: 11
[INFO] expMultiInstance: 12
[INFO] expMultiInstance: 13
[INFO] expMultiInstance: 14
[INFO] expMultiInstance: 15
[INFO] expMultiInstance: 16
[INFO] expMultiInstance: 17
[INFO] expMultiInstance: 18
[INFO] expMultiInstance: 19
[INFO] expMultiInstance: 20
[INFO] expMultiInstance: 21
[INFO] expMultiInstance: 22
[INFO] expMultiInstance: 23
[INFO] expMultiInstance: 24
[INFO] expMultiInstance: 25
[INFO] expMultiInstance: 26
[INFO] expMultiInstance: 27
[INFO] expMultiInstance: 28
[INFO] expMultiInstance: 29
[INFO] expMultiInstance: 30
[INFO] expMultiInstance: 31
[INFO] expMultiInstance: 32
[INFO] expMultiInstance: 33
[INFO] expMultiInstance: 34
[INFO] expMultiInstance: 35
[INFO] expMultiInstance: 36
[INFO] expMultiInstance: 37
[INFO] expMultiInstance: 38
[INFO] expMultiInstance: 39
[INFO] expMultiInstance: 40

2
General Board / Scripting - document generation - custom RTF Tables?
« on: January 25, 2016, 04:13:10 pm »
I am experimenting with the output of documentation from the scripting interface.  Does anyone know how to output a custom table so that is formatted appropriately in the RTF?
I've researched how to generate rtf table formatting, but cannot work out how to output this to a document.  I've tried docGenerator.InsertText with the actual RTF encoding, but this doesn't work.

I am doing this in an attempt to circumvent the issues experienced trying to generate a matrix via query (see my thread: http://sparxsystems.com/forums/smf/index.php?topic=30165).  But I am not having much success using this approach either.

3
Suggestions and Requests / Matrix Hyperlink - add Search Term
« on: January 20, 2016, 05:38:58 pm »
Could we please get the Relationship Matrix hyperlink capability extended to add the Search Term. 
So combine the following
$search://Name=Simple;Term=test
$matrix://profile_name
to
$matrix://Name=profile_name;Term=test

It seems there is very little control capabilities surrounding the Relationship Matrix.  I want to output a matrix of filtered objects into a document.  My objects are in different packages to the document (i.e. Use Cases in Use Case Model package, Components in Component Model package, and each document is in a separate package which contains the related views). 

At least with the Model Search on Relationship Matrix I can see the relevant matrix and output it for each document.  I am trying to automate this as much as possible and thought hyperlinks would resolve it.  However I need to manually change the Search Criteria everytime I open it.  If you added the Search Term to the Hyperlink, I could have a bunch of hyperlinks which could allow me to output the different matrices with less chance of error.

4
General Board / Re: Execute SQL Stored Procedure
« on: January 20, 2016, 04:59:20 pm »
Thanks Geert
I have tried, but haven't been successful as yet (am currently investigating execution from script).

Regarding the Package ID/Name - I was intending on using the Package (ID) macro.

I have since had some success filtering the Relationship Matrix to retrieve the desired results by adding some Tagged Values for the required Elements.  I've done this by filtering on the Tagged Value. 

However now I run into issues that I cant export a specific Relationship Matrix in a document. 

Anyone had much luck documenting Relationship Matrix?  What do you do when elements come from different Packages?

5
General Board / Execute SQL Stored Procedure
« on: January 20, 2016, 12:25:27 pm »
I have a complex query which creates a dynamic pivot table to retrieve a matrix (similar to relationship matrix).  I have created this as a stored procedure in the DB, with an input parameter of Package Name. 

Can I execute a stored procedure from the SQL query/search?  I would then want to extend this to a Template fragment if possible, to include the results in a document. 


My ultimate objective is to provide a document per Package, with a cutdown matrix of Use Cases to realising Components that is relevant to the Package.  Note the Components and Use Cases live in separate Packages, so I have included them on a specific diagram within the Package to determine which UCs/Components are relevant for export.

6
Suggestions and Requests / Re: Network Models (AUSDAF compliance)
« on: January 15, 2015, 05:24:13 pm »
Thanks Uffe.  I appreciate your response.

7
Suggestions and Requests / Network Models (AUSDAF compliance)
« on: January 13, 2015, 01:42:43 pm »
We have a need to produce Conceptual, Logical and Physical Network Models in accordance with AUSDAF 2 NetV-1, NetV-2 and NetV-3 Views.  

Are there any plans to produce a UPDM MDG Technology that supports AUSDAF 2?

Are there any model templates that provide Network related Elements?

Pages: [1]