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

    Priority CoreMessage

    SDK Help
    0
    3
    290
    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

      On 22/02/2014 at 05:08, xxxxxxxx wrote:

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

      ---------
      I am using chilkat to download files.

      To show the progress, I use SpecialEventAdd to send this progress to my main dialog (CoreMessage).
      So far so good. I get the information in my dialog.

      However, looking at the console, I see that the download is completed before CoreMessage receives any messages.
      In the console you see first all progress message from the threat and only AFTER that the messages in CoreMessage.
      I would expect them one by one.
      So progress message in the threat and a message from CoreMessage.

      PercentDone: %d percent 88
      CoreMessage progress 88
      PercentDone: %d percent 89
      CoreMessage progress 89
      PercentDone: %d percent 90
      CoreMessage progress 90
      ...

      Here some code from the threat.

      		GePrint("PercentDone: %d percent: " + String::IntToString(pctDone));
        
      		SpecialEventAdd(1014856121, 9001, pctDone);
      

      And from CoreMEssage

      Bool MainDialog::CoreMessage( Int32 id,const BaseContainer &msg )
      {
      	switch ( id )
      	{
      		case  1014856121:                                      // internal message
      		{
      		UInt  selector;
              
      		selector = (UInt) msg.GetVoid( BFM_CORE_PAR1 );
        
      		if ( selector == 9001 )
      		{
      			Int32 progress;
      			progress = (Int32) msg.GetVoid( BFM_CORE_PAR2 );
      			GePrint("CoreMessage progress: " + String::IntToString(progress));
      			SetInt32(1001, progress);
      		}
      		break;
      		}
      	}
      	return GeDialog::CoreMessage( id, msg );
      }
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 23/02/2014 at 04:41, xxxxxxxx wrote:

        My fault. I receive the message in CorMessage, but I do not handle correctly getting the second parameter.
        I am not sure how to do that?

        Bool MainDialog::CoreMessage( Int32 id,const BaseContainer &msg )
        {
        	GePrint("CoreMessage id:" + String::IntToString(id));
        	switch ( id )
        	{
        		case  1014856121:                                      // internal message
        		{
        		UInt  selector;
                
        		selector = (UInt) msg.GetVoid( BFM_CORE_PAR1 );		// GOES WRONG
        		selector = (UInt) msg.GetInt32( BFM_CORE_PAR1 );		// THIS GOES WRONG TOO
          
        		if ( selector == 9001 )
        		{
        

        The call to CoreMessage is:

        SpecialEventAdd(1014856121, 9001, pctDone);
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 23/02/2014 at 05:38, xxxxxxxx wrote:

          I'm now using GeSyncMessage instead of SpecialEventAdd and that works!
          Issue solved (on to the next).

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