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.

Need to use a variable to define the entity count of a linear sketch pattern

neobobkrauseneobobkrause Member Posts: 105 EDU
The pattern constraint on a sketch can accept a numeric entity count value. However it won't accept a value based on a variable reference.

It might also be worth mentioning that I was able to use a variable reference to define the entity count of a linear shape pattern.

Comments

  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    This is a good use for variables, hope it gets fixed soon.
  • neobobkrauseneobobkrause Member Posts: 105 EDU
    Interestingly, the entity count of the constraint can take an expression. For example, 'round(100)' is accepted, yet 'round(#repeats)' is flagged as an invalid expression.
  • neobobkrauseneobobkrause Member Posts: 105 EDU
    edited January 2016
    Wah? I tried again this morning to use a variable reference in the definition of the entity count of a linear sketch pattern -- and it worked! Is it possible that the OnShape team really responds THAT quickly? Well done.

    Wait, what happened? The variable value was 5. When I entered the variable reference the entity count of the pattern changed to 5. But when I looked at the entity count definition I found a hard-coded value of 5. Use of a variable reference now back to generating an error. Investigating further.
  • thomas_kozakthomas_kozak Member Posts: 38 ✭✭
    I've asked about this previously and it is being looked at.  As you observed, you can currently create the pattern with a variable but it resets it to a hard-coded number and won't accept the variable after that.

    The workaround I was pointed to is to do any patterning as a feature rather than in the sketch.  In my case I was doing a variable-defined number of slots around an axis.  Using Face Pattern it's possible to set this to a variable.

    I agree that this needs to work in sketches as well.
  • noland_germainnoland_germain Member Posts: 2 ✭✭
    Any word on when this will be fixed? Very frustrating. The feature workaround is useless and/or extremely awkward in many use cases.
  • nathan_argetsingernathan_argetsinger Member Posts: 2
    I'm in the same boat.  Onshape was *very close* to being the perfect parametric generator for laser cutter templates requiring nested tessellations of patterns to share with my team.  Would very much be willing to implement this myself - the core
  • nicola_orlandonicola_orlando Member Posts: 2
    Hi, I've just had this exact same issue six years later? Wasn't this being looked at?
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,653
    No, it is not.
    Senior Director, Technical Services, EMEAI
  • neobobkrauseneobobkrause Member Posts: 105 EDU
    NeilCooke said:
    No, it is not.

    Ouch!
  • michael_unger759michael_unger759 Member Posts: 3
    oh ... i dind´t realise that this problem is that old ;) ... maybe there will be an answer soon ;)
  • mahirmahir Member, Developers Posts: 1,304 ✭✭✭✭✭
    edited August 2022
    In this thread @kevin_o_toole_1 gives a good explanation why it's not a small effort to add this capability. 
Sign In or Register to comment.