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
    • Register
    • Login

    How do I retrieve a command call from it's index number ?

    Scheduled Pinned Locked Moved Cinema 4D SDK
    python
    2 Posts 2 Posters 15 Views 1 Watching
    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.
    • D Offline
      Dimitris_Derm.
      last edited by

      For example I get from the Script Log

      c4d.CallCommand(14046) # Split
      

      Is there an Index page where I can see to what method that number belongs to ?

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @Dimitris_Derm.
        last edited by ferdinand

        Hey @Dimitris_Derm. ,

        what do you mean by 'method'? CallCommand just invokes the CommandData plugin which has been registered under the plugin ID you passed to the call.

        What you can do, is resolve the numeric plugin ID integer value to a symbol. But unlike for message IDs, the docs currently do not resolve symbols to their integer values. You can do two things:

        1. Just search in the main symbol definition file with a text editor, i.e., {c4d}/resource/modules/python/libs/python311/c4d/__init__.py
        2. Or use mxutils.SymbolTranslationCache which exists for the very purpose of resolving such integer values to symbols.

        But in your case, 14046 , you will draw a blank in both cases, which simply means developers never defined a public symbol for that command.
        1b4e6537-4fad-48a1-b4ec-c6edd4103083-image.png

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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