Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Event Handler C++

Message 1 of 4
286 Views, 3 Replies

Custom Event Handler C++

I'm trying to edit a text box in my add-in,


I have created a worker thread that fires a custom event.


However, I can't seem to get an input ptr from anything to be able to get ahold of the text box ptr


I thought the below code would work...


Ptr<Event> firingEvent = eventArgs->firingEvent();
if (!firingEvent) {

Ptr<Command> command = firingEvent->sender();
if (!command) {
return; <-- fails

Ptr<CommandInputs> inputs = command->commandInputs();


Is there a way to get to the input by using Ptr<UI>








Labels (1)
  • API
Message 2 of 4
in reply to: jonathandent

Hardly anyone uses C++


If you can, switching to Python would be an extrmely good idea.  Since you already know C++ - learning Python only takes a couple of days, and will greatly accelerate your development anyhow (so you save more than those days in the long run anyhow)


If you're stuck - go grab working examples and run from there - there's loads of "setup stuff" you can't guess from first principals...

Message 3 of 4
in reply to: OceanHydroAU

That's not very helpful when the powers above make you code in c++ for this plugin/addin...


My Addin works fine single threaded blocking fusions main thread when its working. I just wanted it to feel better with a cancel worker thread option included.


Lucky enough I have a direct contact at AutoDesk, I'm just awaiting a response.



Message 4 of 4
in reply to: OceanHydroAU

I know this is a really late reply but saying "hardly anyone uses c++" is not the answer people are looking for when explicitly asking for a cpp reference.

C++ so much faster and more optimized than python, so if i intend to make a highly complex programm and dont want my users to have to wait for some loadingbox i would recommend using C++ since it is very close to bare metal

There are numerous references that show how much faster C++ programms are compared to python

For example this one

Keep in mind that this is pure mathematics and doesnt even scratch the surface of the python interpreter boundries which is funnily written in C if i remember correctly

Mit freundlichen Grüßen
Laurin Weber

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report