Author Topic: Zoom All layouts  (Read 9646 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Zoom All layouts
« Reply #15 on: February 23, 2006, 02:59:39 PM »
It's daylight in Sydney too, yes ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Serge J. Gianolla

  • Guest
Re: Zoom All layouts
« Reply #16 on: February 23, 2006, 03:11:02 PM »
No, no finito in Sydney. Almost a year now that I live in same city as yours!
I am an early riser, but you are crazier than I am, well if that is ever possible. :laugh:

Joe Burke

  • Guest
Re: Zoom All layouts
« Reply #17 on: February 24, 2006, 09:35:59 AM »

added:
If the variables *acad* or *layouts* were used several times throughout the routine they WOULD be worthwhile saves as local variables. .. BUT not just because of their use in a FOR loop.


Kerry,

Well actually Daron is correct setting the *acad* variable.
(vla-zoomextents *acad*)

Compared to this which gets the acad object on each pass of the vlax-for loop.
(vla-zoomextents (vlax-get-acad-object))

While I'm nit-picking... this also indicates a misunderstanding of what's going on
in a vlax-for or foreach loop.

(defun zoom_all_layouts (/ lay *doc*)
  ...
  (vlax-for lay layouts...
 
The lay symbol is local to the vlax-for call. Declaring it local to the program is not needed.

I trust ya'll know it's not my intention to offend anyone. I just think when someone says,
"here's a cleand-up version of your code", it implies a lesson to be learned. If it fails
to do that, someone should say so. Otherwise misconceptions are handed down to others who may
take it as gospel.

Regards

whdjr

  • Guest
Re: Zoom All layouts
« Reply #18 on: February 24, 2006, 11:31:58 AM »
Thanks for the discussion here Joe.  I did learn some things I was not aware of.

Thanks,  :-)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Zoom All layouts
« Reply #19 on: February 24, 2006, 02:35:42 PM »
>>>
Well actually Daron is correct setting the *acad* variable.
(vla-zoomextents *acad*)
>>>.

Yes Joe, you're correct, I overlooked that somehow .  I got tied up with the FOR LOOP thingie I guess ...

>>>  Otherwise misconceptions are handed down to others who may
take it as gospel.

Regards

I agree.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.