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

Pages: [1] 2 3 ... 7
1
General Board / Re: How to apply changes to Project Browser Script
« on: April 07, 2014, 05:10:52 pm »
After closing and re-opening the EAP file, my changes can still be seen.

And now they work, too. So it would seem I'd better close and re-open the EAP file every time I change a script.  :-?

2
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)

3
General Board / Re: How to advise EA of diagram change
« on: September 26, 2013, 11:47:11 pm »
Thank you.

Code: [Select]
RefreshModelView(pkg.PackageID)
does the trick.

4
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)

5
General Board / Re: Cannot move lifeline element vertically
« on: February 18, 2013, 10:07:48 pm »
Thanks!

6
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)

7
General Board / Re: How to edit attributes in script?
« on: November 07, 2012, 08:32:36 pm »
Thanks! That was a bit misleading.

8
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?

9
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?

10
General Board / Re: How to check for object type within script?
« on: September 25, 2012, 09:49:54 pm »
Found a somewhat ugly workaround:

Code: [Select]
     'replace string in Filename
      Dim strGenFile
      strGenFile = ""
      On Error Resume Next
      strGenFile = obj.GenFile
      On Error Goto 0
      If InStr(strGenFile, LCase(fromString)) > 0 Then
         strGenFile = Replace(strGenFile, LCase(fromString), LCase(toString))
         obj.GenFile = strGenFile
         modified = True
      End If

11
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?

12
General Board / Re: Cross-linked notes?!?
« on: August 29, 2012, 05:01:52 pm »
Oh, I can see use cases for linked notes. It's just very unexpected as default behavior. Especially since they do not appear in the project explorer.

13
General Board / Re: Cross-linked notes?!?
« on: August 21, 2012, 08:08:54 pm »
Creating links that are not obvious to the user is dangerous. You might only realize days later that the changes to the "copy" you made also ruined your "original". Especially in such cases, a restore is difficult, as a lot of other data might have been changed in the meantime.

14
General Board / Re: Cross-linked notes?!?
« on: August 21, 2012, 06:38:39 pm »
Thank you.
I think I'll file this as a bug report - things that aren't in the project browser should be pasted as new element by default.

A little side effect was that we realized our backup task was not running. Good thing it was just a page of text.

15
General Board / Re: Cross-linked notes?!?
« on: August 21, 2012, 06:26:04 pm »
A note is not an element - at least it doesn't appear in the project browser.

Pages: [1] 2 3 ... 7