Hey Forum...?
Was curious. I have wrote a program that helps to create the front plate to a vertical grille. it is comprised of a square upon a square. Groundbreaking, I know. Joking aside, it features a lot more dimensions than you'd think, with variables that hold data about future things like slots and such. it needs to be extruded, and instead of extruding and subtracting, I figured it might be worth figuring out if the presspull command could be activated via autolisp.
defun c:frontplate ( / width hgt width2 hgt2 pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8)
(setq
width (getreal "\DimA: ")
hgt (getreal "\DimB: ")
width2 (getreal "DimAA: ")
hgt2 (getreal "\DimBB: ")
VGap (getreal "\DimCC: ") ;Horizontal gap from bottom
HGap (getreal "\DimD: ") ;Vertical gap from left
pt1 (list 0 0) ;lower left corner of front
pt2 (polar pt1 0 width) ;lower right corner of front
pt3 (polar pt2 (* pi 0.5) hgt) ;upper right corner of front
pt4 (polar pt1 (* pi 0.5) (+ hgt 1.0)) ;lower left corner of top
pt5 (list Hgap VGap) ;lower left corner of front
pt6 (polar pt5 0 width2) ;lower right corner of front
pt7 (polar pt6 (* pi 0.5) hgt2) ;upper right corner of front
pt8 (polar pt5 (* pi 0.5) (+ hgt2 1.0)) ;lower left corner of top
) ;setq
(command
".rectangle" pt1 pt3
".rectangle" pt5 pt7
) ;command
(princ)
)
Why you did not try it?
(command "_.presspull" "_non" '(0 0 0) 10 "")
This works.
Btw. When using point within a command function - always turn off osnaps somehow!
(command "_.rectang" "_non" pnt1 "_non" "pnt2")
Can't find what you're looking for? Ask the community or share your knowledge.