Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Implement A Usage Counter?

    General Talk
    python r25
    2
    3
    559
    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.
    • B
      bentraje
      last edited by

      Hi,

      Is it possible to implement a usage counter to plug-ins?
      Nothing too complicated.
      Basically, everytime the plug-in is opened (not even how many buttons are clicked). Just opened. And it will classify as 1 usage counter.

      I'm not entirely sure how to implement. I'm guessing I have to set-up a webserver of some sort to send some pings?

      Any help would be appreciated.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @bentraje
        last edited by ferdinand

        Hello @bentraje,

        Thank you for reaching out to us. Sure, this is possible, but the broadness of your question is in violation of our scope of support rule:

        If necessary, we will provide code examples, but we will not provide full solutions or design applications.

        There are three million and one ways to do this, and you must design your application yourself. A very straight forward implementation could be:

        • Every time MyCommandData.Execute is being invoked read and write an incremented usage count, with one of these options:
          • the builtin function and module open() and json,
          • the HyperFile format of Cinema 4D,
          • the function WritePluginInfo,
          • or, if you do not want to do it locally, you could also send a request to a web service, as for example a REST service. Python's builtin urllib should be up to that task, including handling the response.

        Please understand that we cannot provide support for subjects that are not part of our APIs, e.g., how to set up a (REST) web service, so that your plugin can send commands to it.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        B 1 Reply Last reply Reply Quote 0
        • B
          bentraje @ferdinand
          last edited by

          @ferdinand

          Thanks for the pointers.
          I'll try to look up those options.

          Will close this thread now.

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