Demo extension with Python code
Overview
A simple extension example demonstrating how to link custom Python code to a ribbon icon in HyperMesh. Upon clicking the icon, a message will be printed in the IPython console.
Usage/Installation Instructions
1. Unzip the DemoExtensionWithPython.zip
2. Register the extension - File > Extensions and click Add Extension in the Extension Manager dialog
Find more posts tagged with
Comments
Sort by:
1 - 2 of
21
Thank you for adding your comment. You are absolutely right - the functions are internally passed some arguments which they need to be able to "consume".
FYI We will make sure to include this information in the future documentation updates and in the training package that is currently being worked on.
Best regards,
Michal
Share projects with the Community
Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project
Hello Michal,
Thanks for sharing.
When I tried to adapt the example to our environment, I encountered an issue. I received the following error:
TypeError: myFunc() got an unexpected keyword argument 'charmap'
The solution was to modify the function definition to include
*args
and**kwargs
:I hope this helps anyone else facing a similar issue.