Just wondering if any one has a routine to re-size viewports in multiple layouta??
We have to re-size viewports as they were created a little too small and are now spread across almost 1000 drawings in 18 dwg.
Thanks,
B
@Anonymous wrote:
Just wondering if any one has a routine to re-size viewports in multiple layouta??
We have to re-size viewports as they were created a little too small and are now spread across almost 1000 drawings in 18 dwg.
Thanks,
B
Too smaill in terms of viewport scale? or the size of the viewport (L&W)?
@Anonymous wrote:
Sorry for the late reply. It's the Length & Widht i'd like ot be able ot modify. Thanks, B
This demo would re-size the viewprot on all layout tabs by mulitplying the current viewprot size by a factor supplied by the user and keepingthe viewport scale intact
(Defun c:Demo1 ( / factor vps)
(initget 1)
(setq factor (getreal "\nEnter re-size factor: "))
(setq vps (ssget "_X" '((0 . "Viewport") (-4 . "/=") (69 . 1))))
(repeat (sslength vps)
(setq e (vlax-ename->vla-object (ssname vps 0)))
(setq cscale (vla-get-CustomScale e))
(vlax-invoke e 'ScaleEntity (vlax-get e 'Center) factor)
(vla-put-CustomScale e cscale)
(ssdel (ssname vps 0) vps)
)
(princ)
)
This on the other hand will scale even the viewport scale by a factor supplied by the user
(Defun c:Demo2 ( / factor vps)
(initget 1)
(setq factor (getreal "\nEnter re-size factor: "))
(setq vps (ssget "_X" '((0 . "Viewport") (-4 . "/=") (69 . 1))))
(repeat (sslength vps)
(setq e (vlax-ename->vla-object (ssname vps 0)))
(vlax-invoke e 'ScaleEntity (vlax-get e 'Center) factor)
(ssdel (ssname vps 0) vps)
)
(princ)
)
Now if you have a specific length and with in mind , you may want to supply "what is" and "what will" or just go ahead and assigned them regardless of what was.
HTH
Exceelent work!!
Is it possible to change the horizontal size and vertical size?
even seperate routines would be good.
Regards,
B
@Anonymous wrote:Exceelent work!!
Is it possible to change the horizontal size and vertical size?
even seperate routines would be good.
Regards,
B
Is that Horizontal and/or Vertical? it can be done with one routine.
Notice the snippets i posted us a factor as multiplier, is that what you want? or a pre-determined Lenght and Width?
(WWAWW: what was and what will)
What about the viewport scale?
Hi there,
At the moment it's just a vertical re-sizing i need but if it isn't too much trouble to produce somethign that could re-size horizontal too i'd rally appreicate the help.
I'd like to keep the scale the same for all viewports, they were created to dispaly an output from 3rd party software, the guys producing the outputs had to exceed the limits they were gien in model space and now i'd like ot make the viewports taller but keep the current scale.
Regards,
B
Can't find what you're looking for? Ask the community or share your knowledge.