Can i use external application (form zero touch nodes) in the generative design?

I create zero touch nodes by using C# to run external application (sofistick) but i have a warning at this node when i try to create Generative solution.
Can i use external application (form zero touch nodes) in the generative design?

I add my C# code for run sofistick as an Example of my code.

    [MultiReturn(new[] { "Run", "Cdb_FilePath" })] // DesignScript.Runtime   
    public static Dictionary<string, object> Run_Teddy(string filePath)
    {

        bool Run;
        string Cdb_FilePath;
    string SOFiSTiKPath_SPS = @"C:\Program Files\SOFiSTiK\2018\SOFiSTiK 2018\sps.exe";

        try
        {

         //   Process.Start(SOFiSTiKPath_SPS, filePath);
            using (Process exeProcess = Process.Start(SOFiSTiKPath_SPS, filePath))
            {
                 exeProcess.WaitForExit();

                // Retrieve the app's exit code
             int   exitCode = exeProcess.ExitCode;
                if (exitCode >= 0)
                {
                     Run=true;
                    Cdb_FilePath = filePath.Substring(0, filePath.Length - 3) + "cdb";
                }
                else
                {
                     Run=false;
                    Cdb_FilePath = "null";
                }

                
            }
               
        }
        catch (Exception)
        {

            throw;
        }

        return new Dictionary<string, object>
                                {

                                { "Run", Run },
                                { "Cdb_FilePath", Cdb_FilePath },
                              
                                };

    }

Can’t see what your error is - what is the translated text on the ‘problem’ tab indicating?

Not that GD will attempt to launch 6 con current instances of the application when you run your study, and sofistick will not permit that, or could report data back to Dynamo out of sequence.

1 Like

The error is (These blocks are dependant on Revit, therefore they have to be saved in between. The blocks that have to be saved in between cannot be placed in an evaluation loop (after an input block and before an output block).

Yes my dll file access to the revit API but it is not used in the dynamo in this script.
I solve it by generate a separate pakedge to access only to the sofistik software. The GD work as i expect. @JacobSmall thank you for you quick reply :grinning::grinning:.