;; | ---------------------------------------------------------------------------- ;; | MI_AttachMultURL ;; | ---------------------------------------------------------------------------- ;; | Function : Attaches multiple hyperlinks to an object ;; | Arguments: 'ename' - Entity name ;; | 'URLList - Nested list containing (URL NamedLocation Description) ;; | 'blkName' - Block Name Prefix (sequential numbering will be used) ;; | Returns : T or nil ;; | Updated : January 6, 2009 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_AttachMultURL ( ename URLLst blkName / entl Insp bn cnt elast ss URL NamedLoc Desc More _blkName ) (setq entl (entget ename) Insp (LI_item 10 entl) bn (LI_item 2 entl) cnt 1 elast (MI_xentlast) ) (command "._Explode" ename) (setq ss (MI_after elast)) (command "._Purge" "_Blocks" (strcat blkName "*") "_No") (foreach URL URLLst (setq NamedLoc (nth 1 URL) Desc (nth 2 URL) URL (nth 0 URL) More T ) (while More (setq _blkName (strcat blkName "_" (itoa cnt)) cnt (1+ cnt) ) (if (not (tblsearch "BLOCK" _blkName)) (setq More nil) ) ) (setvar "EXPERT" 4) (setvar "CMDDIA" 0) (command "._Block" _blkName Insp ss "" "._Insert" _blkName Insp 1.0 1.0 0.0 ) (setq ss (entlast)) (command "._-HyperLink" "_Insert" "_Object" ss "" URL NamedLoc Desc) (setvar "EXPERT" 0) (setvar "CMDDIA" 1) ) (setvar "EXPERT" 4) (command "._Block" bn Insp ss "" "._Insert" bn Insp 1.0 1.0 0.0 ) (setvar "EXPERT" 0) (setq ename (entlast)) )