×
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

Round Function

Round Function

Round Function

(OP)
Is there no round functionality built in to Pro?  We faked it with a ceil(d#-.51), but that seems a bit more cumbersome than round(d#).

Am I missing something here?

RE: Round Function

There is no round function.
What are you trying to do with the value?
There may be a better method if we know more about what you are trying to accomplish.
Is the value being used to drive a feature or in a table?

"Wildfires are dangerous, hard to control, and economically catastrophic."
"Fixed in the next release" should replace "Product First" as the PTC slogan.

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: Round Function

(OP)
We are trying to use a relation to determine the number of instances in a pattern.  For it to work correctly, we need to round as opposed to floor or ceiling.

RE: Round Function

The number of occurances for each direction in the pattern should themselves be parametric values. Just use them.

"Wildfires are dangerous, hard to control, and economically catastrophic."
"Fixed in the next release" should replace "Product First" as the PTC slogan.

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand

RE: Round Function

I had run into something similar when making a program for ProE.  I don't have the program available because it is at a former employer, but I'll tell you what I remember.

I wrote the program to compare both the floor and ceiling values.  If the difference between the original value and the floor or ceiling was greater than .5, I would use the other floor/ceiling value.  Kind of a round-about way, but should work.  Just have to make a few if-then statements.

Hope this helps.

RE: Round Function

Mike's solution sounds like the best way to go about it. The problem with equating the number of pattern instances (pXX) to the real number value is that it always seems to round down.

This could be done with a user program as well. Pro/E's relations editor has a "User Prog" option that lets you link your file to a C program. I've never really been able to make it sing. Anyone had any experience with this? I have a part I made a while back with an attempted link to a simple C program, but I don't think I set Pro/E up for this correctly (there is an include file called "spgusrgl.h" and a few environment variables that had to be set up, and I don't think I did it correctly). Searching through Pro/E's help documentation for "User Prog" tells you about it, but it didn't really help me set it up.

Anyways, if you could make this work, you could write a simple C program to round these values for you.

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