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

Pages: [1] 2 3
1
General Board / How to apply changes to Project Browser Script
« on: April 03, 2014, 08:21:41 pm »
I have a project browser script that allows me to do text search and replace within a package tree.

Now I try to add some features, but the changes I make to the script are never used.
I can add message boxes, and never see them.
I can add syntax errors, and the script still runs and shows it's old behavior.
I can rename the script, see the new name in the context menu, but the old script is still run

What do I need to do so EA will run the script as I see it in the script editor?

(EA 9.3)

2
General Board / How to advise EA of diagram change
« on: September 26, 2013, 10:49:10 pm »
I have a script that does string replacement within a package.

I am able to change the name of the diagram, with the following code:

Code: [Select]
   
If InStr(obj.Name, fromString) > 0 Then
    obj.Name = Replace(obj.Name, fromString, toString)
    modified = True
End If

For elements, I then call Repository.AdviseElementChange.
But what do I call for diagrams?

Thing is, the diagram is renamed, but the project browser is not updated.

(EA 9.3.935)

3
General Board / Cannot move lifeline element vertically
« on: February 18, 2013, 08:40:24 pm »
I would like to create a sequence diagram with an introductory note on top.

However, I find myself unable to move the lifelines downwards to make room for that note. They seem stuck to a certain vertical position.

I tried mouse, cursor keys (with all modifiers), single-select, multi-select...nothing works.  :(

Any suggestions? (EA 9.3.935)

4
General Board / How to edit attributes in script?
« on: November 07, 2012, 07:18:29 pm »
I have a script that will recursively perform a "search and replace" for all elements of a package. It currently replaces in names, notes and filenames.

Now I would like to extend the script so it also replaces in attributes and operations of classes. But how do I edit attributes of a class within a script?

The description of the "Attributes" collection in class says it's "Read-only". It also says to "use the AddNew and Delete functions to manage attributes", but that doesn't make much sense on a read-only collection. And I didn't find the corresponding methods on the "class element" level.

Any ideas?

5
General Board / How do I turn off "help in browser"?
« on: October 01, 2012, 06:33:33 pm »
When I press F1 once, help opens inside a kind of browser window that overlays exactly what I want to get help about.

How do I turn off this behavior, and instead open help always using the separate help window?

6
General Board / How to check for object type within script?
« on: September 25, 2012, 09:43:01 pm »
I would like to extend an existing and working "replace name in package" script to also replace the string in the code generation filename.

Naturally, not all objects the script might encounter have the corresponding GenFile property. How do I check whether an object has the property, so the script does not run into an error?

I have tried the following:

Code: [Select]
     'replace string in Filename
      If (obj.ObjectType = otElement) Then
            If InStr(obj.GenFile, LCase(fromString)) > 0 Then
               obj.GenFile = Replace(obj.GenFile, LCase(fromString), LCase(toString))
               modified = True
            End If
      End If

However, I get the error: "Variable undefined: otElement"

Ideas?

7
General Board / Cross-linked notes?!?
« on: August 21, 2012, 06:05:52 pm »
I had a note with a pretty long text. Copied the whole note to a different diagram, and edited it, removing most of the text.
Then went back to my original diagram, and the text there was changed too! Undo didn't work either.

Is this intended behavior?

Edit: Version 9.2 (921)

8
General Board / Copy & Paste elements including formatting?
« on: June 01, 2011, 05:39:17 pm »
How do I copy and paste several classes from one diagram to another, so that the layout, size and relative position of those elements towards each other is maintained?

9
General Board / Synchronize with code: How to specify filename?
« on: November 09, 2011, 02:20:09 am »
I want to synchronize a class I have originally generated with EA. However, I have since changed the filename.

How do I update the filename in EA, so synchronization works again?

10
General Board / Synchronize with code: Typedefs outside class?
« on: September 15, 2011, 06:50:22 pm »
C++
EA 906

In many header files, I have both the class declaration and additional typedefs related to that class outside the class {} body.

These typedefs are often easier-to-read versions of template classes, and essential for EA to recognize class relations.

Example:

Instead of having a member
Code: [Select]
CGlib_AbstractGraphicsEventHandler<CGlib_GraphicsValueScaleWidget> m_EventHandler;
I use a typedef:
Code: [Select]
typedef CGlib_AbstractGraphicsEventHandler<CGlib_GraphicsValueScaleWidget> CGlib_ValueScaleWidgetEventHandler;

and can write my member in the more readable form:

Code: [Select]
CGlib_ValueScaleWidgetEventHandler m_EventHandler;
Without the typedef, EA does not recognize that m_EventHandler is related to CGlib_AbstractGraphicsEventHandler.

How can I tell EA to interpret such typedefs outside the class body (but in the same header file) when synchronizing the class?

11
General Board / Friend relationship between classes?
« on: August 26, 2011, 09:08:27 pm »
Is there a way to create an "is friend of" relationship between classes?

12
General Board / External link TO diagram?
« on: August 10, 2011, 05:32:31 pm »
Is there a way to create a link that not only opens an EA file, but opens one (or several) diagrams as well?

I would like to send an email to a colleague, of the kind "please take a look a these diagrams, and let me know if they are OK".

Or are there other ways to achieve this?

13
General Board / Configure default feature visibility for paste?
« on: July 14, 2011, 11:33:43 pm »
How can I configure the feature visibility a pasted element should get?

Specifically, I am drag-dropping a class from the model tree into a diagram, and select "as simple link".
I want to specify (in my case) that all features are hidden by default.

I do have a template class diagram with a single class where all feature visibilities are set as I need them.
New classes are created with these settings, but pasted links are not.

14
General Board / Change default target scope for association?
« on: July 12, 2011, 05:01:07 pm »
How do I change the default target scope for associations (or connectors in general) to "private"?

15
General Board / How to change source file name for class?
« on: July 11, 2011, 05:14:03 pm »
How do I change the source file name a class is related with, without generating new code?
Or how do I specify a filename when synchronizing with code?

Pages: [1] 2 3