C4D Files Questions, along with others



  • On 06/03/2013 at 10:39, xxxxxxxx wrote:

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

    ---------
    Hello again all,

    This post is directed towards Yannick, as he seems to be the one who has the most experience with the HtmlViewer, but if anyone has any insight on this, please, chime in!

    As part of an experimental plugin, I've been trying to implement the HtmlViewerCustomGui class and playing with its functions.

    One of the things we thought would be interesting was to pass a download link to the SetURLCallback function and try to download a file to the C4D_PATH_LIBRARY.

    - Is there a way we can utilize any of Cinema's functions in Basefile or Filename to retrieve and write this file?

    - What does c4d_file's RequestFileFromServer() do? What about the SetIpConnection() located in the Filename class?

    - If this is not possible with the SDK, is there anything preventing us from including an external library (like libcurl) to perform the retrieval of the file?

    - On a related note, can you also provide an example of how the HtmlViewerCustomGui GetTextArea() works?  Scott mentioned it a while back and I never had any luck getting it to work.

    Thanks for your time!
    Dan



  • On 07/03/2013 at 01:13, xxxxxxxx wrote:

    Hi Dan,

    Originally posted by xxxxxxxx

    As part of an experimental plugin, I've been trying to implement the HtmlViewerCustomGui class and playing with its functions.

    One of the things we thought would be interesting was to pass a download link to the SetURLCallback function and try to download a file to the C4D_PATH_LIBRARY.

    - Is there a way we can utilize any of Cinema's functions in Basefile or Filename to retrieve and write this file?

    No.

    Originally posted by xxxxxxxx

    - What does c4d_file's RequestFileFromServer() do? What about the SetIpConnection() located in the Filename class?

    These methods are private and only meant for MAXON's use.

    Originally posted by xxxxxxxx

    - If this is not possible with the SDK, is there anything preventing us from including an external library (like libcurl) to perform the retrieval of the file?

    Yes, you're better using an external specific lib for this.

    Originally posted by xxxxxxxx

    - On a related note, can you also provide an example of how the HtmlViewerCustomGui GetTextArea() works?  Scott mentioned it a while back and I never had any luck getting it to work.

    GetTextArea() reads the content of a text area in the current page.
    HtmlViewerCustomGui is really limited; it's only used for the help in CINEMA.



  • On 07/03/2013 at 04:20, xxxxxxxx wrote:

    Just to add to this, I needed to do the same thing and ended up using a third-party library. Personally I found libcurl very awkward to implement, for me it certainly isn't just load and go. In the end I used a commercial solution from Chilkat (their HTTP component). It's very easy to use.



  • On 11/03/2013 at 09:26, xxxxxxxx wrote:

    Thanks Yannick!

    I expected most of that, thanks for confirming it though.

    For GetTextArea() does that refer to a TextArea element or just an area of text?  I've tried getting it to work but no luck so far.

      
    String id,text;  
    id = "UserName";  
      
    text  = htmlviewer->GetTextArea(id);  
    

    id being the ID of a TextArea element on the website.
    Would the code look something like that?

    Thanks for the advice spedler, I'll definitely look into using that.

    Dan



  • On 11/03/2013 at 14:04, xxxxxxxx wrote:

    GetTextArea() is private so only the developers would know.



  • On 12/03/2013 at 09:38, xxxxxxxx wrote:

    Thanks, Robert!

    Dan


Log in to reply