pmadhwal7 Posted November 18, 2019 Posted November 18, 2019 (edited) is their any way to export scale of viewport(Layout) to excel??? or any way where we check is my all layout scale correct or not like if i am working with 1:1 scale is any of my layout is different scale Edited November 18, 2019 by pmadhwal7 Quote
tombu Posted November 18, 2019 Posted November 18, 2019 You could check plot.log files to see if each plot was 1:1. Quote
BIGAL Posted November 19, 2019 Posted November 19, 2019 You can get viewport properties Select object: ; IAcadPViewport: IAcadPViewport Interface ; Property values: ; CustomScale = 1.973 zoomed out ; CustomScale = 6.052 I set viewport 1:250 metric ie 1000/4 ; CustomScale = 4.000 Quote
pmadhwal7 Posted November 19, 2019 Author Posted November 19, 2019 4 hours ago, BIGAL said: You can get viewport properties Select object: ; IAcadPViewport: IAcadPViewport Interface ; Property values: ; CustomScale = 1.973 zoomed out ; CustomScale = 6.052 I set viewport 1:250 metric ie 1000/4 ; CustomScale = 4.000 is this an lsp??? Quote
pmadhwal7 Posted November 19, 2019 Author Posted November 19, 2019 17 hours ago, tombu said: You could check plot.log files to see if each plot was 1:1. not found plot log files Quote
CafeJr Posted November 19, 2019 Posted November 19, 2019 Hi to all, I don't know if it are closed, so, looking for it, I had found on "express tools" menu of Autocad the following command: VPSCALE (vpscale.lsp) attached here. For a multiple viewport in paper space, you can get one by one the scale data. I think that it can help. vpscale.lsp Quote
BIGAL Posted November 19, 2019 Posted November 19, 2019 I use dumpit.lsp to get properties of an object then write a lisp etc to suit. (setq obj (vlax-ename->vla-object (car (entsel "pick viewport edge ")))) (alert (strcat "Your viewport scale is " (rtos (vla-get-customscale obj) 2 4))) Quote
pmadhwal7 Posted November 20, 2019 Author Posted November 20, 2019 (edited) actually i want to all view port scale checked at once because i have layout nearly 500 in one route...is is possible Edited November 20, 2019 by pmadhwal7 Quote
ronjonp Posted November 20, 2019 Posted November 20, 2019 Try this: (defun c:foo (/ _writefile _dxf r s) ;; RJP » 2019-11-20 (defun _writefile (fn l / f) (cond ((and (eq 'str (type fn)) (setq f (open fn "w"))) (foreach x l (write-line x f)) (close f) fn ) ) ) (defun _dxf (c e) (cdr (assoc c (entget e)))) (if (setq s (ssget "_X" '((0 . "VIEWPORT") (-4 . "!=") (69 . 1)))) (foreach e (mapcar 'cadr (ssnamex s)) (setq r (cons (cons (_dxf 410 e) (/ 1 (/ (_dxf 41 e) (_dxf 45 e)))) r)) ) ) (_writefile (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) "-VPSCALES.csv") (mapcar '(lambda (x) (strcat (vl-princ-to-string (car x)) "," (vl-princ-to-string (cdr x)))) (vl-sort r '(lambda (r j) (< (car r) (car j)))) ) ) (princ) ) Quote
pmadhwal7 Posted November 22, 2019 Author Posted November 22, 2019 On 11/20/2019 at 9:20 PM, ronjonp said: Try this: (defun c:foo (/ _writefile _dxf r s) ;; RJP » 2019-11-20 (defun _writefile (fn l / f) (cond ((and (eq 'str (type fn)) (setq f (open fn "w"))) (foreach x l (write-line x f)) (close f) fn ) ) ) (defun _dxf (c e) (cdr (assoc c (entget e)))) (if (setq s (ssget "_X" '((0 . "VIEWPORT") (-4 . "!=") (69 . 1)))) (foreach e (mapcar 'cadr (ssnamex s)) (setq r (cons (cons (_dxf 410 e) (/ 1 (/ (_dxf 41 e) (_dxf 45 e)))) r)) ) ) (_writefile (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) "-VPSCALES.csv") (mapcar '(lambda (x) (strcat (vl-princ-to-string (car x)) "," (vl-princ-to-string (cdr x)))) (vl-sort r '(lambda (r j) (< (car r) (car j)))) ) ) (princ) ) not working Quote
ronjonp Posted November 22, 2019 Posted November 22, 2019 (edited) 9 hours ago, pmadhwal7 said: not working Strange .. worked for me. It saves a csv file in the same directory as the drawing. Edited November 22, 2019 by ronjonp Quote
pmadhwal7 Posted November 23, 2019 Author Posted November 23, 2019 19 hours ago, ronjonp said: Strange .. worked for me. It saves a csv file in the same directory as the drawing. yes sir not working but anyway i found it in plot.log file thanks all 1 Quote
tombu Posted November 23, 2019 Posted November 23, 2019 4 hours ago, pmadhwal7 said: yes sir not working but anyway i found it in plot.log file thanks all Glad you got it worked out. Years ago when our plotters often had wider margins than required I used a Plot Stamp with Plot Scale included. While 1:1 was hardly noticeable 1:096827435 stood out. Worth considering if you're having issues. http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-C8CEF1EE-9816-40F8-AA2C-8C320A3C8564 Quote
pmadhwal7 Posted November 25, 2019 Author Posted November 25, 2019 On 11/23/2019 at 7:55 PM, tombu said: Glad you got it worked out. Years ago when our plotters often had wider margins than required I used a Plot Stamp with Plot Scale included. While 1:1 was hardly noticeable 1:096827435 stood out. Worth considering if you're having issues. http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-C8CEF1EE-9816-40F8-AA2C-8C320A3C8564 Thanks sir... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.