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

Script Release: Isolate v4

Discussion in 'Alibre Script' started by NateLiqGrav, Sep 12, 2019.

  1. NateLiqGrav

    NateLiqGrav Alibre Super User

    Isolate V4 Released:
    https://www.alibreforum.com/forum/index.php?threads/script-release-isolate-v3.21245/#post-137301

    Original Post for Reference:
    This script lets you Isolate selected objects in an assembly.

    To Isolate:
    Select objects, run the script.
    All other objects are hidden. Any that were already hidden are recorded.

    To End Isolate:
    Run the script again.

    Note:
    Use at your own risk. This script uses undocumented features of AlibreScript. Be extremely careful with modifications.

    Isolate v3.py had 12 downloads. Please use the newest version linked at the top of this post.
     
    Last edited: Sep 29, 2019
  2. NateLiqGrav

    NateLiqGrav Alibre Super User

    How do people like this script? Any problems?
     
  3. idslk

    idslk Alibre Super User

    Hello Nate,

    If i run isolateV3 the second time in a part and the isolated part is still selected, i have to unhide the hidden parts manually...
    I've not tried to find the reason, but i think the second state with the hidden parts overrides the initial state so the "third" start can't "recover" the the state from the first start...I don't know if this was intended.

    Regards
    Stefan
     
  4. NateLiqGrav

    NateLiqGrav Alibre Super User

    I assume you are running in the Assembly not "in a part".

    It should first check if the list exists in UserData.
    If there is a list then it uses it to end isolate and exits.
    (When it ends isolation it should restore the original hidden/shown state for all)
    If there is no list then it checks for selected items.
    If none are selected then it prompts the user to select some.
    If there are some selected then it isolates them.

    Do you have "save user data" checked in AlibreScript settings?
     
  5. idslk

    idslk Alibre Super User

    Sorry, of course...
    upload_2019-9-29_11-12-54.png

    If the script is executed the first time it hides all not selected parts and prints to the console: Isolate

    If the script is executed the second time with something or nothing selected (to get the parts unhidden) does nothing except printing to console : Nothing Selected to Isolate.

    Rarely (haven't found when...) it states "End Isolate" but nothing else happens...

    Regards
    Stefan
     
  6. NateLiqGrav

    NateLiqGrav Alibre Super User

    Hmmm, seems like it isn't saving UserData. I'll see what I find.
     
  7. NateLiqGrav

    NateLiqGrav Alibre Super User

    I figured it out. If there was nothing originally hidden by the user prior to running the script then it was not saving any UserData.
    Isolate V4 fixes this.
     

    Attached Files:

  8. idslk

    idslk Alibre Super User

    First Test: Works.:)
     
    NateLiqGrav likes this.
  9. NateLiqGrav

    NateLiqGrav Alibre Super User

    Thanks for testing. I'm happy when people tell me if it is or is not working. - I may otherwise never know. I was always testing in an assembly with things already hidden.
     

Share This Page