;动态箭头线型
(defun c:qgjt( / old_cmd ss pt sf old_selectioncycling )

(defun sf ( pt ss / alts gr s1 newscale zq)
	(setq
		alts (getvar "LTSCALE")
		zq (mai_dxf 40 (tblsearch "ltype" (mai_dxf 6 (car ss))))
		ss (mapcar 'vlax-ename->vla-object ss)
	)
	(while (= (car (setq gr (grread nil 5 0))) 5)
		(redraw)
		(grdraw (cadr gr) pt 1 1)
		(setq newscale (if (mai_equal zq 0) 1 (/ (distance (cadr gr) pt) zq alts)))
		(foreach s1 ss (vlax-put s1 'LinetypeScale newscale))
	)
	(redraw)
	(princ)
)

	(mini_start nil)
	(setq ss (mai_select_first '((0 . "*POLYLINE,ELLIPSE,SPLINE,LINE,CIRCLE,ARC")) "选择要修改线形的线:<退出>" "没有选择线."))
	(or (tblsearch "ltype" "arrowline")
		(mai_load_templin
			"ARROWLINE"
			(list "*ARROWLINE,箭头线 LTscale=箭头大小\nA,4,[ZIG,ltypeshp.shx,y=1,r=270,s=1],4")
		)
	)
	(command "_.chprop" ss "" "lt" "ARROWLINE" "")
	(setq ss (mai_ssget_2_list ss))
	(foreach pt ss
		(if (wcmatch (mai_dxf 0 pt) "*POLYLINE")
			(command "_.pedit" pt "l" "on" "")
		)
	)
	(or (setq pt (getpoint "\n动态调整箭头比例:<不调整>"))
		(exit)
	)
	(setq old_selectioncycling (getvar "selectioncycling"))
	(if old_selectioncycling (setvar "selectioncycling" 0))
	(sf pt ss)
	(mai_end)
)
