(defun c:ok ()
(setq osm (getvar "osmode"))
(terpri)
(setq y1 (getreal "yazının yüksekliğini giriniz :"))
(terpri)
(setq en (getreal "ok işaretinin genişliğini giriniz :"))
(terpri)
(setq p1 (getpoint "ok işaretinin başlangıç noktasını giriniz"))
(terpri)
(setq p2 (getpoint "ok işaretinin bitiş noktasını giriniz"))
(setq mesafe (distance p1 p2))
(setq açı (angle p1 p2))
(setq n1 (polar p1 (- açı (/ pi 2)) (* 0.5 en)))
(setq n2 (polar n1 açı (- mesafe (* 1.5 en))))
(setq n3 (polar n2 (- açı (/ pi 2)) en))
(setq n4 (polar p1 (+ açı (/ pi 2)) (* 0.5 en)))
(setq n5 (polar n4 açı (- mesafe (* 1.5 en))))
(setq n6 (polar n5 (+ açı (/ pi 2)) en))
(setq i 1)
(while (> i 6)
(setq ni (strcat "n" i))
(setq nix (strcat "n" (+ i 1)))
(setq nmes (distance ni nizx))
(setq naçı (angle ni nix ))
(setq nderece (atof (angtos naçı 0 2)))
(setq norta (polar ni naçı (/ nmes 2 )))
(setq nyazı (strcat "l=" nmes))
(command "text" "j" "tc" norta y1 nderece nyazı )
)
(command "osmode" 0)
(command "pline" n1 n2 n3 p2 n6 n5 n4 "close") ; 8
(setvar "osmode" osm)
)
--------------------------------------------------------------------
kalın ve altı çizili kodları bir türlü ayarlayamadım
yapmak istediğimi resimde gösteriyorum.
yardımcı olursanız çok sevinirim..
Solved! Go to Solution.
I don't speak your language but :
(strcat "n" (itoa i)) can
I didn't try
LT does not use lisp. Try posting in the lisp forums. The link is below
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130
Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
@Anonymous wrote:
....
(command "text" "j" "tc" norta y1 nderece nyazı )
....--------------------------------------------------------------------
kalın ve altı çizili kodları bir türlü ayarlayamadım
....
[Google translator from Turkish:
I couldn't set a kind of bold and underline codes ....]
Since it's plain Text, there is no code for bold-face -- you would need to either use a bolder font in the Style assigned to the Text, or use Mtext. For plain text to be underlined, if you want the whole thing underlined, add "%%U" at the beginning of the text string in your (strcat) function.
I solved the problem
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/while-i-apply/m-p/8849290#M386292
Command: (setq n1 5) 5 Command: (eval (read "n1")) 5
Can't find what you're looking for? Ask the community or share your knowledge.