TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Hrishikesh on July 08, 2017, 03:19:49 PM
-
Hi All,
I tried to make lisp which create viewport boundary on model space & create viewport on layout for the same.
I am not a professional lisp programer, I am working on Autocad for 15 years, your comments & suggestions help me a lot to learn more about lisp programming.
Thanks
Hrishikesh
(defun C:NEWVP
(/ PT1 PT2 PTV SC
) (prompt "Select layout on which you want to create viewport") (vl-cmdf "-LAYER" "M" "Viewports" "C" "8" "" "") )
(vl-cmdf "-SCALELISTEDIT" "_R" "_Y" "_E") (prompt "Draw boundary around modelspace object for making viewport") (setq PT1
(getpoint "\nSelect First Corner for viewport boundary")) (setq sc
(/ (getreal "\nEnter scale for new viewport without inch sign (Example: 1/8, 1/2, 3/4 or 1 etc.): ") 12)) (setq PTV
(getpoint "\nSelect insertion point for new viewport")) (vl-cmdf "MVIEW" "_L" "ON" "_L" "") ) ;_ end of defun
-
This post
https://www.theswamp.org/index.php?topic=42149.msg473152#msg473152
-
Thank you Hasan sahab,
Your program is very good & easy to use.
I wll definitely use this one.
-
Thank you Hasan sahab,
Your program is very good & easy to use.
I wll definitely use this one.
It is my pleasure