Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/2019 in all areas

  1. There are 14 different settings that affect options for the qleader command. For a lisp to work consistently for multiple users you would need to set the options for number of vertices and either text or mtext using the qlset.lsp by Frank Whaley at Autodesk. It's been posted on this forum many times already: https://www.cadtutor.net/forum/search/?q=qlset I'd recommend resetting those settings at the end of the lisp to avoid upsetting another user whose settings aren't exactly the same as yours.
    1 point
  2. I agree with named page setups all the way. Do it right once and it will work forever etc.
    1 point
  3. Having saved named page set-ups is the way to get consistent publish results. Using <Default: None> tells you nothing about what the current page set-up is. You can either have the named page set-ups in your files or they can be easily imported and applied to the drawing list.
    1 point
  4. Thanks for those files. It works on my machine as well. Here is a new version of the code. The angle of the block is now translated to the heading in SV. The code assumes a (static) block containing an arrow pointing east. (vl-load-com) (defun KGA_Math_LimitAngleRange (ang) (rem (+ (rem ang (+ pi pi)) pi pi) (+ pi pi)) ) (defun KGA_Math_Rad_To_Dgr (rad) (* (/ rad pi) 180.0) ) (defun KGA_Sys_Apply (expr varLst / ret) (if (not (vl-catch-all-error-p (setq ret (vl-catch-all-apply expr varLst)))) ret ) ) (defun KGA_Sys_ApplyAlt (expr varLst) (not (vl-catch-all-error-p (vl-catch-all-apply expr varLst))) ) ; 20190626: Revised. ; 20190625 (defun SvUpdate_CallBackModified (obj rea lst / dat) (if (and (vlax-read-enabled-p obj) (setq dat (list (vlax-get obj 'insertionpoint) (vlax-get obj 'rotation) ) ) (not (equal dat (vlr-data rea) 1e-8)) ; Perhaps higher fuzz? ) (progn ; (print "SvUpdate_CallBackModified") (vlr-data-set rea dat) (SvUpdate_ChangeView (car dat) (cadr dat)) ) ) ) ; 20190626: Revised. ; 20190626: Renamed. ; 20190625 ; https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=48.857832,2.295226&heading=-45 (defun SvUpdate_ChangeView (pt ang) (setq pt (utmgeo pt 6378160.0 298.25 18 "N")) (setq ang (KGA_Math_Rad_To_Dgr (KGA_Math_LimitAngleRange (- (* 0.5 pi) ang)))) (princ "\nPlease wait... ") (SvUpdate_Navigate (strcat "https://www.google.com/maps/@?api=1" "&map_action=" "pano" "&viewpoint=" (rtos (cadr pt) 2 8) "," (rtos (car pt) 2 8) "&heading=" (rtos ang 2 0) ) ) ) ; 20190626: Removed some prompts. ; 20190626: Renamed. ; 20190625 ; (SvUpdate_Navigate "https://www.cadtutor.net/forum/forum/15-autolisp-visual-lisp-amp-dcl/") (defun SvUpdate_Navigate (url) (if (or (and *SvUpdate_browser* (KGA_Sys_ApplyAlt 'vlax-get-property (list *SvUpdate_browser* 'visible)) ; Check if object is still available. ) (and (or (setq *SvUpdate_browser* (KGA_Sys_Apply 'vlax-get-or-create-object '("internetexplorer.application"))) (prompt "\nError: Internet Explorer cannot be started ") ) (progn (setvar 'cmdecho 0) (command "_.delay" 2000) (setvar 'cmdecho 1) ) ) ) (progn (vlax-put-property *SvUpdate_browser* 'visible :vlax-true) (vlax-invoke-method *SvUpdate_browser* 'navigate url) ) ) ) ; 20190626: Revised. ; 20190625 ; The selected (static) block should contain an arrow pointing east. (defun c:SvUpdate ( / dat enm obj) (if (and (setq enm (car (entsel))) (setq obj (vlax-ename->vla-object enm)) (or (= "AcDbBlockReference" (vla-get-objectname obj)) (prompt "\nError: this is not a block reference ") ) ) (progn (if *SvUpdate_objectReactor* (vlr-remove *SvUpdate_objectReactor*) ) (setq *SvUpdate_objectReactor* (vlr-object-reactor (list obj) (setq dat ; Reactor data. (list (vlax-get obj 'insertionpoint) (vlax-get obj 'rotation) ) ) '( (:vlr-modified . SvUpdate_CallBackModified) ) ) ) (SvUpdate_ChangeView (car dat) (cadr dat)) ) ) (princ) ) Sample_new.dwg
    1 point
×
×
  • Create New...