Jump to content

spot elevation & rotate parallel


Recommended Posts

Posted

Can't seem to find a solution for my problem with Spot elevation labels

 

I'm trying to label the proposed surface elevation of the corner of my lot in a subdivision and having it rotate parallel with the lot line. Note, my lotlines do not have elevations assigned to them. They are just basic lines with 0 elevation. My surface has elevations though.

 

Is there a style I can make so this works?

Posted (edited)

Something I dont do often I think you can convert 2d lines to 3d lines via CIV3d. Usually do points, Then it would be easy via lisp get end point lable angle of line. It will be in surface utilities. I have a lisp others will to for the lable part. No Civ3d at moment

 

Back again busy day

 

Ok SURVEY

Edit figure elevation

Elev from surface

untick intermediate points

 

Little problem you must convert all your lines to plines a "line" is not supported then explode.

 

Here is a start this will put text on end of lines pretty easy to change to a text option.

back soon with code gone fishing,

back not very good today

 

This puts text as you want but needs some tuning.

 

 

; add text to end of lines 
: By Alan H Feb 2013
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)
(setq oldang (getvar "aunits"))
(setvar "aunits" 3)
(command "layer" "n" "PITS" "Color" 1 "PITS" "s" "PITS" "") ; change this to what you want
(setq ent (car (entsel "\nSelect drain layer: "))) 
(setq l_name (cdr (assoc 8 (entget ent))))

(setq listlines (ssget "X" (list (cons 0 "line")(cons 8 l_name))))
(setq listlinesno (sslength listlines))
(setq y 0)
(repeat listlinesno
       (setq pt1 (cdr (assoc 10 (entget (ssname listlines y)))))
       (setq pt2 (cdr (assoc 11 (entget (ssname listlines y)))))
       (setq z1 (nth 2 pt1))
       (setq z2 (nth 2 pt2))
       (setq zht (rtos z1 2 3))
       (setq ang (angle pt1 pt2))
     (command "text" pt1 2.5 ang zht) ; depends on the style wether ht is set
       (setq y (+ y 1))
)   ;end repeat listlineno

(setvar "osmode" oldsnap)
(setvar "aunits" oldang)
(princ)

Edited by BIGAL
Posted

You could make a Line Label that references the surface.

 

I do believe that you would have to label the line, then slide the label to the end point of the line. A little set up, but then it will be dynamic.

Posted

BIGAL,

 

I tried to run your code and I like where it can lead. As it is only text that it inserts, it is not dynamic. Maybe if you could make it a field and read the elevation of the line.

 

Or possible place a COGO point with elevation from surface. That would be a gold mine right there.

Posted

The only problem I can think of with a COGO point is that its not relational to the line creating the 3d points and adding to a group is same method as plines, the lable would be a style problem in that text will always be at a fixed angle. I just checked you can rotate a single point lable in CIV3d, its one of the properties of a CIV3D point. So the way to go would be have a elevation lable style create a point at end of line remember angle, create a point do elevation add a CIV3d point and then adjust that points rotation. I will have a look at getting into point properties then it could probably be done, anyone help getting into a single point properties.

Posted

That would probably be an ideal situation. A COGO point rotated to the line, with a reference to the surface elevation.

 

As to how to do it, I have no idea. I think .NET is easier to code with civil 3D objects.

Posted

I Had a play using dumpit and there is a variable on a CIV3d point which is the lable rotation I could get at some stuff pretty easy using VL but not this value, I think rather than trying to change the point properties I have to open the aecc point object group and edit it there. Will try some more.

Posted

twenty5:

 

If the answers above did not give you the results you were looking for you might go to http://www.underhillgeomatics.com and down-load their free program for surveyors and then enter that information into your autocad program.

 

Hope this might be of some help.

Posted

Welldriller had a look not really the answer there.

 

I delved a bit further and found out how to create civ3d points on the fly but not really what I want. Using a elev lable style you can modify one point properties including the label angle. thinking a bit more now I may need to read civ3d point and then use a similar method of obtaining deeper tree information just like a block has attributes and want to look at them.

 

(vl-load-com)
;; Change ProgID per Traget Civil 3D version
;; This code sample is meant for Civil 3D 2013
(setq aeccApp (vla-getinterfaceobject
(vlax-get-acad-object)
"AeccXUiLand.AeccApplication.10.0"
) ; 2013 is 10.0
)
(setq aeccDoc (vlax-get-property aeccApp "ActiveDocument"))
(setq aeccDb (vlax-get-property aeccDoc "Database"))
(setq oPoints (vlax-get-property aeccDoc "Points"))
(setq pt1 (vlax-3d-point '(10.0 10.0 0.0)))
(setq oPoint1 (vlax-invoke-method oPoints "Add" pt1))
(setq elevn1 (vlax-get-property oPoint1 "Elevation")) ; maybe something like "labelstyle"


Posted

Yes it can be done via Vlisp here is an example, it will create 3 pts, only hiccup is you need to go to toolspace and set a lable style to see the angled text. next step would be to add to my original code. I also found if you click a CIV3d pt the right button will give option to rotate label also.

 

(vl-load-com)
;; Change ProgID per Traget Civil 3D version
;; This code sample is meant for Civil 3D 2013
(setq aeccApp (vla-getinterfaceobject
(vlax-get-acad-object)
"AeccXUiLand.AeccApplication.10.0"
) ; 2013 is 10.0
)
(setq aeccDoc (vlax-get-property aeccApp "ActiveDocument"))
(setq oPoints (vlax-get-property aeccDoc "Points"))
(setq pt1 (vlax-3d-point '(10.0 10.0 1.0)))
(setq oPoint1 (vlax-invoke-method oPoints "Add" pt1))
(vlax-put opoint1 'labelrotation 1.57) ;approx 90deg
(setq pt1 (vlax-3d-point '(20.0 10.0 2.0)))
(setq oPoint1 (vlax-invoke-method oPoints "Add" pt1))
(vlax-put opoint1 'labelrotation 3.14) ;approx 180deg
(setq pt1 (vlax-3d-point '(20.0 20.0 3.0)))
(setq oPoint1 (vlax-invoke-method oPoints "Add" pt1))
(vlax-put opoint1 'labelrotation 4.71) ;approx 270deg
; to do all to an angle
;(vlax-for Point (vlax-get-property aeccDoc "Points")
;  (vlax-put point 'labelrotation 1.57) ;approx 90deg
 
(princ)

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