Jump to content

Design Library - Auto scale feature once inserted


Recommended Posts

Posted

Hi,

 

I am new to SW but I have been trying to get a custom design library feature to autoscale. I have put in some hours getting what I wanted to do work and I am sure there must be an easier way :).

 

When I insert the feature , which is basically 4 cut outs in an edge, I would like to have the the first and last 50mm from the edge (as shown in diagram) and the other two equally spaced between the first and last.

 

Because when I did the library part the piece I did the features on was 300mm long and no matter how I tried with equations etc to space the middle two pieces it would be a fixed value based on the 300mm value. So when I tried to insert the feature into a piece of 400mm width it wouldnt scale itself.

 

I found out that if I did geometry to get the spacing then it worked but Is there an easier way ??

 

Sorry if this makes no sense :). I just want to scale the two inner bits equally :).

 

The cut out is made up of a 15mm hole and then a rectangle which is referenced to the hole.

 

The diagrams below show my library part and the geometry pic. This is the only way I could get the part to auto scale the center two bits when I connected the part to different length pieces.

 

Any help greatly appreciated.

 

Cheers

Troy

cam_4H.jpg

cam_4H.PDF

Posted

Is this something you use all the time? It sounds like a macro would work well for this setup. Are the holes always 15mm? Whats the width of the rectangle? are there any other features that are needed? What version of SW are you running? If i get a chance in a little bit ill draw up a design table to show you an easy way to do this.

Posted

I made a design table real quick that seems to update correctly. The main thing you have to be aware of is how to model everything so it will update correctly when altered. Here is a screen shot of the Design table inputs I gave the user. This is how it looks inside SW when you Edit the table.

 

Would something like this work for you where the user inputs things like the plate dimensions, distance from edge for the holes and so on. Basically I achieved this by using a curve driven pattern. I took the end edges of the plate and offset them 50mm. Drew a straight line from their midpoints and used that line for the curve. This way no matter how many features you do, 4 or 50, they will be evenly spaced along that line. The design table just provides the user with inputs to change the model, then you can save the model as a new file name(making sure to break all references). If you think this will work for you I can walk you through setting one up.

AdaptiveFeaturePic.jpg

Posted
I made a design table real quick that seems to update correctly. The main thing you have to be aware of is how to model everything so it will update correctly when altered. Here is a screen shot of the Design table inputs I gave the user. This is how it looks inside SW when you Edit the table.

 

Would something like this work for you where the user inputs things like the plate dimensions, distance from edge for the holes and so on. Basically I achieved this by using a curve driven pattern. I took the end edges of the plate and offset them 50mm. Drew a straight line from their midpoints and used that line for the curve. This way no matter how many features you do, 4 or 50, they will be evenly spaced along that line. The design table just provides the user with inputs to change the model, then you can save the model as a new file name(making sure to break all references). If you think this will work for you I can walk you through setting one up.

 

Matt,

 

Can you send me the part file? Just today I was experimenting with design tables. I would like to study your example. Thanks

Posted

Sure thing bill. Ill send it off to you tomorrow. Today is our software patch day at work so I can look forward to my computer crashing a few times if I try to do anything with it in the next 12hrs:) Do you have anything specific you were dealing with or do you just want the one I showed above?

 

Just a few notes. I find it easiest to model the part, possibly with multiple configurations if you want to keep one un-changed. Then create your design table using the Auto option. During the modeling process if you click on a dimension, in the properties area in the feature tree you will see the name of that dimensions. Example would be D2@Sketch1. You can rename these as long as you leave the @sketch part or @feature part. This really helps when setting up the spreadsheet being able to see your dimensions as HoleDiameter@sketch1 rather than D1@sketch1.

 

Also I try to make use of a lot of excel functionality. Mainly the use of design validation. Most installs of excel dont have the Developer tab loaded, but if you turn that Add-in on you get a lot of other nice tools for things like buttons. Also custom views come in handy.

 

Macros are a very powerful tool as well but my programming background is fairly limited and without a real use for them I can't see putting in the time for me.

Posted
Sure thing bill. Ill send it off to you tomorrow. Today is our software patch day at work so I can look forward to my computer crashing a few times if I try to do anything with it in the next 12hrs:) Do you have anything specific you were dealing with or do you just want the one I showed above?

 

Just a few notes. I find it easiest to model the part, possibly with multiple configurations if you want to keep one un-changed. Then create your design table using the Auto option. During the modeling process if you click on a dimension, in the properties area in the feature tree you will see the name of that dimensions. Example would be D2@Sketch1. You can rename these as long as you leave the @sketch part or @feature part. This really helps when setting up the spreadsheet being able to see your dimensions as HoleDiameter@sketch1 rather than D1@sketch1.

 

Also I try to make use of a lot of excel functionality. Mainly the use of design validation. Most installs of excel dont have the Developer tab loaded, but if you turn that Add-in on you get a lot of other nice tools for things like buttons. Also custom views come in handy.

 

Macros are a very powerful tool as well but my programming background is fairly limited and without a real use for them I can't see putting in the time for me.

 

Thanks Matt. As you know, I'm currently studying for the CSWP exam. After reviewing exam topics, I found two areas that are not my strong points. One being design table and the other simulation express. I'm currently reviewing varies tutorials on both topics. I've utilized the configuration feature in both parts and assemblies but never used the design table feature. I would like to see the part you used in your example for reference. I want to change the dimensions in the table and see how the part is affected. Thanks again for the help.

Posted
I made a design table real quick that seems to update correctly. The main thing you have to be aware of is how to model everything so it will update correctly when altered. Here is a screen shot of the Design table inputs I gave the user. This is how it looks inside SW when you Edit the table.

 

Would something like this work for you where the user inputs things like the plate dimensions, distance from edge for the holes and so on. Basically I achieved this by using a curve driven pattern. I took the end edges of the plate and offset them 50mm. Drew a straight line from their midpoints and used that line for the curve. This way no matter how many features you do, 4 or 50, they will be evenly spaced along that line. The design table just provides the user with inputs to change the model, then you can save the model as a new file name(making sure to break all references). If you think this will work for you I can walk you through setting one up.

 

Hey Matt,

 

Thanks so much for the reply.

 

That process sounds great but can it be done once the part is made. I have a need to put these cam holes on more than one edge of a part sometimes. Like 3 holes on one edge, 4 holes on another etc etc.

 

The holes are always 15mm , depth is 10mm , width of the slot is 8mm depth 9mm, this never changes. So is there a way you can use the design library to do exactly as your table does ??

 

Thanks again for the reply. You've given me something to read up on :).

 

I use SW09 if that helps.

 

Cheers

Troy

Posted

Sure thing bill. Let me know if you have any questions on the simulation stuff as well.

 

Troy. ill play around with it some more tomorrow. I know you can just draw a single feature and add it from the library but i'm not sure if it can be that adaptive while remaining 50mm from the ends the whole time. If it was just a fill pattern where its equal spacing id say probably yes. The tricky part is that equal spacing. With the design table setup you could create a part that has say 3 of these features but make your part 1/2 of the width, mirror it and create it with 4 features on the other. Id say this is getting less efficient by the minute:)

 

 

Bill, I will try to zip and attach the files to this topic tomorrow morning. If that doesnt work then ill just email them to you.

Posted

Hey Matt,

 

Thanks again for your time, really appreciate it.

 

The above is the only way I could get it to work. The midpoint was the key as if I used an equation or anything referenced to a length on the library part then it would assign it a fixed value and wouldnt change per part.

 

At the moment I have cam_3H for three holes in a length (center referenced to the midpoint) and cam_4H for 4 holes. It works fine but just thought there must be an easier way :).

 

Is there anyway you can use the midpoint of a line in an equation ?? other than D1@sketch1 / 2 etc ?? is there a syntax for the midpoint, I couldnt get that to work either :).

 

Cheers

Troy

Posted

Hey troy, hopefully some time today I will be able to play around with this a bit more.

 

Bill attached is the excel spreadsheet and the part file. Hopefully everything works when you open it. You might need to created a design table and use the From File option and select the excel sheet. In the excel sheet if you go to the View tab and Custom Views you can select Input or Data. Input is a view where I have hidden all the "junk". If you save it with this custom view on, this is what you will see in SW. In the context of the CSWP exam I dont think design tables are really the fastest way, but the way I have done it here is not really the best example of how you would use it for that test. Ill work up another quick example and send it to you via email since it doesnt apply to this question.

Posted

Hey troy, I figured out a way to do it but there is a slight twist. Ill try to explain.

 

First I drew a rectangular plate that was 50x200x15mm. The size doesnt really matter.

 

Second I created a reference sketch. If you look at the attached image you can see it. That sketch was each end of my plate offset 50mm, then a straight line between the midpoints of those lines.

 

Third I created a 15mm circle in a new sketch and extrude-cut it 10mm.

 

Fourth I created the rectangle which comprised of the offset end from the second step then converting the edge of the 15mm hole and trimming everything. The reason I offset that reference edge is so I dont have to specify the length of the slot. So say this plate is 50mm wide but you want to use it on a 100mm wide piece this would still work.

 

Fifth I create a curve driven pattern using that horizontal line that went between the midpoints in step 2. Make sure you select equal spacing.

 

Once you have all these features created you can open the design library(and pin it open) and ctrl select the two extrudes and the curve driven pattern into the feature library where you want(new folder).

 

When you create your new parts you need to draw your plate, then draw that same reference sketch I did in step 2. When you drag your feature onto the part you will need to select the point to center the first hole, the 50mm offset edge so it can define the slot, then the line between the midpoints to define the curve driven pattern.

 

 

Now what you need to do in order for this to work is create several of these features(which wont take any time). You will need a 3 key hole feature, 4 key hole feature and so on. The other option Is once you insert this feature into your new part, expand the feature library part in your feature tree and change the number of features in the curve driven pattern. This should not change your design library feature as long as you dont save the features as the sldlfp When you click on the feature in the tree, the number should appear on the model and will be a quick edit. I havent figured out a way to enter a number during the feature creation but I think this is a fairly efficent method.

KeyHolePattern.jpg

Posted

Hey Matt,

 

Thanks again for the reply.

 

Excellent instructions :). I did exactly what you did and like you say when I inserted it into a new part I needed to define the start point if the first hole and the horizontal line segment.

 

With the way I did it in my first post, all I need to do is click on the base line, two edges (left and right side of the part) and the top line of the part and it does it for me. This means I dont need to insert any lines or anything as those four lines are already there , which is easier for me.

 

I think because the way I did it initially uses the midpoint and the edges of the shape i didnt introduce any more lines/references.

 

I have learnt about curve driven patterns though :), They dont come up on my toolbar (i only get circular and linear) I had to check the menus to get it.

 

I think I will play with it more now I know the technique.

 

Thanks for all your help and time Matt. BTW in my previous posts I mentioned if a midpoint can be referenced in an equation. Is this possible I wasnt sure what the syntax was or even it it could be done.

 

Thanks again

Troy

Posted

Hi Matt,

 

Me again :). Sorry for more questions. But just curious.

 

If that reference line was always 24mm above the base and always 50mm from the side edges of the part. Is there anyway to make solidworks ask for the base and the two side edges when you insert the feature (instead of the reference line) ??

 

Or does it request that line instead because its used by the curve pattern.

 

Thanks again,

Troy

Posted

Hey troy. What is asked of you when you insert your feature from the library all depends on how you created the feature in the original part. In my example I used reference points/line to locate everything. If you located your first feature with a 50mm and 24mm dimension then it would require you reference edges to locate your part. Same thing, if you used a midpoint reference to create your sketches, then it will ask you for that. If you gave no reference(under defined sketch) it would not ask for it. I try to use converted enties, offsets and reference lines because the geometry updates based on your base part. If you need it to be 24mm from the edge every time then you can either give the curve for the pattern a 24mm dimension(not at the midpoint) or choose to define the entire feature another way.

 

The main reason I used the reference line was so my curve driven pattern had the length of the line. Offsetting the edges ensured that not only were they always 50mm off the edge, but that my curve driven pattern was based off a reference line between those so it always updates properly.

 

 

The main difference between the method I used and the one in your original post I think is that you did your array inside the sketch right rather than as a feature? Doing it as a feature allows you to easily adjust the number of features without entering a sketch or editing the feature. This is why I chose that route because you mentioned some times its 3 holes, some times 4 or more.

 

Ill try to work up another example that may be more suited towards what you are doing.

Posted

Troy I played with it a little bit over lunch and I am not seeing an easy way to do this keeping the ability to change it from 3 features to 4 and so on. Doing it in a sketch as you did will allow you to pick just the edges as reference but you loose the ability to change the number of features easily. Doing it by creating the refence sketch as I did takes a little setup but allows easy change of the number.

 

Ill have to think on it a bit more when i get the chance. Is the number of features always 3 or 4 or can it be any?

Posted

Hey Matt,

 

Thanks again for all your help and explanations. I think your technique is the way it should be done as you can change number of instances really easy, I have been playing with it :).

 

The designs I use typically only have 2,3,4 cam holes. And I have done library parts for all of them and have included 5,6 with your curve driven technique. It works perfect.

 

Yes I did that geometry thing in the sketch where I defined the location of the 15mm holes.

 

Cheers

Troy

Posted

Glad you have a solution that will work for you troy, and thanks for the question. I enjoy thinking about these types of problems. I really havent dont much with design library features besides forming tools for sheet metal parts so it was fun:) Ill keep thinking about it and if i come up with any other solutions Ill be sure to post them here:)

Posted

Thanks Matt really appreciate your time. :)

 

No need spend more time on it Matt, I have all I need now 2,3,4,5,6 have done a set for vertical and horizontal edges its so cool :)

Posted

When you insert your design feature if you drag it around your part it should correct itself. Look at the pop up image showing you what edges its looking for. If when you place it you are closer to one edge and you make your correct selections I dont think you would need a different one for vertical/horizontal. Im not at SW so i dont know that for sure, but i think thats how it works.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...