Jump to content

Z Label


Rooster

Recommended Posts

  • 1 year later...
  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • Rooster

    11

  • David Bethel

    7

  • Lee Mac

    1

  • tombu

    1

Top Posters In This Topic

Posted Images

This lisp helped a colleague of mine, but i noticed it only seem to work on 3D polylines (so i had to convert Lines to 3D polylines (easy to do in civil 3D)

It also didn't seem to work on blocks.

 

Any idea on how to include lines, polylines and blocks for adding z-value labels/text?

Link to comment
Share on other sites

You need to go back to 1st principles, is it a Line, arc, block, circle etc and have a defun for each type. 2d & 3d plines are ok as 1 defun. The ssget in the code only looks at plines so need to remove that bit.

 

example for line

(princ "pick a line or 3d line")
(setq ent (entget (car (entsel))))
(setq Xstart (nth 1 (assoc 10 ent)))
(setq Ystart (nth 2 (assoc 10 ent)))
(setq Zstart (nth 3 (assoc 10 ent)))
(setq Xend (nth 1 (assoc 11 ent)))
(setq Yend (nth 2 (assoc 11 ent)))
(setq Zend (nth 3 (assoc 11 ent)))

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