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.

using "Item label template" to number array items

EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
I'm trying to name each item in an array parameter. My first thought was to add a hidden Count Parameter and update it with editing logic, which works, but doesn't update with you just click the button to add a new item. It waits till I change something else. Is there another way to do this? I might be overcomplicating it.
Evan Reese

Best Answer

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Answer ✓
    Can you link the code? Unless I'm misunderstanding, adding a new array item should rerun the editing logic function and allow the hidden parameters to be set.

Answers

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Answer ✓
    Can you link the code? Unless I'm misunderstanding, adding a new array item should rerun the editing logic function and allow the hidden parameters to be set.
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Thanks, Kevin. Just knowing that's a reasonable approach made me check my code again and I found I the editing logic for this was inside of a big if() that was giving the odd behavior I'm describing. So editing logic is your recommended solution for this though?
    Evan Reese
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Currently array item names depend only on feature parameters, so yes, I think editing logic is the only available solution. Feel free to submit an improvement request to introduce a syntax for including the item number!
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Thanks, If it seems to come up more often, I'll do that.
    Evan Reese
Sign In or Register to comment.