Jump to content

Random elevations


cpriedel

Recommended Posts

Hi guys,

i am a fairly new member in the forum and so far i found some helpful tips already.

 

I do have a problem that u may be able to help me with.

 

I am using AutoCad 2007 and usually draw in 2D. In most drawings i have the survey X-refed to the design drawing im working in.

 

Here is my problem:

 

When i try to join polylines i constantly get "2 entities are non coplanar" message. I used the flatten-comand successfully, but after a while the polylines got different elevations again. Also the elevations of the polylines seems to be random (e.g.: -7, -328,...)

 

Plz help me to figure this out. I know i can set the elevation to "0" in properties its just frustrating and it takes alot of extra time to do this to every polyline i wanna join.

Link to comment
Share on other sites

When i try to join polylines i constantly get "2 entities are non coplanar" message. I used the flatten-comand successfully, but after a while the polylines got different elevations again. Also the elevations of the polylines seems to be random (e.g.: -7, -328,...)

 

The FLATTEN command works, but it doesn't always flatten everything.

Try this lisp routine instead, it works better than the Flatten command:

 

 
(defun c:flat (/ total-nabor) 
 (vl-load-com) 
 (if 
   (setq total-nabor (ssget "x" '((410 . "model")))) 
    (progn 
      (setq total-nabor 
       (mapcar 'vlax-ename->vla-object 
         (mapcar 'cadr 
           (ssnamex total-nabor))) 
      ) 
      (foreach  i '(1e99 -1e99) 
  (mapcar (function (lambda (x) 
          (vla-move x 
              (vlax-3d-point (list 0 0 0)) 
              (vlax-3d-point (list 0 0 i))) 
        )) total-nabor ))) 
 ) 
 (princ) 
) 

 

In case you don't know how to load a lisp routine: http://www.cadtutor.net/forum/showthread.php?t=2791

Link to comment
Share on other sites

Hi,

 

I suspect that you are using the XREF as reference when drawing and using OSNAPs to do it. I only have 2008 but I suspect that this is applicable to 2007 as well: "In Options" --> "Drafting" --> "Object Snap Options" Activate the option "Replace Z-value with current elevation" and you should be OK!

 

HTH

 

/Petri

Link to comment
Share on other sites

Thx Petri,

that works perfectly.

I will also look into that lisp Cad64 mentioned. Just need the time lol.

 

Thx for the fast reply

Link to comment
Share on other sites

OK i looked into lisp routine (Thx for the link how to do this-very helpful). I loaded the lisp like discriped and used the command. everything works perfect - saved the drawing.

Than i closed out AutoCad 2007 and reopend and i had to reload the lisp again.

Is that how it works or do i do something wrong, that i have to reload the lisp every time? (If i dont reload it says "command not found")

Link to comment
Share on other sites

On the previous versions of Acad you had to load the lsp into the "Startup Suite" that was right there in the APPLOAD dialogue box.

Link to comment
Share on other sites

OK Hi, Etc,

 

in AutoCAD, command: APPLOAD: Press the Startup Suite Contents -button, Add button --> Find the wanted file (lsp, etc) etc... Should get you going...

 

/Petri

Link to comment
Share on other sites

  • 8 months later...

I've had a similar problem and i ran your lisp routine, but it set the Z axis to 1.99.

Is there a way that I can change it to set the Z axis to 0?

This is the first time I've ever used Lisp routines.

Link to comment
Share on other sites

:huh: So after Flattening the drawing, all entities are placed at a Z elevation of 1.99? Sorry, but I have never had that happen to me before and I have no idea why it would do that? I just run several tests, but cannot duplicate this problem. :unsure:
Link to comment
Share on other sites

  • 2 years later...
  • 9 months later...

hi guys...

i m new at lisp......and i need solution for the above subject on how to use the code given above...

i am not able to open the link provided..

please, can anyone help....

thanks...........

Link to comment
Share on other sites

  • 7 months later...

CAD64 thanks you've saved me!!

 

I was getting errors in a drawing, although every objects elevation was 0.00, I wasn´t abble to trim or extend lines and polylines. Running "FLAT" solved the problem! :D

Link to comment
Share on other sites

  • 1 year later...

I am using Autocad 2006. I imported a surevy document to us in developing a site plan. I am experencing problems with my fillet command. I went to express tools to the flatten comand but that did not help. I then went to options,Drafting, object SnapOptions and activated "repalace Z value with current elevation. That did not help. Is there a solution to my problem?

Edited by CL Seals
Link to comment
Share on other sites

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...