Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inserting an Arrow?

2 views
Skip to first unread message

Michael D. Sohn

unread,
Feb 1, 1996, 3:00:00 AM2/1/96
to

I just can't seem to figure out how to insert an arrow at the end of a
line/pline. I'm using R12. Can anyone help me?

Mike.

Moose Meat

unread,
Feb 3, 1996, 3:00:00 AM2/3/96
to
Create an arrow-head & store it as a block. Insert as necessary.

"It's time to throw all their damn tea in the harbor again!"

Peter Staehling

unread,
Feb 3, 1996, 3:00:00 AM2/3/96
to
In article <3112EC...@mms.net>, JFo...@mms.net says...
>Probably the quickest thing to do would be to use the leader command
>under DIM:. Enter DIM: and enter leader. Pick the beginning of the
>line where you wish the arrow head to begin and pick further up the line
>to generate the alignment of the arrow. Cancel the command and erase
>the line segment that this command generates. This will leave the arrow
>head. If the arrow head appears too small, increase DIMSCALE. If one
>doesn't appear, decrease DIMSCALE.
>
>Hope this helps.

We did that for a while but found that the arrows caused us problems
later. I don't recall the exact problem but when later changing some
property of the arrows or the layer they are on they behaved in a
strange manner.

We now use the following routine. I created this lisp routine and
assigned it to a button. Seems to work well for us. only minor
annoyance is that the line and the head are two separate entities
and need to be erased separately if no longer needed.

;;;ARROW will allow arrows to be drawn quickly and easily.
;;;Written by PJS 9/95
(defun C:arrow ()
(command "undo" "be")
(initget 1)
(setq p1 (getpoint "\nLeader start point:"))
(initget 1)
(setq p2 (getpoint p1 "\nNext point:"))
(setq ang (angle p1 p2))
(setq sf (getint "\nEnter Scale factor or \"0\" to pick an actual size for
arrow head. <48> :"))
(if (= sf nil)(setq sf 48))
(if (= sf 0)
(setq asize(getdist "Enter or pick a distance for arrow size: "))
(setq asize (* sf 0.125))
)
(command "SOLID" p1 (polar p1 (+ ang 0.165) asize)
(polar p1 (- ang 0.165) asize) "" "")
(command "LINE" p1 p2 "")
(command "redraw")
(command "undo" "end")
(princ)
)
(princ)


Jeffrey R. Foster, Jr.

unread,
Feb 3, 1996, 3:00:00 AM2/3/96
to Michael D. Sohn

John D. Cooper

unread,
Feb 5, 1996, 3:00:00 AM2/5/96
to
In article <3112EC...@mms.net> "Jeffrey R. Foster, Jr." <JFo...@mms.net> writes:
>From: "Jeffrey R. Foster, Jr." <JFo...@mms.net>
>Subject: Re: Inserting an Arrow?
>Date: Sat, 03 Feb 1996 00:04:39 -0500

>Michael D. Sohn wrote:
>>
>> I just can't seem to figure out how to insert an arrow at the end of a
>> line/pline. I'm using R12. Can anyone help me?
>>
>> Mike.


Another way is to creat a simple shape and insert that at the appropriate
scale. From the shape and a little lisp programmimg you can do all kinds of
leaders and even change the dimarrow. A third way is to use a neat little
arrow block.

Dave Robinson

unread,
Feb 5, 1996, 3:00:00 AM2/5/96
to
Mike.

If you can write lisp then use a ployline that is in two parts
where the first part has its starting width at zero and its ending
width at the arrow width size, length of this segment is the arrow
length. continue with the polyline back at width zero.

This will give you a single entity that can be rotated easily.
(a problem with dim leaders).

as this quick & dirty routine shows..


;; Simple arrow head and polyline drawing routine.

(defun c:aline ()

(setq pt1 (getpoint "\nStart of arrow line: "))

(setq pt2 (getpoint pt1 "\nLine junction/end: "))

(setq ang (angle pt1 pt2)
arr_width 2.5 ; Change to suit
arr_length 6 ; or set to DIMASZ
pt3 (polar pt1 ang arr_length) ; arrow base position
);setq

(setvar "cmdecho" 0) ; Save setting & restore?

(command "pline" pt1 "w" 0 arr_width pt3 "w" 0 0 pt2)

(while
(setq pt1 (getpoint pt2 "\nLine junction/end: "))
(command pt1)
(setq pt2 pt1)
);while

(command)

(princ)

);defun


Dave.

Jim Schroff

unread,
Feb 6, 1996, 3:00:00 AM2/6/96
to


What about taking this little exercise a step further: arrows, leaders
and blocks that are scaled relative to the *current* viewport where
multiple viewports of various scale exist in the drawing. I suppose
setting a USERRx variable to the effective sheet height when a border is
inserted in paper space, then using something like:

(defun C:XLEAD ()
(setvar DIMSCALE (/ (getvar "VIEWSIZE")(getvar "USERRx"))
(some_leader_and_or_block_insertion_routine_that_uses_dimscale)
(setvar "DIMSCALE" 0)
)

[crude, I know, but it gets the point across]

An additional plus would be creating these by layers by viewport so that
vplayer can be used to toggle their visibility. It would probably be a
bit much to ask to have the ability to resize them if the viewport zoom
factor is changed, but...

--
Jim Schroff j...@schroff.sat.tx.us jsch...@texas.net
--

Desi Moreno

unread,
Feb 7, 1996, 3:00:00 AM2/7/96
to j...@schroff.sat.tx.us, ms...@andrew.cmu.edu

Or, just type "Dim1" rtn "L" rtn use the object snap "endpoint" to
select the endpoint of the pline, then to get the leader, you need to
pick a point far out enough to allow the leader to be drawn. it doesn't
matter where you pick the point, as long as it at the correct angle. Now
after you pick your point type "U", then cancel out of the command. this
will undo the line that always gets drawn and exits the command.

you can even write a lisp routine or even a script file would work

have fun. . .


Desi Moreno
Engineering Tech.
Modesto Irrigation District
Modesto, Calif.
E-Mail de...@mid.org


Peter Staehling

unread,
Feb 7, 1996, 3:00:00 AM2/7/96
to
Dave
I agree this is a better way. I will rewrite and set it up
to use dimasz. We use it in some bullet routines as well.
Thanks
Pete

***************************************************
* Peter Staehling pst...@aplcomm.jhuapl.edu *
* or stae...@jhuapl.edu *
***************************************************

Paul Chapman

unread,
Feb 8, 1996, 3:00:00 AM2/8/96
to
A simple solution with a pline is just to terminate the line a short
distance from the end and change the width to whatever looks good for
your arrow, then end it with a zero width.

Paul Chapman

cliff estes

unread,
Feb 11, 1996, 3:00:00 AM2/11/96
to
> jco...@ptialaska.net (John D. Cooper) writes:
> In article <3112EC...@mms.net> "Jeffrey R. Foster, Jr." <JFo...@mms.net> writes:
> >From: "Jeffrey R. Foster, Jr." <JFo...@mms.net>
> >Subject: Re: Inserting an Arrow?
> >Date: Sat, 03 Feb 1996 00:04:39 -0500
>
> >Michael D. Sohn wrote:
> >>
> >> I just can't seem to figure out how to insert an arrow at the end of a
> >> line/pline. I'm using R12. Can anyone help me?
> >>
>>>>


just to throw my two bits in, I include the following simple routine.


(defun c:aro ()
(command "undo" "m")
(setq end1 0)
(while (/= end1 nil)
(setq end1 nil)
(setvar "osmode" 1)
(setq end1 (getpoint "\nPick point near end "))
(setvar "osmode" 512)
(if (/= end1 nil)
(progn
(setvar "osmode" 0)
(setq end2 (getpoint end1 "\nPick 2nd point in dir away from arrow "))
(command ".dim1" "lea" end1 end2 ^c)
(command ".erase" "l" "")
);progn
); if
(setvar "osmode" 0)
);while
(princ)
)


Cheers,
**********************************************************************
*** Cliff W. Estes ces...@seanet.com ***
*** BaseLine Technology ph (206)882-7317 ***
*** 15834 NE 67th Place fax (206)882-7327 ***
*** Redmond, WA 98052 http://www.basline.com/basline ***
*** Home of BaseLine II, THE interactive hull fairing system ***
**********************************************************************
BaseLine II Demo available http://www.bateau.com
BaseLine Technology is now on the Web at http://www.basline.com/basline

0 new messages