Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Replace sketch with expression?

Status
Not open for further replies.

Skifree

Mechanical
Nov 8, 2012
3
I have a model that have 10 different "start" sketches. I choose one of theese depending on which configuration I want to have in the final product. All other features in the model are the same and this works really well but I'm wondering if it's possible to have an expression that chooses the sketch? It would be really good if I just have an expression where I just enter a number between 1-10 and the feature selects the sketch according to this. Is this possible?

NX 7.5
 
Replies continue below

Recommended for you

How do you choose the sketch?
By editing section in, for example, extrude/revolve or...?
 
The sketch I want to replace is used by a revolve. As today I manually have to replace the sketch in the dependencies of the revolve. It would be nice if I could this with expressions.
 
Based on your information regarding that all the other features are the same I would propose this as an alternative solution:

1. Create a small body (extrude or revolve) in a position that ensures it to always be within an area/volume that are common for all the sketches (so that you can use boolean unite to unite the revolves from your sketches thus "consuming" this small body completely). This gives you an "body ID" that is constant regardless of which features you add/subtract to/from it.

2. Create a revolve and unite for all your 10 sketches respectively, uniting them to your body (1).

3. Use suppression by expression to suppress/unsuppress your revolve and unite for each sketch.

4. Generate IF / ELSE expressions for each of these suppression by expression sets allowing for you to have an specific expression that you can give value 1-10 depending on which set you would like to use.
For example: IF(start_sketch_nr = 1)(1) ELSE (0) where start_sketch_nr is your expression determining which "sketch" to use.

Tip:
Use your, existing, first revolve to create your body (1) and thereafter create new revolves for the sketches. This way you won't need to reassociate your following, already created, features...

Please excuse me if I'm unclear or if I'm describing obvious things. I don't know what level your modeling skills are at. :)

Best regards
/Lars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor