fuqua Posted July 5, 2011 Share Posted July 5, 2011 the tool only runs fine 1 time and then it gets broken, seems like it can use it only 1 time per layout ? can someone help me figure out whats wrong with it ? what i have so far.: ;;; vpcl-create-viewport-from-a-polyline ;;; version 0.2 ;;; (defun c:vpcl (/ clgr vpla ; polyline viewport-orriginal ) (princ "\n**select-polyline\n") (command "_mspace") ;to be sure (setq clgr (car (entsel "Select polyline to convert.") ) ) (princ "\n**chspace\n") (command "_chspace" clgr "" ) (princ "\n**pspace\n") (command "_pspace") (princ "\n**vports\n") (command "-vports" "o" clgr ) (princ "\n**select-vp\n") (setq vpla (car (entsel "Select main viewport to sync with.") ) ) (princ "\n**vpsync"\n) (command "_vpsync" );vpla clgr "\n" ) (princ "\n**ready\n") ) Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted July 5, 2011 Share Posted July 5, 2011 Don't need for lisp... Command: _-vportsSpecify corner of viewport or [ON/OFF/Fit/Shadeplot/Lock/Object/Polygonal/Restore/LAyer/2/3/4] : o Select object to clip viewport: Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 5, 2011 Share Posted July 5, 2011 You can also do it with the MView command. eg. Command: mv MVIEW Specify corner of viewport or [ON/OFF/Fit/Shadeplot/Lock/Object/Polygonal/Restore/LAyer/2/3/4] <Fit>: o Select object to clip viewport: Regenerating model. Command: Specify opposite corner: Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 6, 2011 Share Posted July 6, 2011 Also have titleblock in layout have a large model view approx title block you can use chspace to drag your polyline to paperspace then MV ob pick pline erase outside model view not needed anymore. Sorry read Alans again but with chspace added Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 6, 2011 Author Share Posted July 6, 2011 thanks for the tips guys, gonna try to make a few changes. stay tuned Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 6, 2011 Author Share Posted July 6, 2011 btw i dont want any clipping done, the idea with the viewport inside a viewport is to have everything grayed out inside the big viewport and the newly created viewport colors should stay intact. like highlighting a certain area which u want to focus on without losing oversight of the rest of the drawing. Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 ;;; vpcl-viewport-van-clustergrens ;;; versie 0.2 ;;; (defun c:vpcl (/ clgr; ) (command "_mspace") ;voor de zekerheid (setq clgr (entsel "Select clustergrens om te converteren.") ) (command "_chspace" (car clgr) "" ) (command "_pspace") (command "-vports" "o" clgr ) ;assume last created object is our viewport (princ "") ;Here is the place to implement a "VPSYNC"-like routine ;followed by vp-plotstyle overrides voor de `master'viewport ) here is a update on the tool we making, only trouble appear we cant use vpsync inside the lisp any help on that ? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2011 Share Posted July 26, 2011 This may help you with it buddy . (defun c:vpcl (/ ss ent) ;; Tharwat 26. 07. 2011 (cond ((not (eq (vla-get-Activespace (vla-get-activedocument (vlax-get-acad-object)) ) acPaperSpace ) ) (princ "\n ** Command not allowed in Model Tab ** ") ) ((not (and (setq ss (ssget "_+.:L:S" '((0 . "LWPOLYLINE")))) (vlax-curve-isclosed (setq ent (ssname ss 0))) ) ) ) ((command "_.mview" "_object" ent)) ) (princ) ) Tharwat Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 This may help you with it buddy . (defun c:vpcl (/ ss ent) ;; Tharwat 26. 07. 2011 (cond ((not (eq (vla-get-Activespace (vla-get-activedocument (vlax-get-acad-object)) ) acPaperSpace ) ) (princ "\n ** Command not allowed in Model Tab ** ") ) ((not (and (setq ss (ssget "_+.:L:S" '((0 . "LWPOLYLINE")))) (vlax-curve-isclosed (setq ent (ssname ss 0))) ) ) ) ((command "_.mview" "_object" ent)) ) (princ) ) Tharwat thanks mate ! but does this also sync the 2 viewports ? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2011 Share Posted July 26, 2011 If you talking about the command vpsync I say no , it just convert a lwpolyline to a viewport . Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 If you talking about the command vpsync I say no , it just convert a lwpolyline to a viewport . ok thank you, that atleast helps us solve part of the puzzle do you have any idea how we can get the vpsync working ? we figured out vpsync is a .lsp but we cant figure out which part does the syncing. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2011 Share Posted July 26, 2011 You're welcome . Why the vpsync is not working for you ? Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 You're welcome . Why the vpsync is not working for you ? vpsync is a lisp tool itself, and it appears u cant make a call for another .lsp from within a .lsp Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 26, 2011 Share Posted July 26, 2011 Since VPSYNC is an Express Tools LISP, call the function with: (c:vpsync) Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 Since VPSYNC is an Express Tools LISP, call the function with: (c:vpsync) cool thanx mate, gonna try it. Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 If you talking about the command vpsync I say no , it just convert a lwpolyline to a viewport . oke mate, with the help of lee mac we got the vpsync command going. it does appear we have a still a small problem (i hope) with the chspace command if there is already more then 1 viewport. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2011 Share Posted July 26, 2011 oke mate, with the help of lee mac we got the vpsync command going. it does appear we have a still a small problem (i hope) with the chspace command if there is already more then 1 viewport. Where is the question ? Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 Where is the question ? uhm lulz any idea's bout that ? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 26, 2011 Share Posted July 26, 2011 uhm lulz any idea's bout that ? What was that ? Quote Link to comment Share on other sites More sharing options...
fuqua Posted July 26, 2011 Author Share Posted July 26, 2011 What was that ? you really gonna make me form a decent question ? 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.