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?
Am I missing something here?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: 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
RE: Round Function
"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 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
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.