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

Pages: 1 ... 167 168 [169]
2521
To get the item currently selected in the tree, try this:

Code: [Select]
ObjectType = Repository.GetTreeSelectedItem(Object)
Pass in a generic object type and then type cast it to something more specific after seeing what ObjectType is. If you already know what the element ID is then:

Code: [Select]
Element = Repository.GetElementByID(ID)
should do it. More details in the help file - a search for "GetTreeSelectedItem" should get you to the right page.

The properties dialog (or any other EA dialog for that matter) isn't available from the Automation Interface.

2522
You need to call the AddNew() method of the element's Attributes collection, and then call the Update() method of the returned attribute. Search for "Collection" in the helpfile for more info. Let me know if you're still having trouble (support@sparxsystems.com.au)

2523
Repository.ConnectionString will hold the name of the model that's open. If none, it will be a zero-length string.

2524
Automation Interface, Add-Ins and Tools / Re: Diagram Elements
« on: December 15, 2004, 03:23:19 pm »
The Automation Interface has a Diagram.SelectedObjects collection, but doesn't have the equivalent way of working out which connector, if any, is selected. We will have a go at adding this some time in the new year.

2525
Quote
Though perhaps Sparx could advise here ...


The only interesting information you are likely to get from an integrity check is the number of faults reported. Run it if you notice any weird behaviour, especially after EA (or the PC it's running on) has crashed. If it shows lots of faults fixed, it means you've probably found what was causing the weirdness; if it's zero, it means your problem is somewhere else.

2526
The "Set Timeline Range" command is on the right-click context menu for the overall diagram, not on the context menu for the individual timeline elements where you might expect to find it. This is because all timelines added to a diagram have the same range.

2527
If you e-mail the part of your code that isn't working, we can have a closer look: support@sparxsystems.com.au

2528
Try adding as the next two lines:

connector.Update
component.connectors.Refresh

Hope that works for you.

2529
Automation Interface, Add-Ins and Tools / Re: VBA Add-in
« on: September 02, 2004, 07:50:04 pm »
Just tried this and it works:

       Dim ref As EA.Reference
       Set ref = Repository.GetReferenceList("Element")
       MsgBox "Element Count=" & str(ref.Count)

Are you doing anything different?

2530
Quote
The generated header files (*.h) does not contain a newline at end of file.
That was fixed at build 733. Try downloading the new version.

Quote
Note: we do not want a CRLF at each  line.
There is an option on the "Tools / Options / Generation" dialog to switch on CR & LF. Uncheck the checkbox.

HTH

2531
Automation Interface, Add-Ins and Tools / Re: METRICS
« on: July 18, 2004, 07:26:41 pm »
Hi there,

You probably need to do MsgBox(ele.Metrics.Count) instead.

HTH.

Pages: 1 ... 167 168 [169]