×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

using weight in expressions

using weight in expressions

using weight in expressions

(OP)
I am new to this site but haven't found anything on what i am trying to do yet. Basically I have a final unit assembly i need to put a base under. The base is created from I-Beam. I want to set up an expression that either changes the dimensions of the i-beam according to the unit weight or suppresses/un-suppresses different size i-beams. Either is fine. However i can't seem to get the i-beams to change either way after the weight changes. Below are examples of the different expressions i created but dont seem to work. Any ideas what i am doing wrong?

Beam_Heighta if(A_Unit_Weight<=1000)(12.25)else(Beam_Heightb)
Beam_Heightb if(A_Unit_Weight>=1001&&A_Unit_Weight<=5000)(18.59)else(Beam_Heightc)
Beam_heightc if(A_Unit_Weight>=5001&&A_Unit_Weight<=10000)(24.3)else(Beam_Heightd)
Beam_Heightd if(A_Unit_Weight<=10001)(36)else(Beam_Heightb)

12" I-Beam if(A_Unit_Weight<1000)(1)else(0)
18" I-Beam if(A_Unit_Weight>1001&&A_Unit_Weight<5000)(1)else(0)

RE: using weight in expressions

Is this exactly what you have so far? If so, I'm surprised it even let you enter the equation for Beam_Heightd because there is a cyclic reference in there. Perhaps the Beam_{h|H}eightc typo let it through.

www.nxjournaling.com

RE: using weight in expressions

(OP)
thats exactly what i had in there. I saw that reference and meant to change it before posting this and forgot. I have since changed my expression.

RE: using weight in expressions

Also, you will have problems if 1000 < A_Unit_Weight < 1001 or 10000 < A_Unit_Weight < 10001.
These formulas would catch all values up to 10000:

CODE

Beam_Heighta if(A_Unit_Weight<=1000)(12.25)else(Beam_Heightb)
Beam_Heightb if(A_Unit_Weight>1000&&A_Unit_Weight<=5000)(18.59)else(Beam_Heightc)
Beam_Heightc if(A_Unit_Weight>5000&&A_Unit_Weight<=10000)(24.3)else(Beam_Heightd)

www.nxjournaling.com

RE: using weight in expressions

You want one part in your assembly to drive geometry in another part in the assembly, to do so make sure interpart modeling is turned on (customer defaults -> Assemblies -> General -> Interpart Modeling) assuming the site standard allows it. If you are working across levels of the assembly, you may need to force an update (Tools -> Update -> Interpart Update -> Update All).

What version of NX?

www.nxjournaling.com

RE: using weight in expressions

(OP)
NX version 6

RE: using weight in expressions

(OP)
ok i will have to try that. Is there anyway i can do it all inside the same part file?? the final unit assembly is like an "automation". I have about 10 parts in it all done with sketches. I change 6 inputs and all the sketches update accordingly through expressions. Now I need to make the I-beam base update with it as well but it will be based on the size & weight of the unit assembly. I hope that makes sense.

RE: using weight in expressions

Quote (druzil69)

I have about 10 parts in it all done with sketches.

Just to be clear: do you have 10 separate part files added as components to this assembly, or do you have 1 file with 10 different sketches in it representing 10 different parts?

www.nxjournaling.com

RE: using weight in expressions

(OP)
10 different sketches, representing 10 different parts. i would like to either keep the base in the same file if possible.

RE: using weight in expressions

I tried to recreate your expressions in your first post, but NX would not accept the formula for Beam_Heightd, it gave a cyclic reference error.
Make sure the delayed after update option is turned off (Tools -> Update).

Are you using units on any of these expressions? Perhaps if the units don't work out it won't apply the values (ie trying to drive a length in a sketch with an expression that has units for pressure).

www.nxjournaling.com

RE: using weight in expressions

The expressions do not evaluate correctly because NX is trying to compare a constant with a weight value (technically a mass value, but we'll ignore that for now).

Create an expression such as weight_condition_1 and give it a value of 1000 lbm (you will have to use the dropdowns to assign the units on the expression). Now change your beam height expressions to be something like:
Beam_Heighta if(A_Unit_Weight<=weight_condition_1)(12.25)else(Beam_Heightb)
You'll see that it now updates correctly when the weight (mass) of the cylinder changes.

Optionally, you might also want to assign the Beam_height expressions unit values of inch to better capture your design intent.

www.nxjournaling.com

RE: using weight in expressions

(OP)
Well look at that. Its exactly what i was trying to do. Thank you so much!!!! Just a question i guess, why do i need that intermediate step "weight condition". why can't i just link the beam height directly to the unit weight value??

RE: using weight in expressions

The expression A_Unit_Weight is defined in terms of units, the number 1000 in your equation has no units associated with it. To create a logical comparison, both items you are comparing must have equivalent units. Is 500 lbs > 8? Well, that depends on the units associated with the value of 8: 8 grams? 8 tons? 8 amps? A true, false, or you can't do that! answer depends on the units.

I created an intermediate expression that had the same units as A_Unit_Weight. This is a quick & easy way to create a consistent comparison. Perhaps there is a way to add units to a value directly within your equation. I have not tried that.

www.nxjournaling.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources