"No running instance of the program found or failed to attach" error message in Simplex Package

Hi,
I’m getting this error message using the latest version of Dynamo and the Simplex Package by @Marcello_Sgambelluri. I’m using SAP2000 v21.2.0 (Plus).
Is this not supported, or am I doing something wrong? I’ve tried launching SAP2000 before and after Revit, but the result is the same.
Thanks,
Rui

Hi @Marcello

FYI

Hi
What program are you trying to attach to the etabs Tecla SAP word?

Thx
Marcello

Hi,
I’m using Dynamo for Revit, trying to get results out of an open model in SAP2000 v21.2.0 (Plus)

I’ll look into it but usually just need to restart everything make sure SAP is open before you open Dynamo

Thx
Marcello

Hi @Marcello,

So I’ve done some experiments and I believe I have found the culprit. I tried some simple zero-touch nodes to check SAP model accessibility and found out this:
Got error message with --> mySAPObject = (cOAPI)System.Runtime.InteropServices.Marshal.GetActiveObject("CSI.SAP.API.SAPObject");
Did not get error message with --> mySAPObject = (cOAPI)System.Runtime.InteropServices.Marshal.GetActiveObject("CSI.SAP2000.API.SAPObject");

I wonder if this could be what is causing the error on the simplex package nodes?
Here is my full test:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SAP2000v20;

namespace SAP2000
{
public class SAP2000
{
private SAP2000()
{ }

    public static string[] Get_All_Frame_Names()
    {
        SAP2000v20.cSapModel MySAPModelThatisOpen;
        cOAPI mySAPObject = null;
        mySAPObject = (cOAPI)System.Runtime.InteropServices.Marshal.GetActiveObject("CSI.SAP2000.API.SAPObject");
        MySAPModelThatisOpen = mySAPObject.SapModel;

        int NumNames = 0;
        string[] AllNamesArray = new string[1];

        MySAPModelThatisOpen.FrameObj.GetNameList(ref NumNames, ref AllNamesArray);

        return AllNamesArray;
    }
}

}

Hope this sheds some light on the matter!

Regards,
Rui

ok i will look into this

simplex only works with SAP 2000 v 21
are you using version 20?
does it work with version 21?

Hi @Marcello,
I understand your confusion. I’m using SAP2000 v21.2.0, even though it may appear that I’m using SAP2000 v20, based on the code that I wrote. The fact is that the dll inside the SAP2000 v21 folder is named “SAP2000v20.dll”.
SAP2000 folder

Hi,
I had the same issue but with ETABS - I used these nodes time ago to link Revit2019 and Etabs17 and it worked. Going back to this workflow with Revit2020 and Etabs18, now I found that Dynamo gives me an error like: “No running of the programm found or failed to attach”

I updated the nodes in dynamo and I did the same process running the combo etc. is there anything I’m missing? Thank you so much for your help!