export arcsde feature layer to mdb table by changing the value of vertex xy value

2575
1
08-24-2015 12:15 AM
Ye_FengFeng
New Contributor II

Hi there,


I need to export arcsde feature layer to mdb table, but I need to change the vertex xy value (2 decimals and need to run down on the 3rd value. What I can do now is set th xy resolution to 0.01, but by using this method if the 3rd decimal is 5-9, the 2nd decimal will add 1, what I want is no matter what is the 3rd decimal value, just remove it).


I am using .net arcobjects 9.2.


Is it possible to get the result I want?


Thanks in advance.

Tags (3)
0 Kudos
1 Reply
seria
by Esri Contributor
Esri Contributor

There are no methods in the ArcObjects API that would allow you to truncate a number to a specific number of decimal places without rounding it off.

You would have to use methods found in the .NET API (which ArcObjects is built on top of). A Google search revealed the following solutions posted on other forums:

Truncate Two decimal places without rounding

http://stackoverflow.com/questions/3143657/truncate-two-decimal-places-without-rounding

Truncating a number to specified decimal places

https://social.msdn.microsoft.com/Forums/en-US/4cb1c454-df70-4649-b41f-a65bce070c85/truncating-a-num...

I hope the above forum posts are useful.

0 Kudos