Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Waiting for end of GeExecuteProgram?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 228 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 22/12/2007 at 04:29, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.111 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi there!
      I've run into a fun little problem: My exporter creates intermediary files that are then converted by an external program into the final output format. I would like to implement a convenience function that clears up all the litter created (the intermediary files could be deleted). However, I don't know whether the external program has finished yet or not, because GeExecuteProgram(...) returns immediately and seemingly runs the program in its own thread. Is there a way to wait for the end of the execution of an external program, i.e. run it in the current thread? That way I could create my own Thread class to call the external converter and delete the intermediary files afterwards.
      Although I'm currently investigating whether I could skip the external converter altogether that might not be possible in a simple manner, so it would be great if I could implement the above convenience function while I'm trying to remove the external program completely.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/12/2007 at 09:56, xxxxxxxx wrote:

        I suspect that this is not possible unless you include OS-level support (libs or dlls). One possible not-very-great solution might be to have the executable create an 'i'm done' file which you test for with GeFExist(). When that file exists, the executable is done and your plugin can then delete it with GeFKill().

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 22/12/2007 at 13:47, xxxxxxxx wrote:

          too bad. But perhaps you're right. Anyway, your workaround sounds a lot more feasible than my "just leave them there" option. So, thx for that idea. 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post