Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parametric Holes and a new way to control them... 1

Status
Not open for further replies.

JohnRBaker

Mechanical
Jun 1, 2006
35,346
2
38
US
Sometimes even I stumble onto something in NX which I was not aware of before.

Over the years people have asked me, particularly when it comes to Threaded Holes; How do you edit holes parametrically (and not by editing the feature itself, but via Expressions)?

Well, prior to the NX 5.0 Advanced Hole project you really only had one method, you had to go in and defined each individual expression used by the hole feature, which in the case of a simple holes was usually only the diameter and perhaps a few extra values for Counterbored or Countersunk Holes, but for Threaded Holes, this could be several Expressions. And you really had to have access to something like the 'Machinery's Handbook' to get all the needed values.

Of course, with the NX 5.0 Advanced Hole project all you needed to do for Clearance and Threaded Holes was to just select the desired type and size from the dialog and you got what the standard says was appropriate for the size of Fastener being used. Now that was great when you originally modeled you parts or when you went back later that edited your models, but that was still only an interactive workflow. What if you really wanted to control all of this via expressions, or maybe even Attributes? Well it turns out to be a lot easier than I had ever expected it to be.

When you create one of these new Advanced Hole features, in addition to the actual numerical expressions that are created, there are also several Expressions which contains text strings which describe the type and size of the fasteners which they are designed to accommodate. Until yesterday I honestly thought that these 'string' Expressions were provided ONLY in case a user needed to extract the text for a Drafting note or an Attribute representing the type or size of one of these new Advanced Holes. Well, to my surprise I discovered that those text Expressions work BOTH ways. Not only can they be used to indicate the type or size of the hole, they can also be used to DRIVE the hole feature itself.

To see what I mean look at the attached part (saved in NX 6.0) to see how this works.

In this particular example I'm actually using attributes to drive the text expressions, and thus the hole features, just to give everyone an idea how flexible this can be.

Open the part and first check the Expressions and you will see both numerical and string expressions (which are being driven by the attributes, but you can see their values).

Now go to...

File -> Properties -> Attributes

...and note the attributes and their values.

Now edit the 'THREAD-SIZE' from 'M6 x 1.0' to 'M12 x 1.75' (be sure to get the text correct with no typos) and hit return and then OK (now until NX 8.0 you will still need to do a Tools -> Update -> Update for External Change to get the model to update).

Note that if you wish to change the thread from 'Coarse' to 'Fine', you will also need to change the 'THREAD-TYPE' attribute as well. And before anyone asks, YES, even though this is a Metric part, you can specify an Imperial Thread Size as long as you get the text correct for the both the 'THREAD-SIZE' and 'THREAD-TYPE' attributes. The best place to get the proper text is to look at entry values used in the Hole Feature dialog when changing the size or type. I also included a Counterbored Hole so that you can experiment with something like that as well.

Please note that you don't have to use Attributes as you can just edit the Expressions directly and get the same results.

OK, now that we know how this works, it opens up all sorts of possibilities when it comes to things like Family Table parts (you can now drive holes sizes and types directly using only a couple of simple Expressions). Also think of the logic and intelligence that can be built into a model once you realize that you can also control the size and types of the holes by only changing a few Expressions.

Anyway, I hope you take a look at this and perhaps get inspired yourself. And remember, if you look around you may also find some little known, or even UNKNOWN, capability just waiting to be discovered ;-)

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
That's pretty cool. Thanks for sharing. How many other part-attribute-type functions might be bidirectional?
 
I must have some settings not correct. When I add a new hole, its values don't show up in the attributes. How did you get your hole parameters to show up in the addributes?
 
They don't show up in Attributes, they show up in Expressions. What I did in the sample was simply create Attributes which would update (drive) the Expressions.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Can you list the form of the expressions. I can't open your file.

I've created some attributes in my part and I'm not trying to get the expressions to accept them, but they won't.
eg:

In attributes:

TOP_THREAD = "M6 X 1"

In expressions:

p104 = TOP_THREAD

but that doesn't actually work.
 
You will have to create the attributes. I missed that part as well. Look at the expressions and you will see how John did this. So if you added a 2nd threaded hole, that you want to be of a different size, you will have to create a 2nd set of attributes. John I also noticed in your file there is an attribute called PART_UNITS. What does that do for you?
 
Hi Bob,

I see, on tools-expresions,

I can change it with an exel file too.

both ways are so nice for changing the holes parameters,

Thanks.
 
Can you do something like this to control some sheet metal parameters? Say... When you're creating a flange: Inset: Material Inside/Material Outside?
 
No, there is no expression-driven method to control that, but it would be a nice feature to have. Perhaps if people starting using this capability with Holes and start submitting ER asking that since a precedent has already been set (with Advanced Holes), that perhaps we should consider taking this approach with other so-called 'form features'.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.
Back
Top