Jump to content

Recommended Posts

Posted

Hi Everyone,

 

Just wondering if anyone knows of a good lsp routine for doing the following, or if anyone knows how to do this with built in capabilities in AutoCAD 2015. Basically I want to annotate angles and distance for survey drafting so I can produce plans that look like this plan that I've attached. I have a routine that will give me the distance and bearing and place it parallel to a line but now I need to be able to do the same with the angle (in degrees/minutes/seconds) and distance (in meters) so that the angle appears as it does in the attached sample.

 

Any help would be most appreciated! Thanks!

survey photo.PNG

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • drafting1768

    6

  • hanhphuc

    4

  • ReMark

    3

  • reddo83

    2

Top Posters In This Topic

Posted Images

Posted

Why can't you just insert the angle without any dimensions lines and rotate it to suit? Do we really need a magic button for this?

Posted
Thread moved.

 

If you wanted a LISP, why didn't you post in the AutoLISP, Visual LISP & DCL Forum?

 

SLW210:

Because I was hoping to get an answer like this:

 

"Why can't you just insert the angle without any dimensions lines and rotate it to suit? Do we really need a magic button for this?"

 

I admit I was hoping for something a little more quick and easy than manually rotating (I have to do hundreds of them) it but I was afraid if I put this question into the lisp forum I would get my hand smacked for not putting it in this forum when there's already a simple way to do it without a lisp routine.

Posted (edited)

How were the angle text objects created? Did you use MTEXT or just plain text?

 

Can you attach a sample drawing file with the angles as they currently exist?

 

I imagine that you want the angle text rotated so it bisects the angle formed by the two adjacent property lines in this lisp routine you are seeking right?

 

Or use a variation of this advice....

 

"Assuming that your PICKFIRST is set to 1 and the Text/MText is all Middle or Middle-Center justified then this is fairly easy. Have the Properties Dialog box open (CTRL+1) Select the Text/MText (or select all, and use the little pulldown at the top to only select the Text objects) and then change the rotation to the desired angle. -- Tracy W. Lincoln Autodesk Discussion Group Facilitator"

 

Finally, there is this. Rotate multiple objects around their basepoint.

 

https://autocadtips.wordpress.com/2014/02/01/autolisp-rotate-multiple-objects-around-their-base-point/

 

It's all in how you search.

Edited by ReMark
Posted

You could create a dimstyle that has dimline1 and dimline2 suppressed. After explode, you'd be left with just the MText value, which is easy to rotate so it bisects the angle using grips and polar tracking. A lisp is still the way to go if you have dozens/hundreds.

 

Dimangular - no dimension lines.gif

Posted
After explode, you'd be left with just the MText value......
Whaaaa? :shock::shock::shock::shock:
Posted

Can you clarify?

 

OP did not request a way to "dimension" the angles, they requested a way to annotate the angle as shown in the illustration. The lisp the OP uses to annotate the distance and bearing probably isn't a "dimension" either, it's just a text/mtext.

Posted

Brilliant! Thanks so much ReMark! I'm under the gun here with a project and was beginning to give in to frustration. Thanks so much for your generous help!

 

I do indeed want the angle text rotated so it bisects the angle formed by the two adjacent property lines. I'm just going to look into some of your suggestions above and if I'm still stuck I'll definitely add a file and ask for further input.

 

Much appreciated!

Posted

Nestly, you're correct, I am looking for a way to annotate the angle and you're also correct, my lisp doesn't actually dimension, it inserts text which is placed above the line, parallel to it and at the midpoint. I would ultimately love to have a lisp routine that would do the exact same thing (give the distance parallel to the line, at the midpoint) and the angle at the intersection of the same line and the adjacent line, with the angle text rotated so it bisects the angle formed by the two adjacent lines, as shown in the illustration.

 

Thanks for the great demo! That will definitely get me where I need to go but will still but inefficient with hundreds to do, as you say. However, time is running out for me here so an inefficient method is going to be better than no method! :)

 

Cheers!

Posted

Glad to be of some (limited) service. If you have a lisp routine that just needs tweaking you should attach it to your next post. Maybe one of the lisp gurus here can instruct you on how to tweak it to suit your present needs. Good luck.

Posted

With the dim extension lines and dim lines suppressed, use the macro

^C^Cdimangular;\\a;\\\

This will require you guessing at the angle but it will be close and probably look alright. See attached. Once you have the macro assigned to a toolbutton, pick it to start, pick in the order and location shown.

 

Very quick and dirty, someone in the lisp area can probably put one together to do exactly what you want with two or three picks.

dimangular macro.png

Posted
With the dim extension lines and dim lines suppressed, use the macro

^C^Cdimangular;\\a;\\\

This will require you guessing at the angle but it will be close and probably look alright. See attached. Once you have the macro assigned to a toolbutton, pick it to start, pick in the order and location shown.

 

Very quick and dirty, someone in the lisp area can probably put one together to do exactly what you want with two or three picks.

 

Thanks! I'll give that one a try too.

Posted (edited)
With the dim extension lines and dim lines suppressed, use the macro

^C^Cdimangular;\\a;\\\

This will require you guessing at the angle but it will be close and probably look alright. See attached. Once you have the macro assigned to a toolbutton, pick it to start, pick in the order and location shown.

 

Very quick and dirty, someone in the lisp area can probably put one together to do exactly what you want with two or three picks.

 

hey guys, this for lisp LWpolyline only. multiple dimangular updated v1.1

 

Just tweak the global parameters to suit your need. t / nil


(setq 
*dimsuppressed* [b][color="red"]t[/color][/b] [color="#696969"] ;[b] [u]t[/u]= suppressed[/b] / nil= normal [/color]
*dimtxtinside* [b][color="red"]t [/color][/b] [color="#696969"]; [b][u]t[/u]= acute angle[/b] / nil= obtuse large > 180[/color]
)

(defun c:AngLWP	( / *error* pl lst p1 p2 cc m en l i v doc midp var sz box vobj )  
;hanhphuc 10/12/2014 anglwp.lsp (v1.1)
...
...

Edited by hanhphuc
link updated :v1.1
Posted (edited)

You only need pick 2 pts the only trick is that you pick each line near the angle intersect as you can then work out the line direction correctly you need a yes/no greater than 180 I use enter or any key, so it puts text correct side. Very fast way to do, only hiccup is I have to find time to put it together, will try.

 

Just had a quick play and the easiest way is to just do DIM ANG then using vl get the properties

ExtLine1StartPoint = (413.816 193.671 0.0)

Measurement (RO) = 2.18021

TextPosition = (395.766 231.118 0.0)

This is all you need the extline1.. is the intersection pt and the Textposition is the centre of the text so gives position and brg of text Measurement is answer in Radians just entlast and delete last.

Edited by BIGAL
Posted (edited)

Try this ran out of time needs a bit of tweaking and check for text readability.

 

; lable angle using DIM ang method
; By Alan H DEC 2014
; need setvar angs radians
(vl-load-com)
(SETQ ANGBASEE (GETVAR "ANGBASE"))
(SETQ ANGDIRR (GETVAR "ANGDIR"))
(setq obj (entsel "\npick line"))
(setq obj2 (entsel "\npick line 2 "))
(setq pt1 (getpoint "\nPick point for angle"))
(command "dimangular" obj obj2 pt1) 
(setq obj (vlax-ename->vla-object (entlast)))
(setq pt1 (vlax-safearray->list (vlax-variant-value(vla-get-ExtLine1StartPoint obj)))) 
(setq ang (vla-get-Measurement obj)) ; returns number
(setq pt2 (vlax-safearray->list (vlax-variant-value(vla-get-TextPosition obj))))
(setq ang2 (/ (*  (angle pt1 pt2) 180.0) pi))
(vla-delete obj)
(command "-text" pt2 ang2 ang)
(SETVAR "ANGBASE" 0.0)
(SETVAR "ANGDIR" 0)

Edited by BIGAL
Posted

Thanks everyone for your continued help! :)

Posted (edited)
You only need pick 2 pts the only trick is that you pick each line near the angle intersect as you can then work out the line direction correctly you need a yes/no greater than 180 I use enter or any key, so it puts text correct side. Very fast way to do, only hiccup is I have to find time to put it together, will try.

 

Just had a quick play and the easiest way is to just do DIM ANG then using vl get the properties

ExtLine1StartPoint = (413.816 193.671 0.0)

Measurement (RO) = 2.18021

TextPosition = (395.766 231.118 0.0)

This is all you need the extline1.. is the intersection pt and the Textposition is the centre of the text so gives position and brg of text Measurement is answer in Radians just entlast and delete last.

 

Thanx BIGAL Nice idea :)

 

updated link at post#14

anglwp.gif

Edited by hanhphuc
  • 2 months later...
Posted

Which lsp routine do I use do get dimensioning to do exactly what the graphic does. Doing some surveying drafting also and this would be very handy.

 

 

 

 

Thanx BIGAL Nice idea :)

 

updated link at post#14

anglwp.gif

Posted
Which lsp routine do I use do get dimensioning to do exactly what the graphic does. Doing some surveying drafting also and this would be very handy.

 

welcome to CADTutor reddo83,

The underlined text is a URL link, which directs you to copy the related code.

click --> multiple dimangular

which already mentioned in #post14

 

HTH

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