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

Invalid Ordinal while adding a Flow Relation Object on Diagram

ColruytTeam
Honored Contributor

Hi Community,

I am trying to replace Flow Relation Link with Flow Relation Meta Class Object (just like message flow object) between two Application objects.

 

 

Capture1.JPG

 

The above link you can see is a flow relation . The below link you see is actually a MetaClass Object namely "Flow to Application" same like "Message Flow" Object.

 

 

Capture2.JPG

 

 I am trying to do this Diagram API. But it is throwing me an error : Invalid Ordinal.

 

   Set NewFlowRelation = oRoot.getCollection("Flow To Application").Add("Sample Flow To Application")
   
   NewFlowRelation.getCollection("Source  Flow Element").Add(App1)
   NewFlowRelation.getCollection("Target Flow Element").Add(App2)
   NewFlowRelation.getCollection("Containing Diagram").Add(oRepositoryDiagram)

 

   NewObjectId = NewFlowRelation.getProp("_HexaIdAbs")


   Set arDrawingLink = FindDrawingFlow( oDrawing, NewObjectId )
   oDrawing.MegaObjectInsert(arDrawingLink)  //Here the issue is occuring , Invalid Cardinal
   
   Function FindDrawingFlow(oDrawing, idLeg)
       Dim TempArDrawingLink
       Call LogInSysOut("New flow id : "&idLeg, False)
       For Each oDrawingLink In oDrawing.drawingObjects
         If oDrawingLink.RepositoryObject.GetProp("_HexaIdAbs") = idLeg Then
             Set TempArDrawingLink = oDrawingLink
         End If
      Next
     Set FindDrawingFlow = TempArDrawingLink
   End Function

 

As this is Metaclass object which is in the form of link, I am facing issue to put this object on diagram.

Can any one help to solve this.

 

 

Thanks in advance

Colruyt Team
0 Replies