smitaranjan Posted January 4 Posted January 4 On 1/4/2025 at 1:02 AM, BIGAL said: If you look at this image its a make layouts walking along a line or pline. It auto rotates the viewport to suit, I could add the what is previous page and what is next page, I am getting confused as to why you want to use hyperlinks. For a single road style plan then the before after is relatively easy, when we get to grid layouts a sheet can have say 4 sheets touching. You can get all layout names and there corresponding TABORDER. So labelling multiple layouts could be done. Expand Hyperlink is for output pdf. It will be easier for the reviewer. Can you send a video of how its doing layout automatically? Is automatically NORTH arrow direction adjusted with this lisp? Quote
BIGAL Posted January 4 Posted January 4 I use a plot range of layouts to pdf, just do like 3 to 5 or 1 to 999 which is plot all. I use a make index from title blocks so know sheet range. The make layouts is two steps, make the rectangle at desired scale, matching a title block. You can move delete rotate etc, then part two make layouts. The cost is a cup of coffee as I have to set it up to suit your title blocks. There is a grid style option as well. yes have rotate north arrow to match viewport rotation. Yes I have draw a grid on the viewport also. Quote
smitaranjan Posted January 6 Posted January 6 XXXXXX MILWAUKEE CITY BURIED PATH2.dwgFetching info... Quote
smitaranjan Posted January 6 Posted January 6 On 1/6/2025 at 2:24 PM, smitaranjan said: XXXXXX MILWAUKEE CITY BURIED PATH2.dwg 1.8 MB · 0 downloads XXXXX_E MAIN ST_IN DOT_PERMIT2.dwgFetching info... Quote
smitaranjan Posted January 6 Posted January 6 On 1/4/2025 at 10:15 PM, BIGAL said: I use a plot range of layouts to pdf, just do like 3 to 5 or 1 to 999 which is plot all. I use a make index from title blocks so know sheet range. The make layouts is two steps, make the rectangle at desired scale, matching a title block. You can move delete rotate etc, then part two make layouts. The cost is a cup of coffee as I have to set it up to suit your title blocks. There is a grid style option as well. yes have rotate north arrow to match viewport rotation. Yes I have draw a grid on the viewport also. Expand Okay. Thank you Quote
pkenewell Posted January 6 Posted January 6 On 1/3/2025 at 10:30 PM, smitaranjan said: eg: foo--> layout list or custom-->(if layout list is selected as usual above code process)--> layout no.-->select objects to add the link(multiple object can be selected at a time{individual hyperlink entity})--> enter---> layout no.-->select objects to add the link {after entering esc the process will end} @smitaranjan OK this is a bit more involved for the layout select - Give this a try: I'm using Lee Mac's List Box V1.2 for the layout select dialog: https://www.lee-mac.com/listbox.html (defun c:LLINK (/ ch e ll ly ss) (vl-load-com) (initget "Select All") (if (not (setq ch (getkword "\nSelect a Single Layout or All [Select/All] <Select>: ")))(setq ch "Select")) (cond ((= ch "Select") (setq ll (layoutlist)) (if (and (setq ly (LM:listbox "Select a Layout to Link:" ll 0)) (setq ss (ssget)) ) (repeat (setq c (sslength ss)) (setq e (ssname ss (setq c (1- c)))) (vla-add (vla-get-hyperlinks (vlax-ename->vla-object e)) "" ;; External Hyperlink (strcat "Go to " (car ly)) ;; display description (strcat "," (car ly)) ;; Named location in the document ) ) ) ) ((= ch "All") (foreach n (layoutlist) ;; for each layout name, (if (setq e (entsel (strcat "\nSelect Object to link to \"" n "\""))) ;; select an object to add the link (vla-add (vla-get-hyperlinks (vlax-ename->vla-object (car e))) "" ;; External Hyperlink (strcat "Go to " n) ;; display description (strcat "," n) ;; Named location in the document ) ) ) ) ) (princ) ) ;; List Box - Lee Mac ;; Displays a DCL list box allowing the user to make a selection from the supplied data. ;; msg - [str] Dialog label ;; lst - [lst] List of strings to display ;; bit - [int] 1=allow multiple; 2=return indexes ;; Returns: [lst] List of selected items/indexes, else nil (defun LM:listbox ( msg lst bit / dch des tmp rtn ) (cond ( (not (and (setq tmp (vl-filename-mktemp nil nil ".dcl")) (setq des (open tmp "w")) (write-line (strcat "listbox:dialog{label=\"" msg "\";spacer;:list_box{key=\"list\";multiple_select=" (if (= 1 (logand 1 bit)) "true" "false") ";width=50;height=15;}spacer;ok_cancel;}" ) des ) (not (close des)) (< 0 (setq dch (load_dialog tmp))) (new_dialog "listbox" dch) ) ) (prompt "\nError Loading List Box Dialog.") ) ( t (start_list "list") (foreach itm lst (add_list itm)) (end_list) (setq rtn (set_tile "list" "0")) (action_tile "list" "(setq rtn $value)") (setq rtn (if (= 1 (start_dialog)) (if (= 2 (logand 2 bit)) (read (strcat "(" rtn ")")) (mapcar '(lambda ( x ) (nth x lst)) (read (strcat "(" rtn ")"))) ) ) ) ) ) (if (< 0 dch) (unload_dialog dch) ) (if (and tmp (setq tmp (findfile tmp))) (vl-file-delete tmp) ) rtn ) 1 Quote
smitaranjan Posted January 6 Posted January 6 On 1/6/2025 at 2:41 PM, pkenewell said: @smitaranjan OK this is a bit more involved for the layout select - Give this a try: I'm using Lee Mac's List Box V1.2 for the layout select dialog: https://www.lee-mac.com/listbox.html (defun c:LLINK (/ ch e ll ly ss) (vl-load-com) (initget "Select All") (if (not (setq ch (getkword "\nSelect a Single Layout or All [Select/All] <Select>: ")))(setq ch "Select")) (cond ((= ch "Select") (setq ll (layoutlist)) (if (and (setq ly (LM:listbox "Select a Layout to Link:" ll 0)) (setq ss (ssget)) ) (repeat (setq c (sslength ss)) (setq e (ssname ss (setq c (1- c)))) (vla-add (vla-get-hyperlinks (vlax-ename->vla-object e)) "" ;; External Hyperlink (strcat "Go to " (car ly)) ;; display description (strcat "," (car ly)) ;; Named location in the document ) ) ) ) ((= ch "All") (foreach n (layoutlist) ;; for each layout name, (if (setq e (entsel (strcat "\nSelect Object to link to \"" n "\""))) ;; select an object to add the link (vla-add (vla-get-hyperlinks (vlax-ename->vla-object (car e))) "" ;; External Hyperlink (strcat "Go to " n) ;; display description (strcat "," n) ;; Named location in the document ) ) ) ) ) (princ) ) ;; List Box - Lee Mac ;; Displays a DCL list box allowing the user to make a selection from the supplied data. ;; msg - [str] Dialog label ;; lst - [lst] List of strings to display ;; bit - [int] 1=allow multiple; 2=return indexes ;; Returns: [lst] List of selected items/indexes, else nil (defun LM:listbox ( msg lst bit / dch des tmp rtn ) (cond ( (not (and (setq tmp (vl-filename-mktemp nil nil ".dcl")) (setq des (open tmp "w")) (write-line (strcat "listbox:dialog{label=\"" msg "\";spacer;:list_box{key=\"list\";multiple_select=" (if (= 1 (logand 1 bit)) "true" "false") ";width=50;height=15;}spacer;ok_cancel;}" ) des ) (not (close des)) (< 0 (setq dch (load_dialog tmp))) (new_dialog "listbox" dch) ) ) (prompt "\nError Loading List Box Dialog.") ) ( t (start_list "list") (foreach itm lst (add_list itm)) (end_list) (setq rtn (set_tile "list" "0")) (action_tile "list" "(setq rtn $value)") (setq rtn (if (= 1 (start_dialog)) (if (= 2 (logand 2 bit)) (read (strcat "(" rtn ")")) (mapcar '(lambda ( x ) (nth x lst)) (read (strcat "(" rtn ")"))) ) ) ) ) ) (if (< 0 dch) (unload_dialog dch) ) (if (and tmp (setq tmp (findfile tmp))) (vl-file-delete tmp) ) rtn ) Expand THANK YOU. ITS WORKING PROPERLY 1 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.