- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am trying to writing code which will help me to scale all line or polyline object from their midpoint by "3".
....
(setq sec (ssget "_WP" (list PT1 PT2 PT3 PT4) (list (cons 0 tl1) (cons 8 tl2))))
(setq sca (getdist"\scale faktör giriniz !")); scale factor
(setq bas 0)
(setq cizgisay (sslength sec))
(setq çizgi1 (ssname sec bas)); first line object entity name
(setq k1 (entget çizgi1))
(setq n1 (assoc 10 k1))
(if (assoc 11 k1) (setq n2 (assoc 11 k1)) (setq n2 (assoc 10 (reverse k1))))
(setq n1s (list (nth 1 n1) (nth 2 n1)))
(setq n2s (list (nth 1 n2) (nth 2 n2)))
(setq ang1 (angle n1s n2s))
(setq gn1 (polar n1s ang1 (/ (distance n1s n2s) 2))); midpoint of object
(command ".scale" çizgi1 "" gn1 "3")
but command ending with "nil"
can anyone helpt me to solve?
Solved! Go to Solution.