Inventor Customization

Reply
Contributor
xcrx
Posts: 15
Registered: ‎08-25-2010
Message 1 of 3 (372 Views)
Accepted Solution

Listening to Events(Python)

372 Views, 2 Replies
06-21-2012 05:49 AM

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?

Contributor
xcrx
Posts: 15
Registered: ‎08-25-2010
Message 2 of 3 (335 Views)

Re: Listening to Events(Python)

06-27-2012 09:53 AM 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.

Contributor
xcrx
Posts: 15
Registered: ‎08-25-2010
Message 3 of 3 (317 Views)

Re: Listening to Events(Python)

07-06-2012 03:59 AM in reply to: xcrx

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube