It is currently Thu May 23, 2013 6:36 am

All times are UTC





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Mar 14, 2012 11:20 am 
Offline
MCAD Lurker

Joined: 20 Nov 2010
Posts: 18
Country: United Kingdom
State: Non US/CAN Resident
CAD System: Inventor
Hi everybody,

I have a value of 3516.41mm and I want to round it to the nearest whole number.
I have tried to use the round command and it seems to round up to the nearest 10 so 3516.41mm would round up to 3520mm.
So how do I get would I go about rounding to the nearest whole number?

(I don


Share on FacebookShare on TwitterShare on DiggShare on DeliciousShare on TumblrShare on Google+
Top
 Profile  
 
PostPosted: Wed Mar 14, 2012 12:12 pm 
Offline
Forum Admin
User avatar

Joined: 29 Jan 2004
Posts: 13448
Country: United States
State: Florida
CAD System: Inventor
Internally Inventor does all calcs in cm units. I suspect this is what is causing this. You can get around it by doing the following

Image

IMO this is a bug as we have specified the unit of B to be mm.

_________________
Sean Dotson, PE
RND Automation & Engineering
Free 30 day trial of iPropWiz v5
Follow @seandotson & @mcadforums & @rndautomationon Twitter


Top
 Profile  
 
PostPosted: Wed Mar 14, 2012 12:24 pm 
Offline
MCAD Lurker

Joined: 20 Nov 2010
Posts: 18
Country: United Kingdom
State: Non US/CAN Resident
CAD System: Inventor
Great thanks for the help!

Is there any reason why the parameters B and C show up in red, is this just due to the fact that it


Top
 Profile  
 
PostPosted: Sat Mar 17, 2012 4:22 pm 
Offline
MCAD Guru
User avatar

Joined: 29 Jan 2004
Posts: 5170
Country: United States
State: California
CAD System: Inventor
However, the formula
ceil(isolate(a;mm;ul)) results in the number 3617
For it to work, you have to set the units for b to ul. Or you can convert twice from from mm to ul and back as shown in e


You do not have the required permissions to view the files attached to this post. You must LOGIN or REGISTER to view these files.


Top
 Profile  
 
PostPosted: Sun Mar 18, 2012 12:13 pm 
Offline
Forum Admin
User avatar

Joined: 29 Jan 2004
Posts: 13448
Country: United States
State: Florida
CAD System: Inventor
Odd that ceil and floor use UL as units. You'd think they would use the units of the argument...

_________________
Sean Dotson, PE
RND Automation & Engineering
Free 30 day trial of iPropWiz v5
Follow @seandotson & @mcadforums & @rndautomationon Twitter


Top
 Profile  
 
PostPosted: Mon Mar 19, 2012 4:38 pm 
Offline
MCAD Contributer

Joined: 08 Sep 2005
Posts: 48
You could use this idea to avoid the formula appearing in red. Red color indicates wrong syntax, since the round function requires a unitless (ul) value.


You do not have the required permissions to view the files attached to this post. You must LOGIN or REGISTER to view these files.

_________________
Udaya Gunasena
Inventor development


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 12:13 pm 
Offline
Forum Admin
User avatar

Joined: 29 Jan 2004
Posts: 13448
Country: United States
State: Florida
CAD System: Inventor
Udaya, I always argued that a red formula should not compute. As you can see I get the "correct" answer but the formula was technically wrong. It should not evaluate if the units do not match.

And why is round unitless anyway? It should take the units of the argument.

_________________
Sean Dotson, PE
RND Automation & Engineering
Free 30 day trial of iPropWiz v5
Follow @seandotson & @mcadforums & @rndautomationon Twitter


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 3:34 pm 
Offline
MCAD Guru
User avatar

Joined: 29 Jan 2004
Posts: 5170
Country: United States
State: California
CAD System: Inventor
and it shouldn't delete the 'red' line if you mistype something. It should give you the opportunity to fix your typing error, or better still, like Excel, it should offer to try to help you fix it.


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 3:48 pm 
Offline
MCAD Contributer

Joined: 08 Sep 2005
Posts: 48
I was not involved with these decisions so my explanation here is, at best, an educated guess.

Regarding not computing or evaluating when there is an error, it represents one school of thought, which is not without its own issues. Inventor

_________________
Udaya Gunasena
Inventor development


Top
 Profile  
 
PostPosted: Wed Mar 21, 2012 4:58 pm 
Offline
Forum Admin
User avatar

Joined: 29 Jan 2004
Posts: 13448
Country: United States
State: Florida
CAD System: Inventor
No flames here Udaya, you know that.

OK so if you hole the values internally (regardless of units) then this should work:

I use the round command d=round(a) in units of cm it would take the argument a (say in mm) and then display the result as in cm. So for example if d were in cm then d=round(22.7mm) would be 23cm. Basically d defines the units and the round command takes ANY units.

I realize you were not involved in these very early decisions but it seems like there are a few holes in the workflow.

_________________
Sean Dotson, PE
RND Automation & Engineering
Free 30 day trial of iPropWiz v5
Follow @seandotson & @mcadforums & @rndautomationon Twitter


Top
 Profile  
 
PostPosted: Sun Mar 25, 2012 4:38 am 
Offline
MCAD Guru
User avatar

Joined: 29 Jan 2004
Posts: 5170
Country: United States
State: California
CAD System: Inventor
My point about the 'red' is we know it means something is wrong, but hitting a return on it should not cause the line to be deleted, as more often than not, we were close, but made a typo or error in judgement. When 'red' we should be put back editing the 'red'. We should be prevented from moving away from the edit until it is right, or we explicitly cancel it.

What I would expect if I don't understand what I am doing wrong, is the ability to edit it until I get it right, and hitting F1 (help) will assist me in reaching a correct solution. Now, how do we get out? Hitting Esc, RMB / Cancel or Ctrl Z. Those would all qualify as "As Expected". What is not expected is having my edit work disappear.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
POWERED_BY