AutoCAD Civil 3D
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Expression Bug
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
113 Views, 2 Replies
02-28-2009 07:47 AM
Anyone ever noticed this?
Assume we have a point with elevation 1234.56.
Using this expression:
{Point Elevation}-(TRUNC({Point Elevation}/100)*100)
returns a result of 34.56.
But using *this* mathematically-identical expression:
{Point Elevation}-(100*TRUNC({Point Elevation}/100))
returns a value of 1134.56.
(Tested in C3D 2008 & 2009.)
-- Sinc
http://www.ejsurveying.com
http://www.quuxsoft.com
Assume we have a point with elevation 1234.56.
Using this expression:
{Point Elevation}-(TRUNC({Point Elevation}/100)*100)
returns a result of 34.56.
But using *this* mathematically-identical expression:
{Point Elevation}-(100*TRUNC({Point Elevation}/100))
returns a value of 1134.56.
(Tested in C3D 2008 & 2009.)
-- Sinc
http://www.ejsurveying.com
http://www.quuxsoft.com
Sinc
*Jeff Mishler
Re: Expression Bug
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-28-2009 09:06 AM in reply to:
Sinc
Yes, I've seen this before with other expressions. It seems like the
Expression evaluator expects things in a certain order, mix that order up and
just the first item is evaluated.
Expression evaluator expects things in a certain order, mix that order up and
just the first item is evaluated.
Attached is a pic showing the results that you've discovered.
Whenever I create an expression now, I make sure to double & triple
check the results before accepting it for use.
check the results before accepting it for use.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"dei-feif" wrote in messageAnyone
href="news:6133645@discussion.autodesk.com">news:6133645@discussion.autodesk.com...
ever noticed this? Assume we have a point with elevation 1234.56. Using this
expression: {Point Elevation}-(TRUNC({Point Elevation}/100)*100) returns a
result of 34.56. But using *this* mathematically-identical expression: {Point
Elevation}-(100*TRUNC({Point Elevation}/100)) returns a value of 1134.56.
(Tested in C3D 2008 & 2009.) -- Sinc http://www.ejsurveying.com
http://www.quuxsoft.com
Re: Expression Bug
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2009 08:05 PM in reply to:
Sinc
Yes, expressions have returned odd results based on the order of operation. I haven't checked if that got fixed in v3.1 (sp2.1)
Matthew Anderson, PE
Business Consultant
Global Services
Autodesk, Inc.
Matthew Anderson, PE
Business Consultant
Global Services
Autodesk, Inc.
