pyou Posted November 3 Share Posted November 3 (edited) Hi Strange request here. When i look at specific object in perspective view, would it be possible to switch to plan view, but centred on object of interest at the same distance as viewed in perspective view? Currently i just type in ''plan'' , but it gives overall view with all detail in drawing. I am not sure if there is a settings/command in autocad or i would need a lisp command to do this. Any ideas, please? Edited November 4 by pyou Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 3 Share Posted November 3 Not sure exactly as I don't play with views except in layouts as plan production, but it sounds like what you want as a sequence. Plan Zoom Center pt scale The scale will be a number you may find that one number gives a reasonable zoomed in view. The pt will be a point selected in your isometric view. (setq pt (getpoint "\nPick a point ")) you could make a little defun that gets you the point, so run that 1st. (defun c:pt ( / ) (setq pt (getpoint "\nPick point ")) ) So the sequence becomes. Dbl click isometric view pt dbl click plan view plan z c pt 1000 Quote Link to comment Share on other sites More sharing options...
lastknownuser Posted November 4 Share Posted November 4 Check out this Quote Link to comment Share on other sites More sharing options...
pyou Posted November 4 Author Share Posted November 4 (edited) Something like this, but it's not working perfect, Any suggestions how to improve? Seems not to work properly with 3dpolylines, lines and polylines. Is there a way to click on polyline and that point to become a centre of object or something similar alternative? On other objects it seems to work as i want. Thank you Lisp: (defun c:ZoomToPlanView (/ obj obj_center) ;; Prompt the user to select an object (setq obj (car (entsel "\nSelect an object to view in plan view: "))) ;; Check if the user selected an object (if obj (progn ;; Get the object's center point (setq obj_center (cdr (assoc 10 (entget obj)))) ;; Switch to plan view (command "_.plan" "") ;; Zoom into the object (command "_.zoom" "_c" obj_center 1.0) (princ "\nObject displayed in plan view and zoomed.") ) (princ "\nNo object selected.") ) (princ) ) Edited November 4 by pyou Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 4 Share Posted November 4 When using zoom c, I never found it to use 1.0, I think you need to do manually and see what Zoom C returns in your zoomed in/out view I doubt it will be 1.0. Current dwg zoom C = 55.797 not 1.0 value changes, zoom e, Zoom c = 163.78 Quote Link to comment Share on other sites More sharing options...
pyou Posted November 6 Author Share Posted November 6 still not found solution for 3dpolylines,lines and polylines. any help,please? Quote Link to comment Share on other sites More sharing options...
Tsuky Posted November 7 Share Posted November 7 And if you use the command DVIEW? ((lambda ( / e_sel e pt_sel) (princ "\nSelect an object.") (cond ((setq e_sel (entsel)) (setq e (car e_sel) pt_sel (osnap (cadr e_sel) "_near")) (command "_.dview" e "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) ) (T (princ "\nNothing selected.")) ) (prin1) )) 1 Quote Link to comment Share on other sites More sharing options...
pyou Posted Friday at 07:40 PM Author Share Posted Friday at 07:40 PM (edited) On 07/11/2024 at 00:50, Tsuky said: And if you use the command DVIEW? ((lambda ( / e_sel e pt_sel) (princ "\nSelect an object.") (cond ((setq e_sel (entsel)) (setq e (car e_sel) pt_sel (osnap (cadr e_sel) "_near")) (command "_.dview" e "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) ) (T (princ "\nNothing selected.")) ) (prin1) )) Thank you Tsuky! it seems sometimes when i click on MText or Text its just isolate selected text and getting error ''object snap not allowed here. Requires direction and magnitude angles separated by a comma. ; error: Function cancelled. Would it be possible to incorporate _pnod to pick a pointcloud point and have same principal what dview does? Edited Friday at 08:03 PM by pyou Quote Link to comment Share on other sites More sharing options...
Tsuky Posted Sunday at 04:45 PM Share Posted Sunday at 04:45 PM On 11/8/2024 at 8:40 PM, pyou said: Thank you Tsuky! it seems sometimes when i click on MText or Text its just isolate selected text and getting error ''object snap not allowed here. Requires direction and magnitude angles separated by a comma. ; error: Function cancelled. Would it be possible to incorporate _pnod to pick a pointcloud point and have same principal what dview does? You say before: Quote still not found solution for 3dpolylines,lines and polylines. any help,please? I have specified the code for this task. But you can add for exemple at line 5: ((lambda ( / e_sel e pt_sel) (princ "\nSelect an object.") (cond ((setq e_sel (entsel)) (setq e (car e_sel) pt_sel (osnap (cadr e_sel) "_near,_ins,_nod")) (command "_.dview" e "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) (sssetfirst nil (ssadd (car e_sel))) ) (T (princ "\nNothing selected.")) ) (prin1) )) For pnod I can't incorporate this, but without control of the return of "pnod" you can try this ((lambda ( / pt_sel) (command "_.ID" "_pnod" pause) (setq pt_sel (getvar "LASTPOINT")) (command "_.dview" "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) (prin1) )) 1 Quote Link to comment Share on other sites More sharing options...
pyou Posted Sunday at 10:25 PM Author Share Posted Sunday at 10:25 PM 5 hours ago, Tsuky said: You say before: I have specified the code for this task. But you can add for exemple at line 5: ((lambda ( / e_sel e pt_sel) (princ "\nSelect an object.") (cond ((setq e_sel (entsel)) (setq e (car e_sel) pt_sel (osnap (cadr e_sel) "_near,_ins,_nod")) (command "_.dview" e "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) (sssetfirst nil (ssadd (car e_sel))) ) (T (princ "\nNothing selected.")) ) (prin1) )) For pnod I can't incorporate this, but without control of the return of "pnod" you can try this ((lambda ( / pt_sel) (command "_.ID" "_pnod" pause) (setq pt_sel (getvar "LASTPOINT")) (command "_.dview" "" "_points" "_none" (list (car pt_sel) (cadr pt_sel) 0.0) "_none" (list (car pt_sel) (cadr pt_sel) 1.0) "" ) (prin1) )) Thank you Tsuky, Works excellent. 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.