×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

label hand drawn contour polylines in civil 3D

label hand drawn contour polylines in civil 3D

label hand drawn contour polylines in civil 3D

(OP)
i have always been using the label contours function in LDD to label my contour polylines. i do not see that feature in civil 3D. is there a way to do the same thing here? labeling contours group interior, group end etc. i used to use terrain>contour labels in LDD before.  i do not want to create a surface first to be able to label contours.any suggestions appreciated.

RE: label hand drawn contour polylines in civil 3D

No can do without creating a surface using C3D labeling tools
but here's a lisp... you'll need to edit the layer and text style

CODE

; Annotate a Contour Line
; BY: Tom Beauford - 7/11/2005 w/ revisions by LPS 8/4/2008
; (load "ContourAnnotate.lsp") LCM
;=============================================================
(defun c:lcm (/ mspace om osz e ent pt tblname Rot str mtextobj ent el)
  (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))
            om (getvar "osmode")
            osz (getvar "osnapz")
            clay (getvar "clayer")
            txtstyle (getvar "textstyle")
            txtsize (getvar "textsize")
              )
  (setvar "osnapz" 0)
  (setvar "osmode" 512)
  (command "ucs" "w")
  (setvar "clayer" "FG-CONT-ELEV")
  (setvar "textstyle" "simplex")
  (setvar "textsize" (* (getvar "dimscale") 0.1))
  (setq pt (getpoint"\nSelect point on Contour Line: ")
            e (nentselp pt)
            ent (car e)
            pt (cadr e)
            tblname (car(ade_odgettables ent))
  )
  (setvar "osmode" 512)
  (setq Rot (getangle pt "\nPick or Enter angle..." )
            str (rtos (caddr pt) 2 0))
 
  (ade_errsetlevel 2)
  (if(ade_odgettables ent)
    (cond
      ((ade_odgetfield ent (car(ade_odgettables ent)) "ELEV" 0)
      (setq str (itoa(ade_odgetfield ent (car(ade_odgettables ent)) "ELEV" 0))))
      ((ade_odgetfield ent (ade_odgettables ent) "ELEVATION" 0)
      (setq str (itoa(ade_odgetfield ent (ade_odgettables ent) "ELEVATION" 0))))
    )
   )
  (ade_errsetlevel 0)
 
  (princ "\nElev = ")
  (princ str)
 
  (setq mtextobj (vla-addMText mspace (vlax-3d-point pt) 0.0 str))
  (vla-put-attachmentPoint mtextobj acAttachmentPointMiddleCenter)
  (vla-put-insertionPoint mtextobj (vlax-3d-point pt))
  (vla-put-Rotation mtextobj Rot)
  (vla-put-Color mtextobj 256)
  (vla-put-backgroundfill mtextobj :vlax-true); mask on with background color
  (setq el (entget (vlax-vla-object->ename mtextobj)))
  (setq el (subst (cons 45 1.05) (assoc 45 el) el)) ;Set MaskSize 1.05 × TextSize
  (entmod el)
  (setvar "osmode" om)
  (setvar "osnapz" osz)
  (setvar "clayer" clay)
  (setvar "textstyle" txtstyle)
  (setvar "textsize" txtsize)
  (command "ucs" "p")
  (princ)
)

____________________
Civil 3D 2008, Terramodel

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources