Arrow For Flow Direction

Arrow For Flow Direction

ishaq03
Advocate Advocate
3,405 Views
4 Replies
Message 1 of 5

Arrow For Flow Direction

ishaq03
Advocate
Advocate

I would like to request you if there is an available lisp for making a flow arrow just like in the picture. I have been lot of polylines which fallowing the water flow direction I want to be add arrows to polylines for more good presentation. any body provide me quick solution as soon as much Appreciated. 

 

 

 

ishaq03_0-1638948190592.png

 

0 Likes
3,406 Views
4 Replies
Replies (4)
Message 2 of 5

hosneyalaa
Advisor
Advisor

HI

 

https://forums.augi.com/showthread.php?152864-draw-polyline-as-a-series-of-arrows

; Function to add verticies to a polyline and make some segments arrows.
 ;;;;;;;;https://forums.augi.com/showthread.php?152864-draw-polyline-as-a-series-of-arrows
(defun C:ARWPL (/ objPolyline sngArrowSize sngArrowWidth sngSegment)
 (vl-load-com)
 (and 
  (setq sngSegment       24.0)  ;(getdist "\nEnter Segment Length: "))
  (setq sngArrowSize     5.0)   ;(getdist "\nEnter Arrow Size: "))
  (setq sngArrowWidth    (* 0.4 sngArrowSize))
  (setq objPolyline (polylineselect))
  (polylinemeasure objPolyline sngSegment)
 )
)

; Function to iterate through length of polyline

(defun PolylineMeasure (objPolyline sngSegment / lstofSublists sngDistance)
 (setq sngDistance sngSegment)
 (while (< sngDistance (vlax-curve-getdistatparam objPolyline 
                         (vlax-curve-getendparam objPolyline)))
  (PolylineVertexAdd objPolyline sngDistance)
  (PolylineVertexAdd objPolyline (- sngDistance sngArrowSize))
  (PolylineSetWidth  objPolyline sngDistance sngArrowWidth 0.0)
  (setq sngDistance    (+ sngDistance sngSegment))
 )
 T
)

; Function to set polyline width of a segment at a specified distance, specified widths

(defun PolylineSetWidth (objPolyline sngDistance sngStartWidth sngEndWidth)
 (vlax-invoke objPolyline 
              'SetWidth
              (1- (float (fix (+ 0.01 (vlax-curve-getparamatdist objPolyline sngDistance)))))
              sngStartWidth 
              sngEndWidth
 )
 T
)

; Function to add a vertex to a polyline at a specified distance

(defun PolylineVertexAdd (objPolyline sngDistance)
 (if (< sngDistance (vlax-curve-getdistatparam objPolyline 
                     (vlax-curve-getendparam objPolyline)))
  (vlax-invoke objPolyline 
               'AddVertex
              (1+ (float (fix (vlax-curve-getparamatdist objPolyline sngDistance))))
               (reverse (cdr (reverse (vlax-curve-getpointatdist objPolyline sngDistance))))
  )
 )
 T
)

; Function to select a single lightweight polyline.

(defun PolylineSelect (/ ssSelections entSelection objSelection)
 (princ "\nSelect Polyliine: \n")
 (if (and 
      (setq ssSelections (ssget ":E:S" (list (cons 0 "LWPOLYLINE"))))
      (setq entSelection (ssname ssSelections 0))
     )
  (vlax-ename->vla-object entSelection)
 )
)
(prin1)

 

 

Capture.JPG

0 Likes
Message 3 of 5

Kent1Cooper
Consultant
Consultant

Use a linetype, so that the arrows will adjust automatically in position and orientation when you change the configuration of the path.  A Search for "arrow linetype" yields >many threads<.

Kent Cooper, AIA
Message 4 of 5

ishaq03
Advocate
Advocate

Hi, everyone,

Please attached linetype arrows which reflecting to water flow path.

 

 

0 Likes
Message 5 of 5

Kent1Cooper
Consultant
Consultant

You could make a Text Style that uses the WINGDINGS3 font, and define a linetype that uses embedded text, with the "t" or "u" character, which look like this:

Kent1Cooper_0-1639057552107.png

or in any Style, the "\U+25C4" and "\U+25BA" characters:

Kent1Cooper_0-1639058224637.png

which are nearly identical, and closer to the shape in your first image.

 

EDIT:  For example, this linetype definition:

*WHATEVER
A,3,["\U+25C4",STANDARD,y=-0.47],3

results in this:

Kent1Cooper_0-1639058776068.png

Change the 3's for a spacing you like.

 

Kent Cooper, AIA
0 Likes