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

Pages: 1 ... 697 698 [699] 700 701 ... 736
10471
I just verified that this isn't working here too. I'll dig a bit, but it looks like you should send a bug report to Sparx.

q.

[edit] It appears that setting the stereotype from the GUI creates an entry in t_xref which matches the profile settings. You obviously need to do that from your script too (below with ARCGIS Field Attribute):

XrefID -> arbitrary GUID
Name -> 'Stereotypes'
Type -> 'attribute property'
Description -> '@STEREO;Name=Field;FQName=ArcGIS::Field;@ENDSTEREO;'
Client -> ea_guid of the attribute

drain the rest in EA's kitchen synch...

10472
The problem is that once you add a tag manually the synch ignores it (Oh, it's already there). So if you need the right tag you must delete the wrong ones prior to the sync. I can't remember having heard of a force option with synch. With your code you should do the synch first and then retrieve the automatically created tag.

q.

10473
I'm not sure what you actually want to do. The tag guid is found with
Code: [Select]
Tag.PropertyGUID
q.

[edit] Maybe I got it. What you need is some extra information in t_xref where EA stores the relation to the according MDG. Not an easy one to make that work. Good luck...

[edit2] In order to investigate this, make an empty model and create one element from the MDG. Then have a look into t_xref and you will see what needs to be done. Creating an entry in t_xref is simple. Just create an arbitrary GUID for the primary key. Note that dealing with t_xref may corrupt your model unless you know what you're doing.

10474
You need to stick to the following for a synch:
EaPackage:
bool SynchProfile(stringProfile,stringStereotype) — Synchronizes Tagged Values and constraints of the UML Profile for Stereotype.
Returns True if the synch was successful. Otherwise returns False.

Checking for synched tags is not easy. First you need to know that profile-related tags have a unique prefix in their GUID. Unfortunately it is Sparx' secret how this is generated. You can find it out by inspecting an already existing GUIDs.

From my Inside EA book:
Quote
As mentioned above there’s some magic with GUIDs for tagged values that come from a MDG profile. These look exactly like ‘normal’ GUIDS:

{aaaaaaaa-aaaa-aaaa-bbbb-bbbbbbbbbbbb}

Here the a and b hex codes are not completely random. Only the b part is completely random, but the a part is a hash code computed individually per profile. The hash algorithm is internal to EA and unfortunately not known.

Sadly you can not find out easily that a synch has been performed. Just run the above method to be sure.

q.

10475
Automation Interface, Add-Ins and Tools / Re: Export diagrams to pictures
« on: November 27, 2012, 11:57:24 pm »
Use
Code: [Select]
PutDiagramImageToFile (
string Diagram GUID,
string FileName,
long Type)
from the project interface to save the image.

q.

10476
Automation Interface, Add-Ins and Tools / Re: automate baselines
« on: March 27, 2013, 03:22:38 am »
Well, if you had no driving license it would not make sense to sit besides you and tell which lever to move. You should go ahead and search for someone around that can do the job.

q.

10477
Automation Interface, Add-Ins and Tools / Re: automate baselines
« on: March 26, 2013, 11:26:11 pm »
Code: [Select]
use Win32::OLE;
$ea = Win32::OLE->new('EA.App') or die "oops\n";
$rep = $ea->Repository;
$rep->OpenFile ("C:\\Documents and Settings\\Administrator\\Desktop\\OCTest.eap");
$pIface = $ea->Project;
$GUID = $pIface->GUIDToXML ('{A130176C-559B-4937-A06E-7886D1A98D01}');
print $pIface->CreateBaseline ($GUID, '<version>', '<notes>');
$pIface->Exit ();
Adjust the Filename, GUID, version and notes and run the perl script from command line.

q.

10478
You might be interested in my book Inside EA. It contains also a cross reference from GUI to internal tables/columns you can query via standard UML.

q.

10479
The documentation does not tell anything along those lines. If EA crashes with ReloadDiagram it's simply a bug (to be reported).

q.

10480
Automation Interface, Add-Ins and Tools / Re: Objective-C
« on: March 20, 2013, 08:55:19 am »
Quote
Programming/debugging Objective-C on windows isn't the problem. You just can't use the Cocoa API on windows at all.

The GDB debugger help also describes how to connect to a remote computer. I don't see any reason why that couldn't be a mac (such as your vm host) that you can use the Cocoa libraries from.
The way you argue does not contain a statement "we will not implement it". Now I'm using OC a bit more for my personal projects. Indeed it would be nice to have an OC importer. Is there anything in the pipeline or should I write something for myself?

q.

10481
Automation Interface, Add-Ins and Tools / Re: Objective-C
« on: March 14, 2013, 08:32:20 pm »
If you manage to get that running, let us know. However, debugging Cocoa under XCODE is not that easy since Cocoa means user interface. It makes me shudder to think of a remote debug session for a user interface (which is the main reason for debugging, more than "usual" code).

q.

10482
Automation Interface, Add-Ins and Tools / Re: Objective-C
« on: March 12, 2013, 11:02:52 am »
You mean you're debugging Objective C code with EA? How do you do that? AFAIK OC only runs on a Mac. And EA is all windoze.

You're not the first to ask for OC support, but I guess they are glued to windoze. So far there was no reaction from any Sparxian.

q.

[eit] Just saw the reference to OC in the link you mentioned. That's likely an oversight from Sparx. Of course we debug OC with GDB, but in our Mac environment. Can't imagine the windozers will touch OC even with pliers.

10483
If you have Require User Lock to Edit EA holds the lock for the new element. So you should use RelaseUserLock() right after creating the element. Example in Perl:
Code: [Select]
my $pk = $rep->GetTreeSelectedObject();
$pk->ApplyUserLock();
my $e = $pk->Elements->AddNew ("test", "Class");
$e->Update();
$e->ReleaseUserLock();
$pk->ReleaseUserLock();

q.

10484
Typical EAUI. If you issue this very command via the GUI (Tools/Data Management/Project Transfer) the target must exist and will be overwritten. The API just creates a new EAP. Orthogonality?

I wonder what would happen if you transfer to a RDBMS instead of an EAP.

q.

[edit] Here's the help:
Quote
In automation, the target file [highlight]does not have to exist[/highlight]; the file path is enough. Enterprise Architect creates a new, empty Base.EAP file and transfers the source project into it.
Obviously this is wrong wording. It should read [highlight]must not exist[/highlight]

10485
My guess would be reason number two.

q.

Pages: 1 ... 697 698 [699] 700 701 ... 736