×
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

Volume Block Association using Body Measurement

Volume Block Association using Body Measurement

Volume Block Association using Body Measurement

(OP)
Ok so let me set the ground work.
Using UG NX7.5. Master modeled dwgs

What I’m trying to do is to make my volume block that is on my drawing to be always associated or to show a “NA” value when not. I already callout the attribute for volume on my drawing <X0.2@VOLUME_CM> where the expression “VOLUME_CM” = Body measurement (volume) /1000. “Because of our unchangeable defaults are set at mm^3 we divided by 1000 to get cm.)
What I am using now is : <X0.2@VOLUME_CM> says either the correct volume or the string “NA”. With this new code I get even closer by being able to out put a value or a string in one expression.

(String) NA="NA"
(Boolean) VOLUME_BOOLEAN=if(VOLUME_INTO_CM>0)true else(false)
(String) VOLUME_CM=if(VOLUME_BOOLEAN=true)(format("%0.2f",VOLUME_INTO_CM))else(NA) //IF WANTING TO CHANGE THE PRECISION REPORTED, CHANGE THE "%0.2f" TO "%#f" WHERE # IS THE NUMBER OF DECIMALS YOU WANT
[mm^3]VOLUME_INTO_CM=p41/1000 // or CHANGE THE P41 TO WHATEVER IS THE VOLUME MEASUREMENT
[mm^3]p41=0 //CHANGE THIS TO THE VOLUME MEASUREMENT

The end goal or what I want is a way to call out within the expression a ever changing body measurement p-value. Meaning each time I insert the volume block I want it to look for the new p-value body measurement volume regardless of its p-number. In vb it would be something to do with the righthandside. But I want it to all be internal to the expression list and not needing the vb to be run every time you change the solid.

RE: Volume Block Association using Body Measurement

One workaround would be to rename the volume expression after taking the body measurement. That way you are always looking for the same expression name, rather than some random system expression name.

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