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.

Referencing Array Parameter Index in Item Label Template

mahirmahir Member, Developers Posts: 1,307 ✭✭✭✭✭
Is it possible to access and include the index of each array parameter in its label? Something like "Item label template" : "Line #index" ?


Answers

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    In development, we figured something like that would ultimately be confusing. Let's say a user sets parameters on "Line 3", then removes "Line 2". Suddenly, "Line 2" is still there (with no indication anything changed until you scroll to the bottom), and the parameters on "Line 3" are no longer associated with the item named "Line 3". For that reason, we chose to allow naming of items based exclusively on their content, not their index.

    Do you agree? Can you think of a natural way of getting around the issue?
  • mahirmahir Member, Developers Posts: 1,307 ✭✭✭✭✭
    I personally wouldn't mind if the array index reset itself when adding/removing members. It's no different than seeing a list of geometry (vertex of Extrude3, etc). I usually can't tell offhand what that geometry is until I highlight it, but at least it differentiates one line of a selection from another. I can see how it would be confusing, but no one would be forcing anyone to use indices if they're not needed. Sometimes the array content just isn't sufficient to differentiate array members via a simple label. In my case it will be used in a case where other identifying information may be identical other than a geometric query, so having some form of differentiation would be helpful - even if it's dynamically changing.

    Another option would be to make array indices static, i.e. removing #2 does not renumber #3. The array indices could then be renumbered as part of the EditFeature function. I personally don't like this option. Skipped numbers would just get on my nerves. My brain would always think 1, 2, 4... wait, where's 3!?


Sign In or Register to comment.