Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all.
I have asked how to use the presspull command in Autolisp before, but was not able to solve the problem.
I gave up on using the presspull command.
Then I tried to use rextrude and subtract to achieve the same behavior.
However, it does not work.
In the following code, It cannot subtract the second circle.
Why is this?
Please help me.
(defun c:test1 (/ th ss nn id )
(command "rectang" "0,0" "100,100")
(command "circle" "50,50" "10")
(command "circle" "20,20" "5")
(setq th 5)
(setq ss (ssget "X" (list (cons 0 "LWPOLYLINE"))))
(setq id (ssname ss 0))
(_set_solid id th)
)
(defun _set_solid (id th / pts panel iss inn iid did)
(setq pts (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget id)))
(setq pts (mapcar 'cdr pts))
(command "copy" id "" '(0 0 0) '(0 0 0))
(command "extrude" (entlast) "" th)
(setq panel (entlast))
(setq iss (ssget "WP" pts))
(setq inn (sslength iss))
(setq i 0)
(repeat inn
(setq iid (ssname iss i))
(command "copy" iid "" '(0 0 0) '(0 0 0))
(command "extrude" iid "" th)
(setq did (entlast))
(command "subtract" panel "" did "")
(setq panel (entlast))
(setq i (1+ i))
)
)
Saitoib
Solved! Go to Solution.