1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script Release: Fast Select for Assemblies

Discussion in 'Alibre Script' started by NateLiqGrav, Feb 29, 2020.

  1. NateLiqGrav

    NateLiqGrav Alibre Super User


    This script lets you select multiple objects in an assembly based on the settings you enter.

    For example you can set it to select only Sheet Metal Parts with the word "Plate" in their Name AND that are currently Suppressed in the top assembly (as shown in the picture).

    There are some oddities to be aware of:
    "Hidden" only detects what is hidden when editing the top assembly level. "Search in Sub-Assemblies" will correctly find objects in Sub-Assemblies that are hidden at the top assembly level. Objects hidden when editing lower assemblies aren't necessarily hidden at the top assembly level.
    "Made Flexible" can only apply to Assemblies.
    You can select things in Sub-Assemblies but you can't preform all actions on them (for example parts in Sub-Assemblies can only be deleted when editing that Sub-Assembly)

    If you have any issues or suggestions please post here about them. Also let me know if you use it and like it.

    Attached Files:

    Last edited: Oct 31, 2020
    cadtec, beastro, Mibe and 1 other person like this.
  2. NateLiqGrav

    NateLiqGrav Alibre Super User

    So... What do people think?
    cncgear likes this.
  3. cncgear

    cncgear Member

    NateLiqGrav likes this.
  4. NateLiqGrav

    NateLiqGrav Alibre Super User

    I'm glad you find it useful.

    As far as 'cost' analysis - I don't think that belongs in this tool as I don't want to combine them - but I'll think about adding an option in the other tool to show only selected.
    cncgear likes this.
  5. cncgear

    cncgear Member

    OK, many thanks.
  6. cncgear

    cncgear Member

    Just a query, do both tools ignore configurations and list parts regardless of which configuration is selected?
  7. NateLiqGrav

    NateLiqGrav Alibre Super User

    I haven't extensively tested them with configurations but I know there is a bug with AlibreScript or the Alibre API reporting the configuration it was last active with not the current configuration used in the assemblies.
  8. cncgear

    cncgear Member

    OK thanks.
  9. jhiker

    jhiker Alibre Super User

    I like it but after I've run the script and closed Alibre I get this...
  10. NateLiqGrav

    NateLiqGrav Alibre Super User

    I've noticed this occasionally but can't pinpoint a specific cause. I have a theory but inconsistent issues are hard to track down.
  11. simonb65

    simonb65 Alibre Super User

    I think it's because you're creating and calling COM stuff from a separate thread and COM doesn't like that?! I presume you've done that to act as a worker thread in the background??

    Edit: and doing a quick google may confirm that ...

    "You need to instantiate the COM object within each thread you will be using it in." This is the simplest way, but not technically correct. You can access the COM object on another thread, but if your COM object is apartment threaded, the thread it was created on must still exist and be pumping messages. If the thread it was created on dies, the runtime must Release the COM object, and you will get this error message if you try to access the object on another thread
  12. NateLiqGrav

    NateLiqGrav Alibre Super User

    I "get" that but I have yet to find anything that fixes it.
  13. simonb65

    simonb65 Alibre Super User

    I suspect its the AlibreScript engine that needs to cleanly release and close the script down (or a callback to the script to enable cleaning up of threads, etc) when the parent application (Alibre) is closing, but before it closes. A question for Andy?

Share This Page