Truncating or Rounding Parameters

I am having difficulties figuring out how to truncate a relation
driven parameter in Wildfire 3.0. What I have is something like this:
(parameter) = (d1/d2)
Which is equal to a value, say 7.856522. I want this to be an
INTEGER. Either 7 or 8. I can work with either truncation or
rounding.
Any advise? I know it's probably simple, and I am just missing the
boat.
Reply to
B.Reilly01
Loading thread data ...
I am having difficulties figuring out how to truncate a relation driven parameter in Wildfire 3.0. What I have is something like this:
(parameter) = (d1/d2)
Which is equal to a value, say 7.856522. I want this to be an INTEGER. Either 7 or 8. I can work with either truncation or rounding.
Any advise? I know it's probably simple, and I am just missing the boat.
I think you're looking for an expression like BIG=CEIL(d1/d2); or SMALL=FLOOR(d1/d2) which produces the largest or smallest integer which the expression can produce. This is neither strictly rounding nor truncating. CEIL(1.1) produces the integer 2; and FLOOR(1.9) produces the integer 1, so FLOOR is effectively truncating. CEIL, however, has no discretionary rounding capability. Pro/e's internal programming functionality, compared with SW's integration of VB, blows garbage scows. If you've got another $10-20K to blow on additional software, you can decadently indulge in (no, not in Godiva Chocolates, but) Pro/TOOLKIT, PTC's interface to the kernel functionality, thus the ability to write the code that makes up for PTC's lameness and laziness and cheapness and unresponsiveness and backwardness and carelessness and arrogance and .... (a hundred more such adjectives). For the best that Pro/e has to offer, check 'Help>Help Center>Fundementals' and search for relations or one of the above functions. And welcome to the group.
David Janes
Reply to
David Janes
messagenews: snipped-for-privacy@g4g2000hsf.googlegroups.com...
integer 2; and FLOOR(1.9) produces the integer 1, so FLOOR is effectively truncating. CEIL, however, has no discretionary rounding capability. Pro/e's internal programming functionality, compared with SW's integration of VB, blows garbage scows. If you've got another $10-20K to blow on additional software, you can decadently indulge in (no, not in Godiva Chocolates, but) Pro/TOOLKIT, PTC's interface to the kernel functionality, thus the ability to write the code that makes up for PTC's lameness and laziness and cheapness and unresponsiveness and backwardness and carelessness and arrogance and .... (a hundred more such adjectives). For the best that Pro/e has to offer, check 'Help>Help Center>Fundementals' and search for relations or one of the above functions. And welcome to the group.
Thank you Mr. Janes, that was exactly what I needed. I had seen the floor and Ceil commands, but my training didn't include those and my reference book doesn't mention them, so I had no idea I was staring at exactly what I needed. Worked perfect, again, thank you.
Reply to
B.Reilly01
Thank you Mr. Janes, that was exactly what I needed. I had seen the floor and Ceil commands, but my training didn't include those and my reference book doesn't mention them, so I had no idea I was staring at exactly what I needed. Worked perfect, again, thank you.
FYI, another thing that approximates truncation (lopping off the decimal portion of a real number) is [.0]. Placing this as &parameter[.0] results in no decimals showing in the text, effectively truncating the real number to its lowest integer value. This doesn't actually change or round anything. This only effects the display of the number.
David Janes
P.S. Much more arcanery left to explore. But start with the Help menu. All the time, it is making me look smart.
Reply to
David Janes

Site Timeline

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.