The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Hurricane for AutoCAD
 General Discussion
 Moving between active vports (keyboard Short cuts)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cjnichols
Starting Member

4 Posts

Posted - February 03 2012 :  9:02:59 PM  Show Profile  Visit cjnichols's Homepage  Reply with Quote
I have 4 view ports in each drawing, I would like to zoom extents in each vport.

I have found a keyboard short cut (Ctrl R) to move to the next vport.

How do I place this in a Hurricane script.

Thanks

Chris

Admin
Administrator



651 Posts

Posted - February 03 2012 :  10:20:43 PM  Show Profile  Visit Admin's Homepage  Reply with Quote
Here is a link that may help...
http://www.cadtutor.net/forum/showthread.php?39132-Cycling-Through-Viewports

The lisp there is as follows... haven't tested it, but could get you on the right track... similar issue...
(defun vpactivate ( width  / ss avp)
  ;;; width [real] - viewport width for activate
  ;;; Usage
  ;;; (VPACTIVATE 199)
  ;;; Activate VIEWPORT with width 199
  ;;; Return number (for CVPORT command) VIEWPORT in layout or nil
 (vl-load-com)
 (if (setq SS (ssget "_X" (list '(0 . "VIEWPORT") '(-4 . "/=") '(68 . 1)(cons 410 (getvar "ctab")))))
   (progn
     (foreach vp (vl-remove-if (function listp)
		 (mapcar (function cadr) (ssnamex ss)))
       (if (equal (cdr(assoc 40 ;_Width code. Height code - 41
                             (entget vp)
                             )
                      )
                  width
                  1e-6
                  )
         (progn
           (setq avp (cdr(assoc 68 (entget vp))))
           (command "_MSPACE" "_CVPORT" avp "_PSPACE")
           
           )
           )
       )
     )
   )
  avp
  )

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

andy123
Starting Member

Azores
1 Posts

Posted - July 25 2013 :  07:39:33 AM  Show Profile  Reply with Quote
i would like to appreciate you for sharing such a great info with us


andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.31 seconds. Snitz Forums 2000