Feature Library best practices

Here we have answers to common questions about SolidWorks. If you want to request or contribute answers, just flag down a moderator.
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Feature Library best practices

Unread post by berg_lauritz »

I recently got more into trying to properly design library features. So I know that you should try not to use many external references & keep everything as clean as possible.
Now I still do struggle with placing those library features properly and here is one common problem:
  • I drag the feature onto the face/plane
  • the preview does not show the correct orientation
  • Screenshot 2021-10-05 102559.png
  • there is no way to 'pre-align' the feature
  • when adding a placement dimension I am not able to flip this dimension
  • when working without a placement dimension I have to go into the feature & add a dimension which is very cumbersome
  • angles usually fail
Is there any way to pre-align the library feature when dragging it in?
What's the best practice on how to flip the dimension? Configurations for the library feature?
How do you tackle this problem?
Did I miss something incredibly obvious? I cannot believe I would be the first to encounter this problem...

Edit: attached the library feature
Attachments
TOE-SCREW-HOLE.sldlfp
(89.2 KiB) Downloaded 50 times
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Feature Library best practices

Unread post by jcapriotti »

Any external references should have you select them when inserting.

Can you attach the library feature?
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Feature Library best practices

Unread post by berg_lauritz »

jcapriotti wrote: Tue Oct 05, 2021 11:43 am Any external references should have you select them when inserting.

Can you attach the library feature?
I just did.
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Feature Library best practices

Unread post by jcapriotti »

What do you mean by flip the dimension? I dragged your feature in and selected edges 90° to thee insertion and it rotates the feature as expected.
LibFeature.gif
Jason
User avatar
mattpeneguy
Posts: 1380
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2487
x 1888

Re: Feature Library best practices

Unread post by mattpeneguy »

berg_lauritz wrote: Tue Oct 05, 2021 11:31 am I recently got more into trying to properly design library features. So I know that you should try not to use many external references & keep everything as clean as possible.
Now I still do struggle with placing those library features properly and here is one common problem:
  • I drag the feature onto the face/plane
  • the preview does not show the correct orientation
  • Screenshot 2021-10-05 102559.png
  • there is no way to 'pre-align' the feature
  • when adding a placement dimension I am not able to flip this dimension
  • when working without a placement dimension I have to go into the feature & add a dimension which is very cumbersome
  • angles usually fail
Is there any way to pre-align the library feature when dragging it in?
What's the best practice on how to flip the dimension? Configurations for the library feature?
How do you tackle this problem?
Did I miss something incredibly obvious? I cannot believe I would be the first to encounter this problem...

Edit: attached the library feature
Your relations don't include any horizontal or vertical ones. So, as far as I can tell you are doing this correctly.
Unfortunately, I don't have a solution for you...I ran up against this same exact scenario about 3 weeks ago and didn't find a solution. Hopefully someone else has figured this out and will weigh in.
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Feature Library best practices

Unread post by berg_lauritz »

jcapriotti wrote: Tue Oct 05, 2021 12:26 pm What do you mean by flip the dimension? I dragged your feature in and selected edges 90° to thee insertion and it rotates the feature as expected.

LibFeature.gif
But If I want to dimension it from the other side... It does not work. If I could enter a negative placement dimension I could still make it work though.
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Feature Library best practices

Unread post by jcapriotti »

I wouldn't use dimensions, lock it down to a sketch point. Then add a location sketch prior to the insert to control location. For rotation I added an angle dimension so you can orient it, however you could still use an edge if you prefer.

Here's the library feature, I removed locating dimension and put in a location sketch with a single point. Also added angle.
image.png
Drag and drop, you only need to select the point.
image.png
Rotate using the angle dimension. I have the rotation angle origin wrong but you get the idea.
image.png
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Feature Library best practices

Unread post by berg_lauritz »

I wouldn't use dimensions, lock it down to a sketch point. Then add a location sketch prior to the insert to control location. For rotation I added an angle dimension so you can orient it, however you could still use an edge if you prefer.

Here's the library feature, I removed locating dimension and put in a location sketch with a single point. Also added angle.
Is that how it's intended to be used? It's just something I have to get used to, but this is beneficial in many cases anyway, because I like patterns anyway. It's just a different approach that we have to get used to & that's okay, I think.

A configuration is the other option, correct?

The sketch gives you way more freedom though....

Edit: We'll try it out & discuss. Maybe this is the answer we need. Thank you @jcapriotti .
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Feature Library best practices

Unread post by jcapriotti »

Just one way, we have a configurable panels for buttons and other accessories that are order specific. Just easier to drop and attach to points than other geometry.

Other tricks you may have figured out:
  • Avoid horizontal and vertical relations at all cost if you plan to rotate, use parallel and perpendicular
  • Avoid as many relations and dimensions to external features as possible.
  • If you have a configurable feature, you can create a global variable and link the dimension to it in the Library feature part. Then having the same global variable in the part will link up the library feature dimensions so you can control several at once.
Jason
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Feature Library best practices

Unread post by jcapriotti »

berg_lauritz wrote: Tue Oct 05, 2021 2:01 pm A configuration is the other option, correct?
You could try configurations. ....you just end up with two sets of features in one part. And of course there is always just dissolve the library feature and reattach dimensions however you need.
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Feature Library best practices

Unread post by berg_lauritz »

If you have a configurable feature, you can create a global variable and link the dimension to it in the Library feature part. Then having the same global variable in the part will link up the library feature dimensions so you can control several at once.
sounds very powerful, but SO DANGEROUS! <ll>
User avatar
mattpeneguy
Posts: 1380
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2487
x 1888

Re: Feature Library best practices

Unread post by mattpeneguy »

Thanks @jcapriotti,
I was doing it wrong and couldn't find your method a few weeks back. This forum is becoming the resource the old forum was more and more every day.
Page bookmarked in my SW folder!
And time to update my library component to be rotatable.
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1232
Contact:

Re: Feature Library best practices

Unread post by mike miller »

berg_lauritz wrote: Tue Oct 05, 2021 2:57 pm sounds very powerful, but SO DANGEROUS! <ll>
I disagree. I think global variables are a powerful and safe way to drive your model from a central point. Most proficient Solidworks users will be able to see quickly what's going on, as long as you named things better than "Dim1". :)
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
User avatar
AlexB
Posts: 437
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 22
x 242
x 385

Re: Feature Library best practices

Unread post by AlexB »

I just got into this a couple of weeks ago with adding hydraulic connection ports (library features) to our design library. They don't require rotation like your part, but I learned a lot of lessons about configurations and design tables in library parts.

I expected to be able to use equations to control some of the features within the library part but found that those propagate to the part that they are inserted into which made the equation manager REALLY full of things like THREAD_DEPTH@CosmeticThread1, THREAD_DEPTH@CosmeticThread2, etc. for over 30 ports on the manifold file. This blew up the equation manager and caused a huge headache so I used the design table instead to handle equations with Excel's formulas. It's not pretty but it doesn't break anymore.

There's a learning curve to all of this stuff so I really appreciate the input everyone is giving here because it does and will help with future part setups.
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Feature Library best practices

Unread post by berg_lauritz »

AlexB wrote: Wed Oct 06, 2021 9:20 am I just got into this a couple of weeks ago with adding hydraulic connection ports (library features) to our design library. They don't require rotation like your part, but I learned a lot of lessons about configurations and design tables in library parts.

I expected to be able to use equations to control some of the features within the library part but found that those propagate to the part that they are inserted into which made the equation manager REALLY full of things like THREAD_DEPTH@CosmeticThread1, THREAD_DEPTH@CosmeticThread2, etc. for over 30 ports on the manifold file. This blew up the equation manager and caused a huge headache so I used the design table instead to handle equations with Excel's formulas. It's not pretty but it doesn't break anymore.

There's a learning curve to all of this stuff so I really appreciate the input everyone is giving here because it does and will help with future part setups.
are you able to post an example for reference purposes, @AlexB ? This is something we will probably start with next year!
User avatar
AlexB
Posts: 437
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 22
x 242
x 385

Re: Feature Library best practices

Unread post by AlexB »

berg_lauritz wrote: Wed Oct 06, 2021 12:29 pm are you able to post an example for reference purposes, @AlexB ? This is something we will probably start with next year!
Unfortunately not, some of the data is proprietary. However, I'm sure there is something that could be put together to show the concept. If I have time, I'll post it here.
MattW
Posts: 51
Joined: Wed May 12, 2021 12:39 pm
Answers: 2
x 5
x 30

Re: Feature Library best practices

Unread post by MattW »

Eliminate as many external references as you can. If dimensions are important, setup some contstruction geometry and dimension that, and then align the construction geometry to whatever features you want. Pre aligning isn't possible as far as I can tell, it is going to follow whatever orientation the library feature was created in. So, drag the library feature onto the desired plane, and then open the sketch to locate it. BTW, with the way you are locating your revolve, you could open the sketch and reverse the dimension there, but I think that is cumbersome.

Even after changing the hole to "thru all", it is still looking for the termination edge for some reason. I am having trouble with simple holes, so I don't know if that is a bug or a setup issue. I haven't tried it yet, but I would guess just a cut-extrude would work fine.
Post Reply