Model selection interface from LUA

Terry Vogler
Terry Vogler Altair Community Member
edited February 2023 in Community Q&A

Is there a Lua scripting method to capture the in-screen selection of geometry or mesh elements?

I'd like to use that selection and only run a script on the selected objects.

Tagged:

Answers

  • David_22485
    David_22485
    Altair Employee
    edited February 2023

    Hello @Terry Vogler 

    I don't think there is a method to grab the current selection like that from the API.

    A workaround could be to script record (Record Macro action) a 'dummy' action like show/hide for your geometry and mesh elements. Then you can extract the objects you need a handle on.

    I normally end up using a more advanced editor like Visual Studio Code to then make multi-line changes or RegEx for search and replace of the 'dummy' action.

    Hopefully, that helps...

  • Terry Vogler
    Terry Vogler Altair Community Member
    edited February 2023

    @David Thanks for the suggestion and work around. I will get to this eventually, and the approach makes sense.