Convert 2d point with elevation text to 3d point

Convert 2d point with elevation text to 3d point

Anonymous
Not applicable
9,045 Views
12 Replies
Message 1 of 13

Convert 2d point with elevation text to 3d point

Anonymous
Not applicable

I have .dwg file,  survey points with x y and z=0 but with elevation text. Can I convert them in 3d and make surface? Thank you

0 Likes
9,046 Views
12 Replies
Replies (12)
Message 2 of 13

MikeEvansUK
Advisor
Advisor

There are a few ways via API or 3rd party tools (points and text plugin somewhere in the forums).

 

Out of the box, ensure that the text insertion is the same as the points then use Data extraction to extract the coordinates of both the points and the text then combine in excel. Import as cogo points and check the results.

 

You could also use the text as elevations which is not as accurate.

 

M

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 3 of 13

antoniovinci
Advisor
Advisor

Found somewhere:

 

(Defun C:Txt2pnt ( / SS SSL Cnt Ename Elst Str-A Pt-A Pt-B )
(Setq SS (SSget) SS (SSget "P" '((0 . "TEXT"))) SSL (SSlength SS) Cnt 0)
(repeat SSL
(Setq Ename (SSname SS Cnt) Elst (Entget Ename))
(Setq Str-A (Cdr (assoc 1 Elst)) Pt-A (Cdr (Assoc 10 Elst)) )
(Setq Pt-B (list (car Pt-A) (Cadr Pt-a) (Atof Str-A)))
(command "_point" Pt-B)
(Setq Cnt (+ 1 Cnt)) )(princ))
(prompt "\n{0.9} Read Text object XYZ, create autocad point object ") 
(princ)

 

0 Likes
Message 4 of 13

neilyj666
Mentor
Mentor

@Anonymous wrote:

There are a few ways via API or 3rd party tools (points and text plugin somewhere in the forums).

 

Out of the box, ensure that the text insertion is the same as the points then use Data extraction to extract the coordinates of both the points and the text then combine in excel. Import as cogo points and check the results.

 

You could also use the text as elevations which is not as accurate.

 

M


Is it only not as accurate if the insertion point is offset from the actual (as you also mentioned) - if the insertion point is the same it is just as accurate and quicker?

 

IFF all the text has been shifted by the same E/N then my workflow is to select the text and MOVE to the correct insertion point and the use the text to build a surface

neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


AEC Collection 2026 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
0 Likes
Message 5 of 13

TerryDotson
Mentor
Mentor

If you were to consider third party software, the C3D Point Tools will let you select the text/mtext and point objects (it even supports crossing line objects), tell it the text is the elevation, and how far it can look for each point node.  The results are Cogo point objects (multiple) with the old geometry optionally removed.

 

If this is a rare (one time) problem for you, post or email me the drawing and we will convert it for you.

Message 6 of 13

krzysztof.psujek
Advocate
Advocate

Hi, welcome on forum.

In some specific situation you can try this Lee Mac's lisp routine.

I used it many times.

 

;; Text 2 Point  -  Lee Mac 2012
;; Prompts for a selection of Text and Point entities and moves
;; each Text entity to the nearest (2D distance) Point entity in the set.
;;
;; Retains existing Text elevation.

(defun c:txt2pt ( / _textinsertion di1 di2 dxf ent inc ins lst mpt pnt sel txt )

    (defun _textinsertion ( elist )
        (if
            (and
                (zerop (cdr (assoc 72 elist)))
                (zerop (cdr (assoc 73 elist)))
            )
            (cdr (assoc 10 elist))
            (cdr (assoc 11 elist))
        )
    )

    (if (setq sel (ssget "_:L" '((0 . "POINT,TEXT"))))
        (progn
            (repeat (setq inc (sslength sel))
                (setq ent (entget (ssname sel (setq inc (1- inc)))))
                (if (eq "POINT" (cdr (assoc 0 ent)))
                    (setq lst (cons (cdr (assoc 10 ent)) lst))
                    (setq txt (cons (cons (_textinsertion ent) ent) txt))
                )
            )
            (foreach ent txt
                (setq ins (list (caar ent) (cadar ent)))
                (if (setq pnt (vl-some '(lambda ( pnt ) (equal ins (list (car pnt) (cadr pnt)) 1e-8)) lst))
                    (setq lst (vl-remove pnt lst))
                    (progn
                        (setq di1 (distance ins (list (caar lst) (cadar lst)))
                              mpt (car lst)
                        )
                        (foreach pnt (cdr lst)
                            (if (< (setq di2 (distance ins (list (car pnt) (cadr pnt)))) di1)
                                (setq di1 di2
                                      mpt pnt
                                )
                            )
                        )
                        (setq pnt (list (car mpt) (cadr mpt) (caddar ent))
                              dxf (cdr ent)
                              dxf (subst (cons 10 pnt) (assoc 10 dxf) dxf)
                              dxf (subst (cons 11 pnt) (assoc 11 dxf) dxf)
                        )
                        (entmod dxf)
                        (setq lst (vl-remove mpt lst))
                    )
                )
            )
        )
    )
    (princ)
)
(vl-load-com) (princ)

Picture below shows how it works.

Generally selected texts will moved to the nearest point entities.

 

txt2pt.gif

 

If it isn't what you want to, as somebody has recommend it to you previously, search forums to get right lisp application.

There are a lot of it in the web (not only here in autodesk community).

 

Chris

0 Likes
Message 7 of 13

antoniovinci
Advisor
Advisor

krzysztof.psujek wrote:
;; Text 2 Point  -  Lee Mac 2012
;; Prompts for a selection of Text and Point entities and moves
;; each Text entity to the nearest (2D distance) Point entity in the set.

Krzysiu, co to za bzdury opowiadasz?!?

Przecież facet prosił o przesunięcie tekstów w 3D, czyli dokładnie to co wykonuje kod co ja wsadziłem...

0 Likes
Message 8 of 13

Anonymous
Not applicable

You could try creating a point group of the points in question, then export the point group (right click the point group in the propsector) as a PNEZD format CSV.  Open the CSV in Excel and move all of the elevations to overwrite the "0" elevation values then save the CSV file then import the points back into your drawing (insert tab > Points from file)

 

Martin

0 Likes
Message 9 of 13

krzysztof.psujek
Advocate
Advocate

Antoni M... jeśli dobrze wnioskuję:-P 

Jesteś tu na tym forum nie od dztv iś więc nie powinno chyba Cie dziwić to o co ludzie - nowi pytają na początku zwłaszcza, a co się okazuje później, co im naprawdę chodziło. 

 

  1. Przecież wszystko zależy od tego jaka OP ma sytuację, której nie znasz dokładnie bo nie rozpisal się zbytnio ani nie załączył nic. A że Co prawda nie napisałem tego, ale jeśli ma taki właśnie problem, to się domyślić że  kod, który ja wkleilem, jest idealne by potem dać Texttoelevation.

 

Pozdrawiam

 to Ty Piotrze?

0 Likes
Message 10 of 13

MikeEvansUK
Advisor
Advisor

Yea, must have been asleep here as there is no need to use the data extraction with this method.. Duh'.

 

I use a converted bit of code (originally from elsewhere) which allows the user to convert a block and text to a cogo point. Either sets the elevation or adds a Raw description depending on the type of text (numerical or text). It takes a while and needs checking but works well.

 

M

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 11 of 13

ArchD
Collaborator
Collaborator

If they are blocks with attributes for the elevation, you can get away with it by using DATAEXTRACTION and export everything to a csv file that you can import as cogo points.

 

*EDIT* Post above seems to have another way without DATAEXTRACTION. 

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes
Message 12 of 13

joantopo
Mentor
Mentor

or ArkiTool:

 

https://www.arkisoft.es/tienda/topografia/TOP-ELEVPUNTOS

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes
Message 13 of 13

ArchD
Collaborator
Collaborator

-

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes