Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

label hand drawn contour polylines in civil 3D

Status
Not open for further replies.

youngEIT

Civil/Environmental
Joined
Jan 4, 2008
Messages
87
Location
US
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top