Jump to content

Execute code after selecting an object


Recommended Posts

Hi all

I would like to create a code that is executed when an object is selected. Optimally it would be any object, determined by its name, but if it's easier it could be a PIO.

Is this possible (only in Python) and if so are there any examples?

Thanks in advance for the answers.

Link to comment

Python is a runtime language, so you’re not able to have any sort of listeners that can respond to various events. 
An event enabled plug-in object is going to raise the WidgetPrep event when it’s selected, though it will also raise that event any time you change a parameter. 
You can develop an SDK module (using c++) that responds to selection changes. 

Link to comment

The process is not particularly easy, especially if you're not already familiar with compiling applications with Xcode or Visual Studio. It's probably not worth while if the automation is for a single user.


You can, in theory, call a python script from an SDK plug-in, though once you have it figured out coding directly with the SDK had a lot of advantages.


Would you mind sharing more about what exactly you would like to automate? That could help us direct you to another possible solution.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...