cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Diagram API: moving a ModeSatelliteConnector Class DrawingItem

Solved
MEGA

Diagram API: moving a ModeSatelliteConnector Class DrawingItem

Hi,

 

I do not manage to move/resize DrawingItem which class is ModeSatelliteConnector using VB Diagram API.

For instance, I would like to move an Interaction Point on a Resource Architecture diagram.

 

Anyone knows how to do this? I am using 2009 SP3 CP4.

Thanks.

 

The context:

I am trying to automatize diagram creation on variants of Artifact and Resource Architecture objects.

On these diagrams, the variant object and the inherited objects (artifact used, communication port, etc.) would have the same size and position as on the varied object description.

 

Best regards,

Philippe

Tags (3)
1 Reply
Highlighted
Contributor

Re: Diagram API: moving a ModeSatelliteConnector Class DrawingItem

Hi Philippe,

 

The "SetPos" function seems to work on ModeSatelliteConnector drawing items, I tried with MEGA 2009 SP2 CP3.

 

Following code is supposed to move every satellite object 500 twips further to the right :

 

Set oDrawing = oDiagram.Drawing("RW") 'Open drawing in R/W mode
For Each oDI In oDrawing.DrawingItems
  If oDI.DrawClassName = "ModeSatelliteConnector" Then
    oDI.SetPos oDI.Left + 500, oDI.Top, oDI.Right + 500, oDI.Bottom 'Move
  End If
Next
oDrawing.Flush 'Save the diagram
Set oDrawing = Nothing

 

Sergueï