Author Topic: Elevations points  (Read 10739 times)

0 Members and 1 Guest are viewing this topic.

Fabricio28

  • Swamp Rat
  • Posts: 670
Elevations points
« on: February 24, 2015, 12:38:50 PM »
Hi guys,

I'm trying to get the elevations of my project.

There are contours of the surface (polyline) that I put the elevations.

But I don't know if it is possible to get some elevations.

Could you help me out please?

Thank in advance
« Last Edit: February 24, 2015, 12:42:54 PM by FABRICIO28 »

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Elevations points
« Reply #1 on: February 24, 2015, 01:34:04 PM »

A haxers way of doing it :)

Maybe pick the two closest contours, draw a 3dpolyline between them (snapping to nearest), then add a point on that 3d polyline snapping to nearest. You will see the elevation of the point.




Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #2 on: February 24, 2015, 01:40:42 PM »

A haxers way of doing it :)

Maybe pick the two closest contours, draw a 3dpolyline between them (snapping to nearest), then add a point on that 3d polyline snapping to nearest. You will see the elevation of the point.

Thank you for replay my friend Ron,

How Can I do that?

I have no idea to be honest. Could you help me please?

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Elevations points
« Reply #3 on: February 24, 2015, 01:45:10 PM »
Looking for something like this ?


Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #4 on: February 24, 2015, 01:49:52 PM »
Looking for something like this ?

Hi,

Is it possible get the elevation from the middle of the polylines?

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Elevations points
« Reply #5 on: February 24, 2015, 01:55:29 PM »
The accuracy of the elevation will not be very good, typically the contours are generated off a TIN, then smoothed so the contours themselves are not spot on.  But in answer to your question yes that is possible.

« Last Edit: February 24, 2015, 01:59:01 PM by snownut2 »

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #6 on: February 24, 2015, 02:01:27 PM »
The accuracy of the elevation will not be very good, typically the contours are generated off a TIN, then smoothed so the contours themselves are not spot on.  But in answer to your question yes that is possible.

The contours are generated from a TIN in the other program (Topograph).
I've imported just the contours from autocad without elevations.


TIN file
« Last Edit: February 24, 2015, 02:05:28 PM by FABRICIO28 »

ymg

  • Guest
Re: Elevations points
« Reply #7 on: February 24, 2015, 02:05:54 PM »
Fabricio,

There are various way to do it.

If you have the triangulation that generated the contour
Find your Z on the the faces of the TIN.

If you don't you could recreate it from the contour then
proceed as above.

A third way would be to do a fence selection from your point
going East.  Then do another fence selection from your point
but going Westward.  Now you can use the data returned by
ssnamex to find the nearest apparent intersection to your
point.  Selecting the entities at both the east point and the west
point you now have the 2 lwpolylines with gives you their respective
elevation. 
Now you can form a 3d line with the information above.
All that is left is to project your point to that line.

I agree with Snownut that interpolating from contour is
not the best way. 

RonJomp's way, if it's only for a few point is good!
Just issue command "3DPOLY" now pick with osnap
to nearest left polyline do the same on the right.
You now have your 3d line. Now pick a point on
this line again with osnap to nearest.  You got your Z

ymg
« Last Edit: February 24, 2015, 02:17:30 PM by ymg »

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #8 on: February 24, 2015, 02:10:32 PM »
@snownut2,
Sounds to be good for me. How can I do that?
I've attached the PolyfaceMesh, is it help?

@ymg
Thank you for replay,
Quote
If you have the triangulation that generated the contour
Find your Z on the the faces of the TIN.
How Can I find Z?

I've attached the triangulation


Regards

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Elevations points
« Reply #9 on: February 24, 2015, 02:49:13 PM »

A haxers way of doing it :)

Maybe pick the two closest contours, draw a 3dpolyline between them (snapping to nearest), then add a point on that 3d polyline snapping to nearest. You will see the elevation of the point.

Thank you for replay my friend Ron,

How Can I do that?

I have no idea to be honest. Could you help me please?


See attached.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ymg

  • Guest
Re: Elevations points
« Reply #10 on: February 24, 2015, 02:54:13 PM »
Fabricio,

Look at the thread  :Triangulation Re-visited



ymg

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #11 on: February 24, 2015, 02:57:12 PM »

A haxers way of doing it :)

Maybe pick the two closest contours, draw a 3dpolyline between them (snapping to nearest), then add a point on that 3d polyline snapping to nearest. You will see the elevation of the point.

Thank you for replay my friend Ron,

How Can I do that?

I have no idea to be honest. Could you help me please?


See attached.

Awesome Ron,
It seems to be field text. How Can I do that?

Regards

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Elevations points
« Reply #12 on: February 24, 2015, 03:06:57 PM »
Command: FIELD
Field Category: Object >> Select your point
Property = Position
Uncheck X,Y


Make sure OSNAPZ is set to 0 when drafting.




Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #13 on: February 24, 2015, 03:08:14 PM »
Fabricio,

Look at the thread  :Triangulation Re-visited



ymg

Hi ymg,

Your code is fantastic!
But I don't know how to use it.

I don't need create point in my project, I have polyface mesh.
Is it possible create a elevation surface from my triangulation file?

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #14 on: February 24, 2015, 03:47:28 PM »
Command: FIELD
Field Category: Object >> Select your point
Property = Position
Uncheck X,Y


Make sure OSNAPZ is set to 0 when drafting.

Thank you Ron,
Worked great!  :-D

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Elevations points
« Reply #15 on: February 24, 2015, 04:20:58 PM »
Glad to help  :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Elevations points
« Reply #16 on: February 24, 2015, 04:44:11 PM »
Here's an example I did similar to Ron's suggestion.

http://www.theswamp.org/screens/alanjt/AttBlock.gif
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Elevations points
« Reply #17 on: February 24, 2015, 05:06:15 PM »
one of mine...allow decimal digit, distance between text, text style, text size, orientation, Mtext with or without wipeout, or Text entity,...etc..

:)
Keep smile...

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Elevations points
« Reply #18 on: February 24, 2015, 09:18:58 PM »
In relation to contours, here's some I posed a while back:

http://www.theswamp.org/index.php?topic=39644.0


Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

sanju2323

  • Newt
  • Posts: 68
Re: Elevations points
« Reply #19 on: February 24, 2015, 11:56:07 PM »
This lisp to different result of contour elevation
« Last Edit: February 25, 2015, 12:46:07 AM by sanju2323 »

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #20 on: February 25, 2015, 11:37:57 AM »
Hi all
Thank you very much for the support!

Ron's tips is able to set elevation from specific point.

I have to draw 3DPolyline and create a point and use field position to get the elevation.
It's a  little laborious, but works great!

sanju2323

  • Newt
  • Posts: 68
Re: Elevations points
« Reply #21 on: February 25, 2015, 11:56:13 AM »
If you need contour cross line to 3D polyline

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #22 on: February 25, 2015, 12:23:32 PM »
If you need contour cross line to 3D polyline

Yes, I crossed contours line to 3D polyline and pick the elevation from a point in the 3D polyline.

Just like Ron said before.

Regards
« Last Edit: February 25, 2015, 12:33:46 PM by FABRICIO28 »

sanju2323

  • Newt
  • Posts: 68
Re: Elevations points
« Reply #23 on: February 25, 2015, 10:18:09 PM »
test

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #24 on: February 27, 2015, 12:13:20 PM »
test

I'm trying to use your code, but I didn't get it. :?

Culd you explain for me please?

Regards

sanju2323

  • Newt
  • Posts: 68
Re: Elevations points
« Reply #25 on: February 27, 2015, 04:06:18 PM »
FABRICIO28,
          This lisp create 3Dpolyline from contour.

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #26 on: March 02, 2015, 02:42:22 PM »
FABRICIO28,
          This lisp create 3Dpolyline from contour.

Hi,
That code seems to be good, but my project doesn't have any contour to create 3Dpolyline.

What does countour is?

mailmaverick

  • Bull Frog
  • Posts: 493
Re: Elevations points
« Reply #27 on: March 04, 2015, 12:39:46 PM »
My Code :
Code: [Select]
;;; This file writes Level of a point as per Selected Contours

(defun c:SpotElevfromContours ()
  (vl-load-com)
  ;;----------------
  ;; Functions
  ;;----------------
  (defun gc:distinctFuzz (lst fuzz)
    (if lst
      (cons (car lst) (gc:distinctFuzz (vl-remove-if '(lambda (x) (equal x (car lst) fuzz)) lst) fuzz))
    )
  )
  (defun CurrentZoomWindow (/ a b c d x)
    (setq b (getvar "viewsize")
  c (car (getvar "screensize"))
  d (cadr (getvar "screensize"))
  a (* b (/ c d))
  x (trans (getvar "viewctr") 1 2)
  c (list (- (car x) (/ a 2.0)) (- (cadr x) (/ b 2.0)) 0.0)
  d (list (+ (car x) (/ a 2.0)) (+ (cadr x) (/ b 2.0)) 0.0)
  c (trans c 2 1)
  d (trans d 2 1)
    )
    (list c d)
  )
  (defun GetElevPoint (glpt sscont /   app    mind     elev     muSetpt1 mySetpt2 foundcontours rectsize increment     minx     miny     maxx     maxy pt1 pt2
       pt3 pt4 selset   ncont    entcont  ptcont   dd       fg       lenset lencnt found   val1    elev1    dist1    ent1     lin1     obj1 intcnt frstelev
       elev2 dist2
      )
    (setq app (vlax-get-acad-object))
    (setq mind 0)
    (setq elev "")
    (setq mySetpt1 (list))
    (setq mySetpt2 (list))
    (setq foundcontours 0)
    (setq rectsize 200.0)
    (setq increment 20.0)
    (while (eq foundcontours 0)
      (setq minx (- (car glpt) rectsize))
      (setq maxx (+ (car glpt) rectsize))
      (setq miny (- (cadr glpt) rectsize))
      (setq maxy (+ (cadr glpt) rectsize))
      (setq pt1 (list minx miny 0.0))
      (setq pt2 (list maxx miny 0.0))
      (setq pt3 (list maxx maxy 0.0))
      (setq pt4 (list minx maxy 0.0))
      (vla-zoomwindow app (vlax-3d-point pt1) (vlax-3d-point pt3))
      (if (setq selset (ACET-SS-INTERSECTION sscont (ssget "_CP" (list pt1 pt2 pt3 pt4) '((0 . "*POLYLINE")))))
(setq foundcontours 1)
      )
      (setq rectsize (+ rectsize increment))
    )
    (repeat (setq ncont (sslength selset))
      (setq entcont (ssname selset (setq ncont (1- ncont))))
      (setq elev (vla-get-elevation (vlax-ename->vla-object entcont)))
      (setq ptcont (vlax-curve-getclosestpointto entcont glpt))
      (setq ptcont (list (car ptcont) (cadr ptcont) (caddr glpt)))
      (setq dd (distance ptcont glpt))
      (setq mySetpt1 (append mySetpt1 (list (list elev dd ptcont entcont))))
    )
    (setq fg (vl-sort mySetpt1 '(lambda (e1 e2) (< (cadr e1) (cadr e2)))))
    (setq lenset (length fg))
    (setq lencnt 0)
    (setq found 0)
    (setq frstelev nil)
    (while (< lencnt lenset)
      (setq val1 (nth lencnt fg))
      (setq elev1 (car val1))
      (setq dist1 (cadr val1))
      (setq pt1 (caddr val1))
      (setq ent1 (cadddr val1))
      (command "LINE" pt1 glpt "")
      (setq lin1 (entlast))
      (setq obj1 (vlax-ename->vla-object lin1))
      (setq intcnt (CountUniqueIntersections obj1 selset (caddr glpt)))
      (if (and (<= intcnt 1) (not (equal frstelev elev1 0.01)))
(progn (setq found (1+ found))
       (setq frstelev elev1)
       (setq mySetpt2 (append mySetpt2 (list (list elev1 dist1))))
       (vla-delete obj1)
)
(progn (vla-delete obj1))
      )
      (if (= found 2)
(progn (setq lencnt (+ lenset 1)))
(progn (setq lencnt (1+ lencnt)))
      )
    )
    (if (= (length mySetpt2) 2)
      (progn (setq elev1 (car (car mySetpt2)))
     (setq dist1 (cadr (car mySetpt2)))
     (setq elev2 (car (cadr mySetpt2)))
     (setq dist2 (cadr (cadr mySetpt2)))
     (setq elev (+ (* (/ (- elev2 elev1) (+ dist2 dist1)) dist1) elev1))
      )
      (progn (setq elev (car (car mySetpt2))))
    )
    elev
  )
  (defun CountUniqueIntersections (obj1 sscont ht / cntb unlst ncont2 ncont2cnt entcont2 obj2 ui l)
    (setq cntb 0)
    (setq unlst (list))
    (setq ncont2 (sslength sscont))
    (setq ncont2cnt 0)
    (while (< ncont2cnt ncont2)
      (setq entcont2 (ssname sscont ncont2cnt))
      (setq obj2 (vlax-ename->vla-object entcont2))
      (setq ui (vla-get-elevation obj2))
      (vla-put-elevation obj2 ht)
      (if (setq l (vlax-invoke obj1 'intersectwith obj2 acExtendNone))
(setq unlst (append unlst (list (list l))))
      )
      (vla-put-elevation obj2 ui)
      (setq unlst (gc:distinctFuzz unlst 0.0001))
      (if (> (length unlst) 1)
(setq ncont2cnt (1+ ncont2))
(setq ncont2cnt (1+ ncont2cnt))
      )
    )
    (length unlst)
  )
;;;
;;;
;;;
  ;| ----------------------------------
            ACTUAL PROGRAM STARTED     
---------------------------------------
  |;
  (setq oldsnapmode (getvar "snapmode"))
  (setq oldosmode (getvar "osmode"))
  (setq oldlayer (getvar "clayer"))
  (setq oldorthomode (getvar "orthomode"))
  (if (not (tblsearch "LAYER" "TEMP1"))
    (command "_.-layer" "M" "TEMP1" "C" "1" "" "L" "Continuous" "" "LW" 0.05 "" "")
  )
  (setvar "clayer" "TEMP1")
  (prompt "\nSelect Contours")
  (if (setq ssc (ssget "_:L" '((0 . "*POLYLINE"))))
    (progn (setq app (vlax-get-acad-object))
   (setq fcnt 1)
   (while (setq glpt (getpoint "Select Point (or Enter to Exit) : "))
     (setq vext (CurrentZoomWindow))
     (setvar "cmdecho" 0)
     (setvar "snapmode" 0)
     (setvar "osmode" 0)
     (setvar "orthomode" 0)
     (setq elev (GetElevPoint glpt ssc))
     (entmake ;Start entity make
       (list ;Start list
(cons 0 "TEXT") ;Entity type
(cons 8 "ELEVATION") ;Layer name
(cons 10 glpt) ;Text first base point
(cons 11 glpt) ;Text second base point
(cons 40 3) ;Text height
(cons 1 (rtos elev 2 2)) ;Text string
(cons 50 0) ;Text rotation
(cons 41 1.0) ;Relative x scale factor
(cons 51 0.0) ;Oblique angle
(cons 7 "Standard") ;Text style
(cons 71 0) ;Text generation flag
(cons 72 1) ;Horizontal justification flag center
;(cons 11 TFBP) ;Text first base point
;(cons 210 EXDR) ;Extrusion direction (Needed for 3D)
(cons 73 2) ;Middle justification
       ) ;End list
     )
     (vla-zoomwindow app (vlax-3d-point (car vext)) (vlax-3d-point (cadr vext)))
   )
    )
  )
  (setvar "snapmode" oldsnapmode)
  (setvar "orthomode" oldorthomode)
  (setvar "osmode" oldosmode)
  (setvar "cmdecho" 1)
  (if (tblsearch "LAYER" oldlayer)
    (setvar "clayer" oldlayer)
  )
  (princ)
)


« Last Edit: March 04, 2015, 12:50:36 PM by mailmaverick »

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #28 on: March 04, 2015, 12:55:07 PM »
My Code :
Code: [Select]
;;; This file writes Level of a point as per Selected Contours

(defun c:SpotElevfromContours ()
  (vl-load-com)
  ;;----------------
  ;; Functions
  ;;----------------
  (defun gc:distinctFuzz (lst fuzz)
    (if lst
      (cons (car lst) (gc:distinctFuzz (vl-remove-if '(lambda (x) (equal x (car lst) fuzz)) lst) fuzz))
    )
  )
  (defun CurrentZoomWindow (/ a b c d x)
    (setq b (getvar "viewsize")
  c (car (getvar "screensize"))
  d (cadr (getvar "screensize"))
  a (* b (/ c d))
  x (trans (getvar "viewctr") 1 2)
  c (list (- (car x) (/ a 2.0)) (- (cadr x) (/ b 2.0)) 0.0)
  d (list (+ (car x) (/ a 2.0)) (+ (cadr x) (/ b 2.0)) 0.0)
  c (trans c 2 1)
  d (trans d 2 1)
    )
    (list c d)
  )
  (defun GetElevPoint (glpt sscont /   app    mind     elev     muSetpt1 mySetpt2 foundcontours rectsize increment     minx     miny     maxx     maxy pt1 pt2
       pt3 pt4 selset   ncont    entcont  ptcont   dd       fg       lenset lencnt found   val1    elev1    dist1    ent1     lin1     obj1 intcnt frstelev
       elev2 dist2
      )
    (setq app (vlax-get-acad-object))
    (setq mind 0)
    (setq elev "")
    (setq mySetpt1 (list))
    (setq mySetpt2 (list))
    (setq foundcontours 0)
    (setq rectsize 200.0)
    (setq increment 20.0)
    (while (eq foundcontours 0)
      (setq minx (- (car glpt) rectsize))
      (setq maxx (+ (car glpt) rectsize))
      (setq miny (- (cadr glpt) rectsize))
      (setq maxy (+ (cadr glpt) rectsize))
      (setq pt1 (list minx miny 0.0))
      (setq pt2 (list maxx miny 0.0))
      (setq pt3 (list maxx maxy 0.0))
      (setq pt4 (list minx maxy 0.0))
      (vla-zoomwindow app (vlax-3d-point pt1) (vlax-3d-point pt3))
      (if (setq selset (ACET-SS-INTERSECTION sscont (ssget "_CP" (list pt1 pt2 pt3 pt4) '((0 . "*POLYLINE")))))
(setq foundcontours 1)
      )
      (setq rectsize (+ rectsize increment))
    )
    (repeat (setq ncont (sslength selset))
      (setq entcont (ssname selset (setq ncont (1- ncont))))
      (setq elev (vla-get-elevation (vlax-ename->vla-object entcont)))
      (setq ptcont (vlax-curve-getclosestpointto entcont glpt))
      (setq ptcont (list (car ptcont) (cadr ptcont) (caddr glpt)))
      (setq dd (distance ptcont glpt))
      (setq mySetpt1 (append mySetpt1 (list (list elev dd ptcont entcont))))
    )
    (setq fg (vl-sort mySetpt1 '(lambda (e1 e2) (< (cadr e1) (cadr e2)))))
    (setq lenset (length fg))
    (setq lencnt 0)
    (setq found 0)
    (setq frstelev nil)
    (while (< lencnt lenset)
      (setq val1 (nth lencnt fg))
      (setq elev1 (car val1))
      (setq dist1 (cadr val1))
      (setq pt1 (caddr val1))
      (setq ent1 (cadddr val1))
      (command "LINE" pt1 glpt "")
      (setq lin1 (entlast))
      (setq obj1 (vlax-ename->vla-object lin1))
      (setq intcnt (CountUniqueIntersections obj1 selset (caddr glpt)))
      (if (and (<= intcnt 1) (not (equal frstelev elev1 0.01)))
(progn (setq found (1+ found))
       (setq frstelev elev1)
       (setq mySetpt2 (append mySetpt2 (list (list elev1 dist1))))
       (vla-delete obj1)
)
(progn (vla-delete obj1))
      )
      (if (= found 2)
(progn (setq lencnt (+ lenset 1)))
(progn (setq lencnt (1+ lencnt)))
      )
    )
    (if (= (length mySetpt2) 2)
      (progn (setq elev1 (car (car mySetpt2)))
     (setq dist1 (cadr (car mySetpt2)))
     (setq elev2 (car (cadr mySetpt2)))
     (setq dist2 (cadr (cadr mySetpt2)))
     (setq elev (+ (* (/ (- elev2 elev1) (+ dist2 dist1)) dist1) elev1))
      )
      (progn (setq elev (car (car mySetpt2))))
    )
    elev
  )
  (defun CountUniqueIntersections (obj1 sscont ht / cntb unlst ncont2 ncont2cnt entcont2 obj2 ui l)
    (setq cntb 0)
    (setq unlst (list))
    (setq ncont2 (sslength sscont))
    (setq ncont2cnt 0)
    (while (< ncont2cnt ncont2)
      (setq entcont2 (ssname sscont ncont2cnt))
      (setq obj2 (vlax-ename->vla-object entcont2))
      (setq ui (vla-get-elevation obj2))
      (vla-put-elevation obj2 ht)
      (if (setq l (vlax-invoke obj1 'intersectwith obj2 acExtendNone))
(setq unlst (append unlst (list (list l))))
      )
      (vla-put-elevation obj2 ui)
      (setq unlst (gc:distinctFuzz unlst 0.0001))
      (if (> (length unlst) 1)
(setq ncont2cnt (1+ ncont2))
(setq ncont2cnt (1+ ncont2cnt))
      )
    )
    (length unlst)
  )
;;;
;;;
;;;
  ;| ----------------------------------
            ACTUAL PROGRAM STARTED     
---------------------------------------
  |;
  (setq oldsnapmode (getvar "snapmode"))
  (setq oldosmode (getvar "osmode"))
  (setq oldlayer (getvar "clayer"))
  (setq oldorthomode (getvar "orthomode"))
  (if (not (tblsearch "LAYER" "TEMP1"))
    (command "_.-layer" "M" "TEMP1" "C" "1" "" "L" "Continuous" "" "LW" 0.05 "" "")
  )
  (setvar "clayer" "TEMP1")
  (prompt "\nSelect Contours")
  (if (setq ssc (ssget "_:L" '((0 . "*POLYLINE"))))
    (progn (setq app (vlax-get-acad-object))
   (setq fcnt 1)
   (while (setq glpt (getpoint "Select Point (or Enter to Exit) : "))
     (setq vext (CurrentZoomWindow))
     (setvar "cmdecho" 0)
     (setvar "snapmode" 0)
     (setvar "osmode" 0)
     (setvar "orthomode" 0)
     (setq elev (GetElevPoint glpt ssc))
     (entmake ;Start entity make
       (list ;Start list
(cons 0 "TEXT") ;Entity type
(cons 8 "ELEVATION") ;Layer name
(cons 10 glpt) ;Text first base point
(cons 11 glpt) ;Text second base point
(cons 40 3) ;Text height
(cons 1 (rtos elev 2 2)) ;Text string
(cons 50 0) ;Text rotation
(cons 41 1.0) ;Relative x scale factor
(cons 51 0.0) ;Oblique angle
(cons 7 "Standard") ;Text style
(cons 71 0) ;Text generation flag
(cons 72 1) ;Horizontal justification flag center
;(cons 11 TFBP) ;Text first base point
;(cons 210 EXDR) ;Extrusion direction (Needed for 3D)
(cons 73 2) ;Middle justification
       ) ;End list
     )
     (vla-zoomwindow app (vlax-3d-point (car vext)) (vlax-3d-point (cadr vext)))
   )
    )
  )
  (setvar "snapmode" oldsnapmode)
  (setvar "orthomode" oldorthomode)
  (setvar "osmode" oldosmode)
  (setvar "cmdecho" 1)
  (if (tblsearch "LAYER" oldlayer)
    (setvar "clayer" oldlayer)
  )
  (princ)
)



Wow!!!
Perfect mailmaverick

Worked like a charm!!

mailmaverick

  • Bull Frog
  • Posts: 493
Re: Elevations points
« Reply #29 on: March 04, 2015, 03:30:07 PM »
Happy to help.

Whatvever LISP I have learnt, full credit goes to this forum and its members such as LEE MAC, CAB, RONJONP, BLACKBOX, JOHN KAUL, ALANJT and many more. Sorry if i missed some names.


Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #30 on: March 05, 2015, 07:16:09 AM »
Happy to help.

Whatvever LISP I have learnt, full credit goes to this forum and its members such as LEE MAC, CAB, RONJONP, BLACKBOX, JOHN KAUL, ALANJT and many more. Sorry if i missed some names.

Thank you everyone!!  :-D

This is a one of the best autocad forum!!!

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Elevations points
« Reply #31 on: March 09, 2015, 01:39:28 PM »
Hi guys,
How have you been?

That code isn't working in xref contour.
I had to create a xref surface for a new project.

Is there any way to use this excellent code to reference objects?

Regards