Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Listening to Events(Python)

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
xcrx
972 Views, 2 Replies

Listening to Events(Python)

I wrote a small script in python to write dxf files out. I want to add this to a button on the ribbon. I got that sorted out and can get my button to appear where I want it. I am having trouble calling the script from the button though.

 

The API tells me that the button has an OnExecute() event that I should listen for to call my script. I have been searching on how to do that from python but I haven't had any luck. Does anybody know where I should be looking to find an answer?

2 REPLIES 2
Message 2 of 3
xcrx
in reply to: xcrx

Update:


I have gotten python listening to event and interacting with them with some help from the win32 mailing list. I can launch the script by itself and it funtions as expected. I am trying to set the script up as an AddIn but I am having trouble.

 

So far I have registered the script using win32com.server.register. Then I manualing modified the registry entries so it would be asociated with inventor as an addin. The addin now shows up on the addin menu but it does not show loaded. When I load it from that menu nothing happens and it is shown as unloaded when I go back to check it. 

 

I know the code is good and that it is registered with windows correctly because I can call it with VBA and it runs as expected. I have to assume that I don't have something set right in the registry but I haven't been able to find much documentation on how things should be set up. I am getting close to making this work. When I do I will share all my code and do a write up on the wiki so others will know how to proceed.

Message 3 of 3
xcrx
in reply to: xcrx

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

Post to forums  

Autodesk Design & Make Report