Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/06/2025 in all areas

  1. THANK YOU. ITS WORKING PROPERLY
    1 point
  2. @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 point
  3. Please place code in code tags! (<> in the editor toolbar)
    1 point
  4. Set DIMZIN to 0 before using rtos and then restore its original value.
    1 point
  5. Thanks everyone for the replies I understand that importing external DWG files with Entmake is very difficult, maybe not even possible. Many people (like you @pkenewell, thanks) have suggested me vla-InsertBlock, which I tried and it works. I will use that one. Thanks again Riccardo Ferrari
    1 point
  6. To remove those pesky legacy color tags in forum code I use this regex in Notepad++ : \[.*?\] The "Find what" box should contain \[.*?\] The "Replace with" box should be kept empty. The "Wrap around" option should be selected The "Search Mode" should be set to "Regular Expression". Hitting the "Replace All" button will remove everything within Square Brackets including the brackets.
    1 point
×
×
  • Create New...