Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: fcavassini on November 13, 2003, 01:55:58 pm
-
Hi everyone
I'm developing an Add-In for EA in VB 6
I want to get all objects selected in the current diagram:
For i = 0 To pEAR.GetCurrentDiagram.SelectedObjects.Count - 1
Set obj = pEAR.GetCurrentDiagram.SelectedObjects.GetAt(i)
Next i
But the obj that I receive is an Object without Interface, and I can't convert it to an Element or other class.
hope you can help me
thanksss!!!!
Fabio
-
SelectedObjects is a collection of diagram objects.
Try
dim DiagramObj as EA.DiagramObject
For Each DiagramObj in pEAR.GetCurrentDiagram.SelectedObjects
...
-
Thanks Phill!!