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 - Simon M

Pages: 1 ... 391 392 [393] 394 395 ... 413
5881
Automation Interface, Add-Ins and Tools / Re: Get/Set properties
« on: February 22, 2008, 03:04:44 pm »
I remember that this is the case, and that it has come up before.

Unfortunately my memory fails me sometimes too and I can't remember why it's that way.  :-[

5882
The code templates don't have any counting capability.  The best suggestion I can make at the moment is to try using an addin call to get the attributes Pos value.

You can do this using EXEC_ADD_IN.  You can search for examples on this forum.  But I'll include another one here.

Example C#
Code: [Select]
public String AttPos(EA.Repository r, object args)
{
   Array p = (Array)args;
   String attGUID = (String)p.GetValue(0);
   EA.Attribute a = r.GetAttributeByGuid(attGUID);
   return a.Pos.ToString();
}

Example template
Code: [Select]
%EXEC_ADD_IN("MyAddinName", "AttPos", attGUID)%
Hope that helps.

5884
Automation Interface, Add-Ins and Tools / Re: Controlling source files
« on: February 19, 2008, 07:55:53 am »
Well, EA won't automatically set the filenames of a package to the same file.  However, if you set the filenames (either manually using the properties window Alt+1, or using automation) and do a package generation EA will generate all classes to the file.

5885
Automation Interface, Add-Ins and Tools / Re: Model Templates
« on: December 18, 2007, 12:59:38 pm »
As I said in my previous post.  Model templates will not be generated into an MDG technology file from an MTS file in the current build of EA.  The help says to add them into the MDG Technology file directly.

5886
Automation Interface, Add-Ins and Tools / Re: Model Templates
« on: December 12, 2007, 01:58:33 pm »
See http://www.sparxsystems.com.au/EAUserGuide/index.html?model_templates2.htm

This says that you need to add the model templates information directly to the technology file each time you generate.

The next version should support all features supported in a technology file in the mts file, but that isn't currently the case.  (So hold on to the mts file you as you just posted, because it will work soon.)

5887
Automation Interface, Add-Ins and Tools / Re: Refresh Object Browser
« on: March 19, 2007, 12:53:59 pm »
Try calling Repository.RefreshModelView().

5888
Quote
I think it's simply by setting the ParentID to the other package's ID.

Actually, ParentID relates to the object ID of another element.  PackageID is what you want to change to move an element to another package.  (You would then Refresh any collections that you have around that should either have the element removed or added.)

5889
Automation Interface, Add-Ins and Tools / Re: C++ #include behaviors
« on: December 09, 2007, 01:00:00 pm »
My guess is that the classifier for the parameter of type otherYYClass isn't set.

5890
The following should do it.  Note that I've made the transform references in the class and association source explicit.

Namespace
Code: [Select]
Package
{
 %TRANSFORM_CURRENT()%
 class
 {
   name="NewClass"
   %TRANSFORM_REFERENCE("PackageClass", packageGUID)%
 }
%list "Class"%
}


Class
Code: [Select]
Class
{
%TRANSFORM_CURRENT()%

%TRANSFORM_REFERENCE("Class", classGUID)%
}
Association
{
Source
{
%TRANSFORM_REFERENCE("Class", classGUID)%
}
Target
{
   %TRANSFORM_REFERENCE("PackageClass", packageGUID)%
}
}

5892
The actual method is linked to from a tagged value on the message.  The rest of that field that gives information about the operations is essentially a cached version.

5893
Make sure you're casting the result to AttributeTag not TaggedValue.

5894
I know that this issue was going the other way, but when upsizing to a mysql database note of the options is made, and the instructions for setting up an ODBC connection make it very clear.

http://www.sparxsystems.com.au/EAUserGuide/index.html?upsizingtomysql.htm
http://www.sparxsystems.com.au/EAUserGuide/index.html?setupmysqlodbcdriver.htm

5895
Automation Interface, Add-Ins and Tools / Re: Code Generation
« on: October 25, 2007, 12:56:42 pm »
Sorry, let me clarify further.

If you actually have a Generalization link to another class EA will execute the Linked Class Base template instead of the Class Base template, and that macro will be available.  If you don't have a generalization, but have a parent marked on the class it will use the Class Base template and you will need to use classBaseName.

Pages: 1 ... 391 392 [393] 394 395 ... 413