<?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[Passing data to a CommandData plugin from Python]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I have a command plugin that inherits from CommandData, defined and registered in C++. I am trying to create a Python script which calls this command plugin, but I want to pass data to it so it can use that data in its <code>Execute()</code> function. I can modify the class in C++ if necessary. Can I do this in Python? I know I can pass data using the <code>Message()</code> function, but have not found a way to use that from Python.</p>
<p dir="auto">Thank you for the help,<br />
Daniel</p>
]]></description><link>http://developers.maxon.net/forum/topic/15309/passing-data-to-a-commanddata-plugin-from-python</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 07:21:45 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15309.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Dec 2023 22:12:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Passing data to a CommandData plugin from Python on Thu, 28 Dec 2023 16:41:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi Maxime, thank you very much for your answer! I wasn't sure if storing things in the global document BaseContainer was a good approach, but it's working well.</p>
<p dir="auto">Cheers,<br />
Daniel</p>
]]></description><link>http://developers.maxon.net/forum/post/73432</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73432</guid><dc:creator><![CDATA[danniccs]]></dc:creator><pubDate>Thu, 28 Dec 2023 16:41:21 GMT</pubDate></item><item><title><![CDATA[Reply to Passing data to a CommandData plugin from Python on Thu, 28 Dec 2023 08:44:49 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danniccs">@<bdi>danniccs</bdi></a> the easiest way would be to have a python script that store something in the BaseContainer of the document, you can also store BaseContainer, this way you could store multiple data in it. Then your C++ code will read these values and act accordingly.</p>
<p dir="auto">The second way would be to directly call your python script from your C++ plugin as shown in <a href="https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_python.html" target="_blank" rel="noopener noreferrer nofollow ugc">Python - Manual</a>.</p>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/73430</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73430</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Thu, 28 Dec 2023 08:44:49 GMT</pubDate></item></channel></rss>