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.


Topics - EXploringEA

Pages: [1] 2
1
General Board / Creating / coding a c# windows application in EA
« on: September 19, 2018, 04:48:13 am »
Hi,

I have been exploring producing a C# Windows applications using EA, unfortunately the documentation seems a bit light in this area and hence I'd like to check with others who may have succeeded (or not)!

I have used the Model wizard to create a c# windows app.  It produces a package with form classes, with source code, project files, etc (all just copied a zip file), plus scripts.  So I can use the scripts to build and run the solution - OK. However, I am curious and want to check that I am not missing anything that can help beyond a trivial example.

So if, for example, I want to add more code to produce a real application, e.g. another dialog:-

1. Adding another form / class.
I create a diagram using Win32UI MDG for a dialog but it looks like I can only export a .rc file (c++) so no good (directly) for a c# project.  Therefore, I assume I need to create the 2 classes (assuming I want to view the form - which looks like I can only do in VS or similar) for my form and then type the code for the "form" and its "designer".  This means that it's only relationship to the EA screen design object will be a link (realisation) between these classes and the dialog.

2. Editing project/solution/resources
When adding classes there doesn't seem to be a mechanism to view/edit the project (and other) files to add a new class.  Hence I assume I need to edit these files (.csproj, .sln, .settings, assembly files) outside of EA.

The same issue exists when working on a class library (e.g. an EA Addin). I can produce and edit all the classes fine within EA however there doesn't appear to be a mechanism to create the project/settings/resource files?


So just to check.
  • Are my observations correct
  • Is the pattern just a "noddy" example, using predefined code without the potential for extension
  • EA doesn't provide support for coding a real c# windows application

Perhaps somebody who has done real code development of windows apps within EA may have some experience/comments on EA's capabilities that I have missed. Are there other development tools/addins besides VS / Sharpdevelop that are useful for code development with EA?

Many thanks
Adrian


2
Please forgive me if this is not considered the correct place for this post but I'm unsure how to let the AddIn developers who use my (free) EA Installation Inspector know that I'm working on a new "infrequent" release and keen to get any feature requests.

I have a page EA Inspector Development with some outline ideas and screenshots, with a link to download an evolving working development version.

So if you've found the EA Installation Inspector useful and would like some other functions do let me know.

Thanks

Adrian

3
Hello,

If a user has locked a package that contains elements with connectors, which only connect the elements in the package, should it be possible for another user, who does not have any editing rights to these items be able to delete the connector and its tags?

The documentation (see http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/team_support/lockingpackages.html) clearly states
  • "You can set the lock on the entire contents"  and
  • it applies to "Elements and/or diagrams in the Package"

Hence, I had assumed that this applies to relationships that are solely within the package.
If not perhaps you can advise.

BTW: I understand that if the element has a relationship to an element, outside of the package for which the user has access rights is different.
FYI: Tests were done using EA V13 bld 1310, where different users are able to delete both the connector and its tags of of packages controlled and fully locked by other users.

I have also outlined my scenario and search for workarounds in another post (see - http://www.sparxsystems.com/forums/smf/index.php/topic,38947.0.html)

In summary, can you confirm:
1. What the behaviour of EA should be? 
2. If the deletion is a feature of EA is their a recommended workaround to protect the integrity of our models?

Many thanks

Adrian

4
Hi

I've an interesting issue relating to connectors in locked packages.  Let me explain by example:

I have one user who creates a couple of components (A and B) and links them with a connector (C).  Both components and connectors have tags.
The package is fully locked.

Any user without rights to the locked area can create a diagram in their own area, add links of the components A & B to a diagram.  The conenctor(C) between them automatically appears.  All fine.

Next I try to modify the element and its tagged values - no can do, of course not there locked so behaviour as expected.  Fine.

Next I try to modify the tagged values on the connector - no problem, what I can edit tagged values and what's worse I can delete the tagged values!

However, on the positive side I cannot add any more relationships between components A & B since they are locked - EA picked that up.

So why the automation board for this issue, well and not to be outdone:

1. To prevent the deletion of the connector tagged values I use the EA_OnPreDeleteConnector event and using that can prevent the deletion based on checks made on ownership / groups obtained from the security tables.

2. To prevent the editing of tagged values, if ensure that I manage all tagged values in my addin using Predefined Structured Types of type AddinBroadcast I can intercept attempts to change the values and prevent an unauthorised user changing the value.  Although it places big restrictions are requires all tagged values to be known to the Addin - not ideal!

3. Then to prevent deletion of the connector tagged value... there isn't an event; all I really want is an event OnPreDeleteConnectorTaggedValue - Have I missed it?

One approach could be to use EA_OnContextItemChanged event to check when a connector is selected and whether it is between locked items and so will need protecting. If that is the case then I make a copy of all the tagged values, and if there is a change then use the EA_OnNotifyContextItemModified event to reinstate them.  Not an approach I like and not that confident that something could be missed, so just doesn't seem correct.

Anybody else had this issue and if so what approach worked/didn't work?

Thanks

Adrian








5
General Board / Unable to Obtain Table Information
« on: June 02, 2015, 04:50:27 am »
Started to check out the database builder.
Managed to set up connection and import schema all OK for access database. But then when I use the SQL Scratch Pad with simple SQL query e.g. SELECT * FROM t_authors

I get the message "Unable to Obtain Table Information" and no visible clues to what the error is.  I have tried various syntax changes as it states no pre-execution validate e.g. SELECT * FROM [t_authors] and making all caps but no clues on what's not working.

Seen in past post issues with ODBC drivers, but using 32-bit and that's all OK since the import worked OK; guess that's proof.

Anybody an idea of solution or where more information is logged that may help resolve.

Is there any more documentation on using the database builder than the single page in the CHM file?

Thanks



6
General Board / Prefix for launch button on files pages
« on: December 09, 2007, 09:35:22 am »
Hi all

Does anybody know where the prefix for the launch button within a files tab is set - by default it adds http - problem is I have several files I wish to link to that are on a secure server hence require the https prefix (or alternatively known in which case I can include full path myself).

Thanks

Adrian

7
General Board / EA aware consultants
« on: December 09, 2003, 02:15:26 pm »
Hi

I have been looking for consultants who are EA aware and have come up with a blank.  Is anybody aware of consultants - ideally based in UK - who are EA aware, have good VBA etc to work with the Automation Interface and ideally have a strong background in high level architecture modelling and requirements management.

Thanks

8
General Board / Importing requirements from Excel
« on: December 18, 2002, 03:28:28 pm »
Hi

I'm sure I saw something in a thread sometime ago about importing requirements from excel similar but can't seem to find it today.

I have a basic model into which I wish to add a lot of requirements that have been accumulated in an excel spreadsheet. So rather than cut and paste I would like to import them as requirement objects - both to save time & minimise errors!

Once in the model I can then sort them out into packages, etc.

Can it be done using VBA within Excel or do I need to write access code or ???

Any experience / ideas / examples of code to do this - Thanks

9
Bugs and Issues / Operation of TaggedValue HasAttributes fails
« on: July 08, 2015, 04:43:35 am »
I've been trying to use the taggedvalue methods such as HasAttributes (http://www.sparxsystems.com/enterprise_architect_user_guide/12/automation_and_scripting/taggedvalue.html), but have been getting EA error messages (code 0xc00ce556)  (also see post on automation forum -(http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1436032579) where you see that another experienced forum member has found the same issue with EA.

Tested with EA build 1214, corporate edition.  OS Windows 8.

  • Can you advise if there are any known issues with this method or the other TaggedValue methods?
  • What does the error message "Invalid at the top level of the document" mean?
  • Are there any preconditions/assumptions that could lead to an EA error message?  
  • Can you provide more details of what the error message means?  
If not, is there more information or examples of use available.

Many thanks



10
Hi,

Not sure I've seen this before, but when I make a call to Tagged Value HasAttributes method, I get an EA error dialog pop up - with error code 0xc00ce556 and description "Invalid at the top level of the document"

My code is checking a set of tagged values,  and I assume the error is because one of them is not a structured type;  is that a pre-condition for making this call?  may be implied but not clearly stated (and when I call Getlasterror it returns an empty string).  If this is the case, is there an easy way to determine if a tagged value is structured, other than making a search in t_propertytypes for all tagged values?

I assume I am correct that the taggedvalue attributes relate to the structure type properties or perhaps I've misunderstood something.  

BTW: Even with structured types I'm not getting the results I would expect - has anybody got this part of the api working reliably?

Any information would be welcome.

Thanks


11
Hello,

Don't ask the reason but its to do with purely exploring EA, so probably not a real use case, just fun.  I can't seem to find a mechanism for a script running within the native EA scriptcontrol (not one under our program control) to make a call to a running addin, in which we have written known public callable methods.

I guess the question really comes down to - can I find a reference to the current instance of AddIn's class library that is being used by EA, and then it should be possible.  I've tried various windows process inspections but not gone too far.  I guess with perseverance I can look for processes whose parents and EA, and try to find the correct instance, but so far not found the correct object.

I haven't seen anything on the forum but wondered if anybody had done this or had a slick solution, otherwise I'll go back to diving in to the engine room of windows :(

Thanks

Adrian

12
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




13
Automation Interface, Add-Ins and Tools / Event on reload project
« on: May 03, 2014, 06:00:55 am »
Hi guys

Have I missed something in the broadcast events, but can't see anything that is raised on a project reload - is there or any ideas?

Thanks

14
Automation Interface, Add-Ins and Tools / Access to user permission
« on: April 05, 2014, 06:49:39 am »
Hi

Does anybody know if there is a AI method to access user permissions
or at least get details of the group for the current user?

Reason being that I want to limit some actions to users who have administrator role in those instances where security is enabled for the current model.

Thanks

15
Hi guys

Today I got around to installing V11 Beta 2 and have done some tests with several add-ins - some work fine whilst others crash EA and in some cases this blue screens windows :o

Tried on 2 different systems and seems to be repeatable!

So me thinks:
  • Have the system requirements changed?
  • Have any of the existing automation apis changed? In some of my addins I use a fairly extensive set and it seems to be these addins that are crashing so I suspect a change somewhere.
  • Anybody similar experiences?
  • Anybody found any new documentation - I remember there was something on the forum or Sparx web site about some new functions but nothing more.

Fair to say it's early days still for V11 but would be nice to get my stuff up to date ready for users  8-)

Any clues before I see if I can find out anything from the dump.

Thanks

Pages: [1] 2