统计图幅尺寸及数量
- (defun c:tt (/ lst1 lst2 str_lst)
- (setq str_lst (Pdf:Getparameter (getfiled "选择PDF文件" (getvar 'DWGPREFIX) "pdf" 128) "PageMediaDimensions"))
- (if str_lst
- (progn
- (setq lst1
- (mapcar
- (function
- (lambda(x)
- (read (strcat "(" (vl-string-left-trim "PageMediaDimensions: " x) ")"))
- )
- )
- str_lst
- )
- lst2 (HHst->Group lst1)
- )
- (foreach x lst2
- (princ
- (strcat "\n图幅[" (vl-princ-to-string (caar x)) " "
- (vl-princ-to-string (cadar x)) "]的数量是:" (vl-princ-to-string (vl-list-length x))
- )
- )
- )
- )
- (princ "\n提取不到相关数据!")
- )
- (princ)
- )
|