Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

IMPROVEMENT - Dragging configurations

Chris_KellyChris_Kelly Member Posts: 5 EDU

Having done a lot of large configuration table management, it would be great to be able to drag configurations in lists to reorder them. This could be done by temporarily disabling updates (so there aren't lag spikes when you drag them around), then confirm when you have the order you want. Similar to reordering the boolean parts list.

Comments

  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 150 PRO
    edited January 13

    Agreed, and when moving up several options, especially across several documents where we might have similar configuration lists, this can take a chunk of time. I actually wrote some JS that you can copy/paste into the console of the web inspector that at least automates it to some extent. Here it is, if it's helpful.

    To use, open the inspector in Chrome (press F12 on your keyboard)

    Click on the three dots next to the config parameter you want to move

    Press Ctrl + Shift + C

    Click on Move up/move down (depending on which direction you want to move it in

    Copy and paste this code and put it into the Console in the web inspector (change count to the amount of spots you want to move the param)

    $move = $0;

    const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay));

    const repeatedMove = async () => {
    count = 5; // CHANGE THIS TO HOW MANY SPACES YOU WANT IT TO MOVE UP OR DOWN
    i = 0;
    while(count != 0)
        {
            if(document.getElementsByClassName("working-progress").length == 0)
            {
                $move.click();
                count -= 1;
                console.log("moved");
            }
            console.log(i);
            i += 1;
            if(i > 500)
                break;

           await sleep(1000);
        }
        console.log("done");
    }

    repeatedMove();

    Press enter and it should start moving the param

    Applications Developer at Premier Custom Built
    chadstoltzfus@premiercb.com
Sign In or Register to comment.