3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

SpaceClaim Api Scripts C#

    • user deleted
      Subscriber

      I get an exception error saying "Unable to pause script, must run in debugging mode to pause"

    • Atharv Joshi
      Forum Moderator

      Hi Alex, 

      SpaceClaim script editor has 2 modes(Run, Debug) for executing the script. 

      While using InputHelper command the script should be executed in Debug mode. 
      This allows the scipt to pause and take user input.

      Thanks and Regards
      Atharv

    • user deleted
      Subscriber

      Hi Atharv, If you mean the editor for Python, then I know this information. 

      But I need to call "InputHelper.PauseAndGetInput" from c#. Inside the "InputHelper.PauseAndGetInput" checks that the "ScriptHelper.OnScriptingThread" field is true, otherwise an exception is thrown. How to call "InputHelper.PauseAndGetInput" so that "ScriptHelper.OnScriptingThread" is true?

    • Atharv Joshi
      Forum Moderator

      Let me check for C# calls that run the script in debug mode. 

       

    • Atharv Joshi
      Forum Moderator

      Hi Alex, 

      You can try executing the script as RunScriptAsync, instead of RunScript. 

      This may help with pasuing the script. Let me know if it works. 

      Regards
      Atharv

Viewing 4 reply threads
  • The topic ‘SpaceClaim Api Scripts C#’ is closed to new replies.