<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Variable displayed in gui.MessageDialog ?]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 23/02/2011 at 02:00, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Variable displayed in gui.MessageDialog ?</p>
<p dir="auto">Something like</p>
<pre><code>import c4d   
from c4d import gui   
  
def main() :   
    counter = 123456   
    gui.MessageDialog(counter, ' Objects')   
  
if __name__=='__main__':   
    main()
</code></pre>
<p dir="auto">I know that the code obove is not working just to explain my trouble ...</p>
<p dir="auto">thanks in advance<br />
mogh</p>
]]></description><link>http://developers.maxon.net/forum/topic/5528/5547_variable-displayed-in-guimessagedialog-</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 20:38:38 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/5528.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2018 17:51:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Variable displayed in gui.MessageDialog ? on Wed, 09 May 2018 17:51:51 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 04/03/2011 at 00:33, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Just to make you understand the console:</p>
<blockquote>
<p dir="auto">TypeError: unsupported operand type(s) for +: 'int' and 'str'</p>
</blockquote>
<p dir="auto">You can't add a string to an integer. As deepshade wrote, you have to convert the integer first with the str() - function.</p>
]]></description><link>http://developers.maxon.net/forum/post/25757</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25757</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:51 GMT</pubDate></item><item><title><![CDATA[Reply to Variable displayed in gui.MessageDialog ? on Wed, 09 May 2018 17:51:51 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 03/03/2011 at 23:39, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">I dont think that gui element takes anything but text and an option setting</p>
<p dir="auto">ie just text will work</p>
<p dir="auto">try gui.MessageDialog(str(counter)+ " Objects")</p>
]]></description><link>http://developers.maxon.net/forum/post/25756</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25756</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:51 GMT</pubDate></item><item><title><![CDATA[Reply to Variable displayed in gui.MessageDialog ? on Wed, 09 May 2018 17:51:50 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 03/03/2011 at 23:10, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi Seb,</p>
<p dir="auto">I still have problems with the code, it worked for a while and now its broken again.</p>
<p dir="auto">The Python Console gives me:&gt;</p>
<blockquote>
<p dir="auto">Traceback (most recent call last) :<br />
File "&lt;scriptmanager&gt;", line 35, in &lt;module&gt;<br />
File "&lt;scriptmanager&gt;", line 29, in main<br />
TypeError: unsupported operand type(s) for +: 'int' and 'str'</p>
</blockquote>
<p dir="auto">my script is:</p>
<pre><code>import c4d   
from c4d import documents   
from c4d import gui   
  
def GetNextObject(op) :   
    if op==None: return None   
    return op.GetNext()   
  
def main() :   
    c4d.CallCommand(1024314); # clear python console   
    c4d.CallCommand(1022604); # open python console   
    counter = 0   
    myobject = doc.GetFirstObject()   
    if myobject==None: return   
  
    while myobject:   
        counter = counter + 1   
        myobject = GetNextObject(myobject)   
        
    gui.MessageDialog(counter + ' Objects in root.')        
  
if __name__=='__main__':   
    main()
</code></pre>
<p dir="auto">thanks in advance<br />
mogh</p>
]]></description><link>http://developers.maxon.net/forum/post/25755</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25755</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to Variable displayed in gui.MessageDialog ? on Wed, 09 May 2018 17:51:50 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 23/02/2011 at 03:02, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi mogh,</p>
<p dir="auto">which message do you want to display? Try this:</p>
<pre><code>gui.MessageDialog(counter + ' Objects')


gui.MessageDialog(counter + ' Objects', c4d.GEMB_YESNOCANCEL)
</code></pre>
<p dir="auto">Cheers, Seb</p>
]]></description><link>http://developers.maxon.net/forum/post/25754</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25754</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:50 GMT</pubDate></item></channel></rss>