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.

My standard content

RyanWiebeRyanWiebe Member Posts: 8 ✭✭
I have created a hot rivet and would like it to behave the same way as the standard content does in assemblies. Is this possible? 

Best Answers

  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    Answer ✓
    you can't make it exactly like standard content, but since you've got it all configured it's pretty similar. Here are some tips to make it more similar:
    1. make a Variable Studio which corresponds to the holes you need for the rivet, so you can avoid needing to reference a table for them when you're modeling parts for them.
    2. Assign materials
    3. Configure the part number and name. You can use the native "Configured Properties" workflow or my Part Name custom feature, which could be more helpful since it's easier to generate the name via some kind of equation.
    4. tag the document something like "hardware" so that you can get at it really easily from any assembly. When you're searching for parts to add to an assembly with the insert dialogue, and are looking at "other documents", you will see that tag there so you can get to it without needing to search.
    Evan Reese
  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    edited October 2022 Answer ✓
    Use the Replicate command in the assembly to get a similar patterning thing. You can't do it quite as seamlessly as when inserting from standard content, but it's still pretty dang fast.

    As for the name display issue, it's something I may be able to fix inside the feature at some point. I'm aware of some issues with it, like the fact that it fails to "Round formulas" when there are valueWithUnits and not just plain ol' numbers. The reason you see this is that all dimensions in Onshape under the hood are in meters, and Onshape doesn't have infinite precision. That's why you should be just seeing 0.0254m which equals 1 inch, but you get that 2 way out in the gazillionths place. Here's what you've got to do to workaround it for now:
    1. Remove the units using division. For example 1 * inch / inch = 1 or in your case #length / inch = 1
    2. Round the value to something sensible. For example roundToPrecision(#length/inch, 3) will remove the inch units, and round to 3 decimal places. Be sure to divide by the same units you want to display. For example, if you wanted to show it in millimeters even though the length is typed in inches, you'd divide by millimeter and should get the number 25.4.
    3. Add extra text. Since you've stripped out the units, you may want to add them back in for the name. You can concatenate strings with ~
    Here's how that might play out:

    "Length-" ~ roundToPrecision(#length/inch, 3) ~ "-Inch"

    should give you Length-1-Inch in the part name. You can add the extra text by adding more "string" field to the feature, or just adding them to your equation like the example above.
    Evan Reese
  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    Answer ✓
    This thread inspired me to finally solve some of my frustrations with the Part Name feature, so I updated it. It can handle the units a bit better now. See more of what changed here.
    Evan Reese

Answers

  • GWS50GWS50 Member Posts: 421 PRO
    it would be great to have a user library that could be added/used in the 'Standard Content' library. There are so many parts/bolts/screws etc that I have to download from McMasterCarr.
  • GWS50GWS50 Member Posts: 421 PRO
    M2 Csk hex head screws to name but one.....
  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    Answer ✓
    you can't make it exactly like standard content, but since you've got it all configured it's pretty similar. Here are some tips to make it more similar:
    1. make a Variable Studio which corresponds to the holes you need for the rivet, so you can avoid needing to reference a table for them when you're modeling parts for them.
    2. Assign materials
    3. Configure the part number and name. You can use the native "Configured Properties" workflow or my Part Name custom feature, which could be more helpful since it's easier to generate the name via some kind of equation.
    4. tag the document something like "hardware" so that you can get at it really easily from any assembly. When you're searching for parts to add to an assembly with the insert dialogue, and are looking at "other documents", you will see that tag there so you can get to it without needing to search.
    Evan Reese
  • RyanWiebeRyanWiebe Member Posts: 8 ✭✭
    @Evan_Reese Thank you! I’ll apply those ideas. 

    Just curious also if there is a way to auto-populate the rivets to the holes while dropping them into an assembly much like the standard content does?
  • RyanWiebeRyanWiebe Member Posts: 8 ✭✭
    @Evan_Reese

    I’m just not sure why I’m getting the result I am getting…
  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    edited October 2022 Answer ✓
    Use the Replicate command in the assembly to get a similar patterning thing. You can't do it quite as seamlessly as when inserting from standard content, but it's still pretty dang fast.

    As for the name display issue, it's something I may be able to fix inside the feature at some point. I'm aware of some issues with it, like the fact that it fails to "Round formulas" when there are valueWithUnits and not just plain ol' numbers. The reason you see this is that all dimensions in Onshape under the hood are in meters, and Onshape doesn't have infinite precision. That's why you should be just seeing 0.0254m which equals 1 inch, but you get that 2 way out in the gazillionths place. Here's what you've got to do to workaround it for now:
    1. Remove the units using division. For example 1 * inch / inch = 1 or in your case #length / inch = 1
    2. Round the value to something sensible. For example roundToPrecision(#length/inch, 3) will remove the inch units, and round to 3 decimal places. Be sure to divide by the same units you want to display. For example, if you wanted to show it in millimeters even though the length is typed in inches, you'd divide by millimeter and should get the number 25.4.
    3. Add extra text. Since you've stripped out the units, you may want to add them back in for the name. You can concatenate strings with ~
    Here's how that might play out:

    "Length-" ~ roundToPrecision(#length/inch, 3) ~ "-Inch"

    should give you Length-1-Inch in the part name. You can add the extra text by adding more "string" field to the feature, or just adding them to your equation like the example above.
    Evan Reese
  • RyanWiebeRyanWiebe Member Posts: 8 ✭✭
    @Evan_Reese That works great! Thank you.
  • EvanReeseEvanReese Member, Mentor Posts: 2,136 ✭✭✭✭✭
    Answer ✓
    This thread inspired me to finally solve some of my frustrations with the Part Name feature, so I updated it. It can handle the units a bit better now. See more of what changed here.
    Evan Reese
Sign In or Register to comment.