Automating Elevation Labels

Automating Elevation Labels

Anonymous
Not applicable
2,662 Views
7 Replies
Message 1 of 8

Automating Elevation Labels

Anonymous
Not applicable

I have point cloud information that I exported from RealWorks into AutoCAD in the form of a dwg. I also have loaded a 5'x5' grid in the background as an xref. My goal is to tag a point every 5 feet with an elevation label. Ideally, I'd like to use the grid as a frame of reference so that I could use a script to have AutoCAD automatically insert an elevation label for the point that is nearest to the intersections on the grid. Does anybody have or know of a script that can do this? At the least I'd like to tag the points manually but consecutively. (I don't want to have to select the elevation label tool every time I tag a point.)

 

Also I'd like to have the elevation symbol removed from the label but I know that I'd probably have to modify the block after all of the points are populated since the label is a built in tool.

 

Software: RealWorks 11.1, AutoCAD Architecture 2019

Attached is a drawing with the final product I'm trying to achieve, and a zipped folder containing a drawing with points and the grid overlay.

0 Likes
2,663 Views
7 Replies
Replies (7)
Message 2 of 8

hak_vz
Advisor
Advisor

I hope this works for you!

You should redefine values of text height and offset '(dx dy). You select point object and script creates elevation text on offset distance. To exit script press <enter>! I don't work with architectural units (SI world) so I don't know to help you with automation.

You would use double loop, select points in a small aperture , and then find nearest point to the center, or calculate average Z of points in aperture, and create elevation text.

 

 

(defun c:pelev ( /  offset textheight e ent p x y z zs p1)
    (setq offset '(1 1))
    (setq textheight 1)
    (while (setq e (car (entsel"\nSelect point: ")))
    (setq ent (entget e))
    (setq p (cdr (assoc 10 ent)))
    (setq x (car p) y (cadr p) z (last p))
    (setq zs (rtos z 4 2))
    (setq p1 (mapcar '+ (list x y) offset))
      
        (entmake
            (list
               '(0 . "TEXT")
                (cons 7 (getvar 'textstyle))
                (cons 1 zs)
                (cons 50 0)
                (cons 40 textheight)
                (cons 10 p1)
            )
        )
    )
    (princ)
)

Miljenko Hatlak

EESignature

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.
0 Likes
Message 3 of 8

Sea-Haven
Mentor
Mentor

Can be done using say CIV3D I made a surface of your points, then you can do a make a grid of points from the surface, just label those points. If you don't have civ3d there are some TIN software out there and should be point rl from 3d face.

0 Likes
Message 4 of 8

john.uhden
Mentor
Mentor

Ah, a civil type.  It warms my heart to have understanding company here.

Of course you must realize that the OP wants something for free.

My first day of Economics 1.01, the professor wrote on the blackboard "TANSTAAFL."

Of course he then just sat on the front of his desk and gazed wantonly toward the class.  Yes, one or more of us eventually blurted out something like WTF is that supposed to mean?

Anyone wanna guess what it stands for? 

John F. Uhden

0 Likes
Message 5 of 8

Sea-Haven
Mentor
Mentor

Ha Ha now that its lunch time.

 

An expensive toy WOFTAM to the spoilt child.

0 Likes
Message 6 of 8

john.uhden
Mentor
Mentor

I meant to send this yesterday, but screwed up somehow...

Well, you certainly got me there... WOFTAM?

Ok, I'll guess... Wicked Old Fart Toasts A Muffin?  <that's really poor>

How about Wild Outlaw Family Tasers A Meanie? <that's equally bad>

C'mon, fess up.  It is not only I who wants to learn.

John F. Uhden

0 Likes
Message 7 of 8

Sea-Haven
Mentor
Mentor

It was the name of a friends water ski boat.

 

Waste of _ time and money

0 Likes
Message 8 of 8

john.uhden
Mentor
Mentor
I believe the proper definition of a boat is "a hole in the water into
which you pour money."
My wooden sailboats (Barnegat Bay Sneakboxes) were fine, but the outboards
were, um, expensive. Never buy a two-stroke.

John F. Uhden

0 Likes