Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

HOW to read/write in an expression value the total weight of my assembly? 1

Status
Not open for further replies.

Pjone kenobi

Mechanical
Sep 19, 2018
44
hello,

I try to put into an expression ("MASS") the total weight of my assembly.
does it exist this kind of function? May I've to do a NXopen program...
Somebody could help me?
Thanks a lot
 
Replies continue below

Recommended for you

Hello,
You can use function meassure body and select "associative", so NX will create associative body_meassurement. Then it will show in expressions.

With best regards
Michael
 
Hello,

Yes, of course but the part number is changing so I can't use this kind of function.
Do you have an other Idea like UFWeight.AskProps(...)?


Thanks for your help
 
I have a journal to count mass for each part in assembly and write it in part file properties. In this case must be a global variable, which will be increased after each part count.

With best regards
Michael
 
niedzviedz said:
I have a journal to count mass for each part in assembly and write it in part file properties. In this case must be a global variable, which will be increased after each part count.

Can you share that journal please? I was planning to write something myself. maybe this will be a good start..

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11
 
Some example is here: Link. Afternoon I will look for this journal.

With best regards
Michael
 
Sorry, but my post speak about assembly.
I already tested this journal. Sure it runs well but only for body selected.
What I need is the part weight and more the assembly part weight.
Do you have an idea?

Thanks a lot for your help.

B/R
 
@ Pjone
He's offering you what your asking for. That was just a courtesy piece of sample code.

I'm tuned into this also... sounds like it would be a good solution to a glaring NX need.



Dave
Automotive Tooling / Aircraft Tooling / Ground Support Structures

NX11, Win 10 Pro
 
Thank you Micheal. It seems to work well in NX 1847.
Nice little tool.

Can you tell me if it measures every body in the part file or just the first one in the history line up?



Dave
Automotive Tooling / Aircraft Tooling / Ground Support Structures

NX11, Win 10 Pro
 
@niedzviedz

Thank you so much it runs perfectly!!! i will adapt it to my model. Nice.
One thing more, is it possible to give to the MASS_PJOne expression the value of the total Mass you've calculated and shown on your report?

Sincerly, your journal is very helpfull because I'm NXOpen Rookie and it misses me some tips to modify existing program.

Best regards

PJOne
 
@niedzviedz

Sorry for my last post, i didn't see the attribut Mass_prt.
Now i can use the value in my expression.

Many Thanks again[2thumbsup]

Best regards

Pjone Kenobi
 
It measure each body on layer = 1, because any unnecessary body I delete (by delete body) or if it is false, I move on layer 100.

With best regards
Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor