Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Lines on Z axis, messy drawing

Anonymous

Lines on Z axis, messy drawing

Anonymous
Not applicable

I have received a drawing from a colleague and it is messy with lines all over the place on the z axis. I have tried selecting the whole drawing and running FLATTEN command with no effect. I then used quick select (QSELECT) to select all 3d polylines, used flatten, NO to remove hidden lines but again this had no effect. How can i bring all lines to 0 on the Z axis without doing it manually as this will take a very long time. I have attached a screenshot of the drawing.

 

Thanks

0 Likes
Reply
Accepted solutions (1)
5,305 Views
13 Replies
Replies (13)

maratovich
Advisor
Advisor

Run lisp:

(defun C:Z0 ()
 (command "_.UCS" "")
 (command "_.move" "_all" "" '(0 0 1e99) ""
 "_.move" "_p" "" '(0 0 -1e99) "")
 (princ)
(alert "done.")
)
---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net

S.Faris
Advisor
Advisor

Try this

  1. Type CHANGE(enter)
  2. Type ALL(enter)
  3. Type P for properties(enter)
  4. Type E for elevation(enter)
  5. Type 0.00(enter)

This will change the z value for the 2d elements in the drawing.

Blocks needs to be adjusted in the individual block editor windows, event hen you need to check for remaining culprits

 

Check this previous post

SALMANUL FARIS

0 Likes

beyoungjr
Advisor
Advisor

Not sure these are LINES based on your image?

I've seen instances of stray directional line-like objects in certain versions of ACAD and messy drawings.  Sometimes these are generated from block objects with strange insertion points.

 

To really help you solve the issue you might consider sharing the drawing if you can?

 

Blaine

 


Blaine Young
Senior Engineering Technician, US Army

0 Likes

Anonymous
Not applicable

Not too sure, when I select a line their are minus or plus values on the z axis. I have attached the drawing will be easier to spot something. 

Thanks

0 Likes

Anonymous
Not applicable

Thanks for the suggestion, I tried this but it didn't work.

0 Likes

beyoungjr
Advisor
Advisor

WARNINGS!

  1. The drawing notified me that it was editied or created with a student version.  There's no going back from this!  If this is a drawing for a work project you had better plan on working on the original or you will have a plot stamp for educational use only.
  2. You have a Block (B_ISOLA LAND) that is scaled at 500X and it is located super high (5.0027E+99) in the Z axis of the WCS, but it's base point appears to be 0,0,0.
    • I opened this block in the Block Editor and it has elements that are not flat to the Z of most of the elements in the block.
    • It has 13 embedded blocks (blocks within the primary block).
    • Trying to Zoom>All in a Front view shows nothing because the block is so far away from the origin.
    • I delete the block and perform Zoom>All, I see better but still some polylines elevated in the Z axis.

I recommend 2 things...

Get the original drawing from the source who created it and hold them accountable for the content.

Do not work with the drawing in an educational seat of AutoCAD unless the drawing will never be used for commercial or work purposes.

 

If these cannot be achieved I recommend starting over or spending what looks to be hours fixing this mess.  It's so much mess that I don't even know how anyone could fix it without knowledge of the project.

 

Sincerely,

Blaine

 


Blaine Young
Senior Engineering Technician, US Army

0 Likes

Anonymous
Not applicable

Thanks for checking the file. Sorry I wasn't clear by colleague I meant classmate, this is an architecture masters project. The original source won't be any help as they already did us a favor by sending this file..which is messy. Is it worth exploding all blocks and running FLATTEN?

 

Thing is I've already spent so long creating my own layers and cleaning up the drawing I forgot to check the Z axis! I don't want to give up on the drawing, can it be saved?

0 Likes

beyoungjr
Advisor
Advisor

Exploding the blocks will allow flatten to work.  Problem is that you will have to explode a few levels deep due to blocks within blocks.

You will have to be careful about exploding hatches and text.

 

Things flattened for me when I avoid blocks so explode and see what happens for you.  Just be sure to save your work in steps.

 

Much Luck,

Blaine

 

 


Blaine Young
Senior Engineering Technician, US Army

0 Likes

S.Faris
Advisor
Advisor
Accepted solution

Hi, I just had a look into your file and would like to briefly explain what I did(Let's say I had some spare time).

  1. I considered the layout in a 16x16 Grid format.(This is because Autocad will not show properties for more than 25000 elements at a time)
  2. Started Cross-Window selecting all the elements in that grid
  3. Go to properties and at the top where it shows the number of elements selected, I clicked on it and selected Line/Block/Hatch/Polyline/2DPolyline etc...(Cant change it for 3D Polylines) and change the Elevation or Z Value to 0(If there are no selection shown in the properties palette try reducing the area of selection as there might be more than 25000 elements)
  4. Continue this for all the grid divisions
  5. Now check this post@Patchy has a Lisp in here. Download it and Load it to your drawing. 
  6. Type pl32(enter)
  7. select the whole drawing area(enter)(if any error comes up, do it part by part)
  8. Now try going to the Front View(I believe things might look much better now)
  9. Few Blocks are there which you need to do it manually by going to block editor and use the same select all method or the LISP for 3D Polylines.

I'll anyway upload my file which is still not fully corrected, It looks much decent from the initial file I'll say.

SALMANUL FARIS

0 Likes

Anonymous
Not applicable

Thanks a lot S.Faris, this did the trick. Think the issue was the blocks, but I'll just go into them and through QSELECT set everything to 0. Thank you!

0 Likes

3wood
Advisor
Advisor

You can also try CHZ20.

Here attached revised dwg for your reference.

0 Likes

beyoungjr
Advisor
Advisor

Hi,

This VLX certainly appears to repair many issues from the initial file.  There were just a few remaining objects with Z axis differences but what a huge help it is in adjusting the block data and nested block data.

 

This routine is very helpful and saves so much step-by-step effort.

I hope the OP gives this a try so that he/she can verify the usefulness in their work.

 

Thanks for sharing!

Blaine

 


Blaine Young
Senior Engineering Technician, US Army

Anonymous
Not applicable

This is amazing thanks for sharing

0 Likes