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
    • Recent
    • Tags
    • Users
    • Login

    Execute external file with argument

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 577 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 05/03/2011 at 15:07, xxxxxxxx wrote:

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

      ---------
      **Hi all !

      I'm trying to run a program with

      **

      **Bool GeExecuteProgram(constFilename& program, const Filename& file)

      It works perfectly, but I'd like to add an argument for example "program.exe /argument" and when I add it directly in the filename it doesn't run anymore ... Is it possible or not ?

      Thanks !

      Mike
      **_<_h4_>_

      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 06/03/2011 at 05:15, xxxxxxxx wrote:

        Nope.  The Filename class only sees itself as a path+file structure not a string.  Maybe try the private "GeExecuteProgramEx()" method instead.  You'll have to play with it since the arguments are not explained.

        One option besides is to execute a batch file (but then you lose control of the file since you will be calling GeExecuteProgram("run.exe", "my.bat") basically).  And, of course, this doesn't work the same on MacOS.

        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 06/03/2011 at 06:50, xxxxxxxx wrote:

          Yep I already thaught about bypassing it using a batch file, but as you said it is unusable for Macs ... :s

          I'll try GeExecuteProgramEx()

          Thanks again Robert...

          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 07/03/2011 at 01:11, xxxxxxxx wrote:

            Although GeExecuteProgramEx is marked as private it should be safe to use. Pass the pointer to your argument strings to args and the number of arguments to argcnt. You can also pass a function pointer to callback and custom user data to userdata , but this is optionally.

            cheers,
            Matthias

            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 07/03/2011 at 05:57, xxxxxxxx wrote:

              Thanks !

              I suppose GeExecuteProgramEx() will only work in R12 ?

              Mike

              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 07/03/2011 at 07:49, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                I suppose GeExecuteProgramEx() will only work in R12 ?

                It's avaible since R11.5.

                cheers,
                Matthias

                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 07/03/2011 at 07:55, xxxxxxxx wrote:

                  Great !

                  Thank you.

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