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

    Basic question: Pointer to normal var?

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 357 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 06/04/2008 at 07:59, xxxxxxxx wrote:

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

      ---------
      A simplified example: I want to output the current date in the C4D console. How do I do that?

      I tried with the following code:

      >           LONG Year; \>           LONG Month; \>           LONG Day; \>           GeGetSysTime(&Year;, &Month;, &Day;, NULL, NULL, NULL); \>           GePrint("Date: " + LongToString(Day) + "." + LongToString(Month) + "." + LongToString(Year)); \>

      But it makes Cinema crash immediately.

      Thanks in advance 🙂

      Greetings,
      Jack

      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/04/2008 at 08:19, xxxxxxxx wrote:

        OK OK, forget about it. I just mustn't use NULL...

        Work fine now:

        >           LONG Year; \>           LONG Month; \>           LONG Day; \>           LONG Hour; \>           LONG Minute; \>           LONG Second; \>           GeGetSysTime(&Year;, &Month;, &Day;, &Hour;, &Minute;, &Second;); \>           GePrint("Date: " + LongToString(Day) + "." + LongToString(Month) + "." + LongToString(Year));

        Cheers,
        Jack

        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/04/2008 at 08:31, xxxxxxxx wrote:

          😉

          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/04/2008 at 08:51, xxxxxxxx wrote:

            Btw. since Cinema 4D 10.5 you can do this in a more elegant way with the FormatTime() function.

            > \> tagDateTime dt; \> DateTimeNow(dt); \> GePrint(FormatTime("%d.%m.%Y %H:%M:%S", dt)); \> \> // this outputs \> // 06.04.2008 17:47:25 \>

            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 08/04/2008 at 13:40, xxxxxxxx wrote:

              Uuh, cool.

              But the date & time thing was just an example. Anyway, very nice to know, thanks Matthias!

              Also thanks to smiling RenatoT who gave me a slap on the forehead + the right tip to solve this 😉

              Greetings,
              Jack

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