Jump to content

Recommended Posts

Posted

I’m having a problem flattening items in a drawing. I have been sent a file which has items with numerous z values. I moved them from 0,0,0 to 0,0,1e99 and then back again from 0,0,0 to -1e99 but they now have a random Z value? I’m confused, I thought this would set all the Z values to 0.

Posted

Can you attach a sample drawing with some of these recalcitrant objects in it so we can see/test for ourselves?

Posted

All you did was move them back to the same position. If there were z values when you started, then they will be the same afterwards.

Posted

Test file attached. I managed to strip out all but 3 lines. The middle line has z values set to 0 other 2 are not.

test.dwg

Posted
All you did was move them back to the same position. If there were z values when you started, then they will be the same afterwards.

 

As I understand it, by moving everything using this method everything should come back to a Z value of '0'.

Posted
Test file attached. I managed to strip out all but 3 lines. The middle line has z values set to 0 other 2 are not.

 

That was too easy. OK...give me the real test drawing.

Posted

Ok. How did you do it? Every time I do it, it keeps bringing them back to -31.475.

Posted

If I move the 3 lines to from 0,0,0 to 0,0,1e99 and then move them back form 0,0,0 to 0,0,-1e99 all three lines up with the same Z value of -31.475

Posted

OK. I thought maybe the lines were returning to their original elevations after you saved and reopened the drawing.

 

My secret weapon was...........the CHANGE command > Properties and the Elevation option. Old school to be sure but sometimes old stuff works. Which is what my wife has been known to say to me sometimes. LoL

Posted

I told you this before. What you are doing does not flatten anything.

 

In the case of a few lines or even hundreds of them, it is easy enough to select them and change the z values in the properties box. You could also use the flatten command.

Posted

Ya know, that might have worked on older versions because of precision limitations in AutoCAD. It looks they've gone beyond 1e99.

Posted
I told you this before. What you are doing does not flatten anything.

 

In the case of a few lines or even hundreds of them, it is easy enough to select them and change the z values in the properties box. You could also use the flatten command.

 

 

 

The file I'm working on has over 20,000 objects and beside flatten is not working on the polylines. When I draw a polyline or investigate an existing one. The elevation is set to 31.475 and the Z values of the individual points is '0'. No matter what I do I can't get ride of the level difference between the elevation and the Z value. I've tried flatten, change and elevation. when I move a using the 1e99 method everything gets set to a Z value of -31.475 which is obviously tied in to the polylines having a elevation of 31.475. even If I only move a single line with both Z values set to '0', using the 1e99 method, it goes to -31.475. I just don't get it!

Posted

If I were you I'd stop trying to get the macro to work.

 

OK I'm confused. You want all objects to have a Z of 0 yet you are drawing polylines with elevation set to 31.475?

 

I don't suppose we could get our hands on the full drawing (via Dropbox for instance)?

Posted

OK. I've finally figured it out. It's because I had changed the UCS. I used an object to change my UCS which had a Z value of 31.452, therefore my working plane (not sure that's the correct term) was set to 31.452 so whenever I used flatten, change or 1e99 it moved it to 31.452 or -31.452 . Once I changed it back to 'World' everything worked as normal.

 

 

Is there a way you can check what elevation your working plane is set to?

 

 

Thank you all for all your help.

Posted

You can check the elevation by entering it at the command line: ELEVATION

Posted

If you have set up a UCS that is not at zero elevation, then enter the command "Base". Since the base point is usually at 0,0,0 unless it has been re-set, then the current elevation relative to the World UCS is shown.

 

Also, if you had the UCS icon showing, then that would show whether you were in World UCS or something else.

 

In the drawing posted, there were some entities at a good distance from 0,0, almost as if the Move command had been wrongly applied. A useful command is STATUS which shows the extent of entities in the drawing. The test drawing shows some alarmingly large numbers for the coordinates.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...