Book a Demo

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 - Daiim

Pages: 1 [2] 3 4
16
General Board / Re: DAO.Field [3036] / [3001] Error
« on: May 18, 2022, 08:11:29 pm »
So you are editing a long script (how long exactly?) in an .eap file and you are getting these error when trying to save the script?

Around 1.000 lines of code (incl. comments, empty lines), but using a bunch of includes of splitted libs. Doing further splits did not solve the issue.

There are a few things you can try:
- run a project integrity check
- Compact/repair your .eap
- Upgrade your model to Jet 4.0
  • Integrety check showed no issues.
  • Not shure how to compact/repair an .eap?
  • I've no rigths and options to do any changes on my environment.

But in the end you are trying to do a professional job with an amateur tool (.eap). The only proper solution is to switch to a real database and leave the kids toys for the kids.
It's like you're trying to build a house using plastic sandbox toys. Any building contractor worth his paycheck would flat-out refuse to do that and demand professional tools for the job.

So true. But my job is to do architecture with pen+paper (excel) and I do use the stuff I have to scale workload in my role. My requests have been denied for about a year now, so I've to use what I have, and do my best to change the common thinking about architectural work by showing and proving better approaches.

17
General Board / Re: DAO.Field [3036] / [3001] Error
« on: May 18, 2022, 07:13:02 pm »
Yeah, sorry - in this case I've to use a local file repository (eap, DB Version 4.01), and a Corporate Edition 14.1.1427.
I use a bunch of quite long jscript's to import data and do model validation, data integrity checks and artifact creation/update for the instance model.
Now, after adding a few more lines, EA complains with the Errors [3036] and [3001] telling me about argument errors (3001) and a full database (3036) when I try to save a file (any, no matter which).
The current size of the repository file is about 104MB, so far away from 2GB limit.

18
General Board / DAO.Field [3036] / [3001] Error
« on: May 18, 2022, 06:38:36 pm »
I'm using a local EAP repository file and use quite long JScript files for data import automation. I can not change this as it is set by the customer, so what can I do now?

19
Is there a way to load external libraries from inside EA scripting environment?

20
Thanks, Geert for your hint - close but simplier as I tried another apporach and read formatted text from notes. It points out, that it is html:
Quote
<u>And</u> a new Line. <a href="$inet://www.heise.de"><font color="#0000ff"><u>Links</u></font></a> are also possible.   

Sorrowly there are no newlines shown, but after playing around - no, it is not html, it is necessary to use a '\r\n' (carriage return + newline). Works fine now.

21
For EA.Attribute and other EA.element types I needed another version with exactly the same code but replacing  EA.Element with EA.Attribute. Could not find a way to generalise EA.Element and EA.Property!

If you're using a dynamic language as JScript/JavaScript you can do that. Take care, EA.Element is a type, EA.Attribute, EA.Connector, EA.Package  are different types from automation perspective.


Using C# you can use dynamic as parameter type for your object.

Example in JScript:
Code: [Select]
// holds for everything that has an TaggedValues collection
function addTaggedValue(object, tagName, tagValue) {
   if (typeof(object.TaggedValues) === 'undefined')
      return null;

   var tag = null;
   for (var index = 0; index < object.TaggedValues.Count; index++) {
      var candidate = object.TaggedValues.GetAt(index);
      if (candidate.Property == tagName) {
         tag = candidate;
         break;
      }   
  }
   if (tag == null) {
      tag = object.TaggedValues.AddNew(tagName, "");
   }
   tag.Value = tagValue;
   tag.Update();

   return tag;
}


22
What language?

In your example you are using "\t", not "\n"

Geert

Thank you for that hint - fixed it in the post.
I'm using JScript.

23
Hi there,

I try to set the text to an element notes property, but the "\n" linebreaks within the strings are simply ignored. Does anyone know how to do a linebreak? (More formatting tipps are welcome, too.)

That does not work as \n are ignored :/
Code: [Select]
var someElement as EA.Element;
someElement.Notes = "First text line.\nSecond text line.";

Thank you guys for helping me out!

Daiim

24
Thank you for this hint. This is a good point to start but it seems to be quite tough to implement with jscript, so I'll use the workaround for the first shot. Maybe I can find some time to figure out how to directly access the content with jscript later.


25
I'd guess database also is only updated when EA stores the diagram properties and that is earliest (if not explicitly saved) when the input field looses fokus. Or am I wrong?

I have had a couple of discussions with architects that wanted to know how to do versioning with EA. Maybe you can explain a bit deeper what you try to achive with your approach.
In these talks it always pointed out, that the understanding of modelling lagged some of these points:
  • Fact: diagrams are NOT part of your model
  • Case 1: visual changes (layout, colors, ..)
  • Case 2: diagram content changes (visualized artifacts/links)
  • Case 3: model changes via diagram (added/deleted artifacts links within model scope)
1) Changes within diagrams are reflected with the "Modified Date"
2) Changes within visualized model subsets can be reflected with the version number (this can be catched with events for adding/deleting diagram objects/links)
3) Changes within the model can be catched up with events for adding/deleting (model) artifacts/links. as changes to the model will change (in general) multiple diagrams, this case usually requires a higher versioning concept to track/restore changes for diagrams, e.g. baselining.


26
Hi everyone,

I try to access an embedded file (internal artifact) from code to read it's content. But sadly I can not find an approach how to do this.
The EA.Element has an property "IsInternalDocArtifact" but this is 'false' for my element. I also tried to access the "MiscData(0..)" property but got nothing.
The first approach was to acces the Files collection of the element but this is empty, too.

A workaround is to add it's content to a linked document but that seems to be confusing, as the file is opened via double click on the diagram element, so the data must be somewhere.

Any ideas?

Daniel


27
Do you refer to the first JOIN in context of t_connector relOne, t_connector relTwo?

Code: [Select]
SELECT objA.Name AS AName, objB.Name as BName, objC.Name CName
FROM (((t_connector relOne, t_connector relTwo
LEFT JOIN t_object objA ON (relOne.Start_Object_ID = objA.Object_ID AND relTwo.Start_Object_ID = objA.Object_ID))
LEFT JOIN t_object objB ON relOne.End_Object_ID = objB)
LEFT JOIN t_object objC ON relTwo.End_Object_ID = objC)
WHERE objA.Stereotype = 'ValueA' AND objB.Stereotype = 'ValueB' AND objC.Stereotype = 'ValueC'

So the query should be something like:

Code: [Select]
SELECT objA.Name AS AName, objB.Name as BName, objC.Name CName
FROM ((((t_connector relOne, t_connector relTwo
LEFT JOIN t_object objA ON relOne.Start_Object_ID = objA.Object_ID)
LEFT JOIN t_object objD ON relTwo.Start_Object_ID = objD.Object_ID)
LEFT JOIN t_object objB ON relOne.End_Object_ID = objB)
LEFT JOIN t_object objC ON relTwo.End_Object_ID = objC)
WHERE objA.ea_guid = objD.ea_guid AND objA.Stereotype = 'ValueA' AND objB.Stereotype = 'ValueB' AND objC.Stereotype = 'ValueC'

I've tried this one too, but also got complains about the JOIN syntax.

This query works, but object B and C are always the same, so the WHERE clause on stereotype does not work.
Code: [Select]
SELECT objA.Name AS AName, objB.Name as BName, objC.Name CName
FROM ((((t_connector rel
LEFT JOIN t_object objA ON rel.Start_Object_ID = objA.Object_ID)
LEFT JOIN t_object objD ON rel.Start_Object_ID = objD.Object_ID)
LEFT JOIN t_object objB ON rel.End_Object_ID = objB)
LEFT JOIN t_object objC ON rel.End_Object_ID = objC)
WHERE objA.ea_guid = objD.ea_guid AND objA.Stereotype = 'ValueA' AND objB.Stereotype = 'ValueB' AND objC.Stereotype = 'ValueC'


Database is an *.eap file repository.

28
Hi,

I try to query two neighbors of a node but EA complains about invalid JOIN statement. Can anyone help?

Code: [Select]
SELECT objA.Name AS AName, objB.Name as BName, objC.Name CName
FROM (((t_connector relOne, t_connector relTwo
LEFT JOIN t_object objA ON (relOne.Start_Object_ID = objA.Object_ID AND relTwo.Start_Object_ID = objA.Object_ID))
LEFT JOIN t_object objB ON relOne.End_Object_ID = objB)
LEFT JOIN t_object objC ON relTwo.End_Object_ID = objC)
WHERE objA.Stereotype = 'ValueA' AND objB.Stereotype = 'ValueB' AND objC.Stereotype = 'ValueC'

Any ideas? Thank you for your help.

29
General Board / Re: Port on report
« on: May 14, 2021, 08:13:44 am »
Embedded elements are in the same table as elements but linked with their parent_id to the element they are embedded within. Use an sql query to select the embedded element for an element with the placeholder #ELEMENTID# for your WHERE clause expression to select the right element. Maybe you should specify more filter criteria as ObjectType, Stereotype etc.

30
Working with models you should think more object oriented. Multiple addresses are not attributes of person but "related" with it. As a different address has its own identity (object) in your model, it is easy to associate the address with the person via a relation of your choice. That's the power of models - they are graphs! Think about two persons having the same address - in your model you just link the other person and avoid redundancy of information.

Pages: 1 [2] 3 4