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

    GeDialog::Command()

    SDK Help
    0
    3
    175
    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
      Helper
      last edited by

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

      On 13/02/2008 at 04:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi again,
      i got a little problem with this function. One of my buttons controlled by this function will allocate an Object and insert it in the document: I use

          
          
          doc->InsertObject(spline,NULL,NULL);[\CODE] where doc is the Basedocument. Any ideas how i can get the document object?
          
          
          
          
          Source is like this:
          
          
          
          
          [CODE]
          
          
          GeDialogMod::Command(LONG id, const BaseContainer& msg)  
          {  
             switch(id)  
             {  
                 case BUTTON:  
                 {  
                     BaseObject* object1 = BaseObject::Alloc(Ocylinder);  
                     BaseDocument *document1 = ?????;  
                     document1->InsertObject(op,NULL,NULL);  
                 }  
             }  
          }
      

      The only object i gave over to the CommandFunction is id and msg and i don't see a function to get the BaseDocument ....

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

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

        On 13/02/2008 at 06:48, xxxxxxxx wrote:

        You can use GetActiveDocument() to get the currently active document.

        cheers,
        Matthias

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

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

          On 13/02/2008 at 11:55, xxxxxxxx wrote:

          You got an walkthrough for this, right ??? *g*

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