Hi,

I am developing a small script that should be able to import excel data and generate a model.

However, I am unable to get connections between some objects of specific types, even though these connections can be created in the "Designer" module.

Concrete illustration of my problem:

  • My raw data in Excel:

     

  • Expected outcome:

     

  • What I get:

As you can see, there are some links missing. It WOULD work if the "Position" would be, for example, a "Function".

I try to connect (all) the objects with the following function:

function connect (source, target) {
    // This function "brute force" connects two objects
    
    var i = 0;
    var connection = null;
        
    while(!connection && i < 1000) {
        connection = model.CreateCxnOcc(true, source, target, i++, pointList);
    }
    
    //if(!connection) Dialogs.MsgBox("Still no connection")
}

so I think we can exclude that I chose the wrong CxnType (Type number of the relationship occurrence to be created -- in this case: i).

So, has anybody got an idea what could be the problem or has a different solution / workaround for this?

If you need some more code, please feel free to ask!

Many thanks,

Laurent

Tags: script Report excel EPC ARIS