Community
Hello Dear
These must solve your problem :
(command "3dclip")
(command "dview" "all" "" "clip" "back")
(command "dview" "all" "" "clip" "front")
(command "dview" "all" "" "clip" "off" "")
Thanks man. This is very useful.
But do you know what property changes in the viewport and how to get or set it? I always try to program without "command" in the code...
I suppose you're looking for something within those lines :
(defun c:setupviewclip ( / ct vs vd sz v vx ) (setq ct (getvar (quote viewctr))) (setq vs (getvar (quote viewsize))) (setq vd (getvar (quote viewdir))) (setq sz (getvar (quote screensize))) (if (not (tblsearch "VIEW" "{tmp}")) (setq v (entmakex (list (cons 0 "VIEW") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbViewTableRecord") (cons 2 "{tmp}") (cons 70 0) (cons 40 vs) (list 10 0.0 0.0 0.0) (cons 41 (* vs (apply (function /) sz))) (list 11 0.0 0.0 1.0) (list 12 0.0 0.0 0.0) (cons 42 (getvar (quote lenslength))) (cons 43 0.0) (cons 44 0.0) (cons 50 0.0) (cons 71 (getvar (quote viewmode))) (cons 281 0) (cons 72 0) (cons 73 0) ) ) ) (setq v (tblobjname "VIEW" "{tmp}")) ) (setq vx (tblsearch "VIEW" "{tmp}")) (setq vx (subst (cons 11 vd) (assoc 11 vx) vx)) (setq vx (subst (cons 12 ct) (assoc 12 vx) vx)) (setq vx (subst (cons 40 vs) (assoc 40 vx) vx)) (setq vx (subst (cons 41 (* vs (apply (function /) sz))) (assoc 41 vx) vx)) ;; change here you desire vvv ;; (setq vx (subst (cons 42 (getvar (quote lenslength))) (assoc 42 vx) vx)) (setq vx (subst (cons 43 (getvar (quote frontz))) (assoc 43 vx) vx)) (setq vx (subst (cons 44 (getvar (quote backz))) (assoc 44 vx) vx)) (setq vx (subst (cons 50 (getvar (quote viewtwist))) (assoc 50 vx) vx)) (setq vx (subst (cons 71 (getvar (quote viewmode))) (assoc 71 vx) vx)) ;; end of comment ;; (setview vx) (princ) )
HTH., M.R.