Roy_043 Posted August 22, 2019 Share Posted August 22, 2019 OK, that can work. Attached is a new version of the code that will also accept leaders. The code assumes that the 2nd point of a leader is the view position, with the 1st point (the arrow) determining the view direction. You will still have to modify the code to suit your geo coordinate system (as discussed via PM). Sample_new.dwg StreetViewUpdate.lsp Quote Link to comment Share on other sites More sharing options...
mstg007 Posted August 22, 2019 Share Posted August 22, 2019 So I am trying something new. Why not try using a line instead of a leader. The code works but I am having a problem with updating the browser within SV. If I reapply the routine to the line, the browser updates. Any idea what might be causing this? (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)) ;; (= "AcDbLeader" (vla-get-objectname obj)) (= "AcDbLine" (vla-get-objectname obj)) ;; (prompt "\nError: this is not a block reference ") ;; (prompt "\nError: this is not a Leader ") (prompt "\nError: this is not a Line ") ) ) (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 'Coordinates) (vlax-get obj 'Endpoint) ;; (vlax-get obj 'rotation) (vlax-get obj 'angle) ) ) '( (:vlr-modified . SvUpdate_CallBackModified) ) ) ) (SvUpdate_ChangeView (car dat) (cadr dat)) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted August 22, 2019 Share Posted August 22, 2019 (edited) You need to also change the SvUpdate_CallBackModified function. Edited August 22, 2019 by Roy_043 Quote Link to comment Share on other sites More sharing options...
mstg007 Posted August 22, 2019 Share Posted August 22, 2019 Works! Thank you for updating the selection to include blocks and leaders! it works really well. Quote Link to comment Share on other sites More sharing options...
Anushka Posted September 9 Author Share Posted September 9 (edited) Google blocks the use of the map in the Microsoft Internet Explorer browser. I'm trying to replace the SvUpdate_Navigate function with open-in-chrome, but so far, I haven't been successful. Can someone lend me a hand with this? Edited September 10 by Anushka Quote Link to comment Share on other sites More sharing options...
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.