Author Topic: shifting position of all elements in drawing  (Read 1828 times)

0 Members and 1 Guest are viewing this topic.

juuva

  • Guest
shifting position of all elements in drawing
« on: February 19, 2015, 01:53:42 am »
Hello,
I have a drawing consisting mostly of polylines and blocks. I want to shift position of all objects and elements of objects (polyline vertices) so their new position will be rounded to given number of decimal placec. Example: there is line with starting point 10.2525, 23.9367.  New position will be 10.25, 23.94 for 2 decimal places.
I did something like this few months ago but I cannot remember how I did it. All I remember is that there was some workaround with saving the drawing as dxf after changing some cad variable.
Thank you for any advice.

Rob...

  • King Gator
  • Posts: 3679
  • Take a little time to stop and smell the roses.
Re: shifting position of all elements in drawing
« Reply #1 on: February 19, 2015, 07:20:30 am »
You could change your units so that they round off to two decimal places. Some people do that here to cover up their inaccuracies.

Actually, what you are asking for could be a good tool to fine tune .dwgs that have been converted from an image format.
« Last Edit: February 22, 2015, 06:55:47 pm by RobDraw »
CAD Tech

juuva

  • Guest
Re: shifting position of all elements in drawing
« Reply #2 on: February 19, 2015, 12:36:08 pm »
Thank you for reply. I know about units, but I do not need only change of displayed coordinates of each element. I need to "physicaly" reposition all elements exactly to nearest position with let's say 2 decimal digits.
Routine I mentioned before was working like a charm but I cannot remember exact steps. I should start to make notes as I am getting older.

mjfarrell

  • Seagull
  • Posts: 13920
  • Every Student their own Lesson
Re: shifting position of all elements in drawing
« Reply #3 on: February 19, 2015, 12:47:15 pm »
one might DXF the file open and edit

AcDbLine
 10
0.253
 20
0.253
 30
0.0
 11
10.808
 21
12.808
 31
0.0
  0

chopping everything to desired decimal precision, save and close.....
then DXFIN to a new file....not sure what the actual end result would be as far as accuracy....but it should work
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Lee Mac

  • Seagull
  • Posts: 11666
  • AutoCAD 2015 Windows 7 London, England
Re: shifting position of all elements in drawing
« Reply #4 on: February 19, 2015, 01:11:37 pm »
You could try my program from here: http://autode.sk/15yfod1

ronjonp

  • Needs a day job
  • Posts: 6184
Re: shifting position of all elements in drawing
« Reply #5 on: February 19, 2015, 01:57:36 pm »
That's pretty slick Lee  8)

Windows 10 x64 - AutoCAD 2017

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 11666
  • AutoCAD 2015 Windows 7 London, England
Re: shifting position of all elements in drawing
« Reply #6 on: February 19, 2015, 04:46:33 pm »
That's pretty slick Lee  8)

Cheers Ron!  :-)

juuva

  • Guest
Re: shifting position of all elements in drawing
« Reply #7 on: February 22, 2015, 04:38:48 pm »
Thank you for all tips. Solution of the problem was simple.
FILEDIA set to 0. Then DXFOUT, in output precision dialog set desired precision of dxf file (0-16). When you open exported file you can see all geometry rounded to desired decimals.
Simple like that.

cadtag

  • Swamp Rat
  • Posts: 1025
Re: shifting position of all elements in drawing
« Reply #8 on: February 23, 2015, 08:02:42 am »
and now every line pline segment that was not at an angle of 0 has changed length.  Maybe not  bad thing for what you need, but something to be aware of
The only thing more dangerous to the liberty of a free people than big government is big business