请尝试以下操作:
- (defun c:hmi ( / lst )
- (if (setq lst (getwindowpoints))
- (command
- "_.-plot"
- "_Yes" ; Detailed plot configuration?
- "Model" ; Enter Layout Name
- "PublishToWeb PNG.pc3" ; Enter an output device name
- "HMI" ; Enter Paper Size (User Defined)
- "_L" ; Enter Drawing Orientation
- "_N" ; Plot Upside Down?
- "_W" ; Enter Plot Area
- "_non" (car lst)
- "_non" (cadr lst)
- "_F" ; Enter Plot Scale
- "_C" ; Enter plot offset
- "_Y" ; Plot with Style
- "." ; Enter plot style table name (none)
- "_Y" ; Plot with lineweights?
- "As Displayed" ; Enter Shade Plot Settings
- "\" ; Creating plot file and saving
- "_N" ; Save Changes to page setup
- "_Y" ; Proceed with plot
- )
- )
- (princ)
- )
- (defun getwindowpoints ( / ent )
- (while
- (progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect Polyline: ")))
- (cond
- ( (= 7 (getvar 'errno))
- (princ "\nMissed, try again.")
- )
- ( (= 'ename (type ent))
- (if (/= "LWPOLYLINE" (cdr (assoc 0 (entget ent))))
- (princ "\nPlease select an LWPolyline.")
- )
- )
- )
- )
- )
- (if ent
- ( (lambda ( lst ) (mapcar '(lambda ( x ) (apply 'mapcar (cons x lst))) '(min max)))
- (mapcar 'cdr (vl-remove-if-not '(lambda ( x ) (= 10 (car x))) (entget ent)))
- )
- )
- )
- (princ)
|