Author Topic: Lisp Function instead of the one in Doslib  (Read 2128 times)

0 Members and 1 Guest are viewing this topic.

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Lisp Function instead of the one in Doslib
« on: July 03, 2011, 07:18:41 AM »
Hello .

I wonder if there is any Lisp function that does the same like the one in DOSlib .

Code: [Select]
(dos_show 0)
(dos_show 1)
(dos_show 2)

Thanks.

Tharwat

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Lisp Function instead of the one in Doslib
« Reply #1 on: July 03, 2011, 07:40:57 AM »
vla-put-windowstate ?

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Lisp Function instead of the one in Doslib
« Reply #2 on: July 03, 2011, 07:50:18 AM »
Perfect . :-)

Thank you Lee .

ribarm

  • Gator
  • Posts: 3278
  • Marko Ribar, architect
Re: Lisp Function instead of the one in Doslib
« Reply #3 on: July 03, 2011, 09:30:07 AM »
I'm sorry, you meant this ?

Code: [Select]
(vl-load-com)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))

(vla-put-windowstate adoc (vlax-make-variant 1))
(vla-put-windowstate adoc (vlax-make-variant 2))
(vla-put-windowstate adoc (vlax-make-variant 3))

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Lisp Function instead of the one in Doslib
« Reply #4 on: July 03, 2011, 09:38:20 AM »
Thank you ribarm .

That's exactly what I meant and whats Lee brought before .  :-)

I did try it without converting to variant and which would work also like the following .

Code: [Select]
(vla-put-windowstate (vla-get-activedocument (vlax-get-acad-object)) Acmax ) or Acmin or acnorm
Thanks

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Lisp Function instead of the one in Doslib
« Reply #5 on: July 03, 2011, 09:49:54 AM »
Depending upon which window you wish to maximise/minimise, either of these will work:

Code: [Select]
(setq app (vlax-get-acad-object)
      doc (vla-get-activedocument app)
)
(vla-put-windowstate doc acmin)
(vla-put-windowstate doc acmax)
(vla-put-windowstate doc acnorm)

(vla-put-windowstate app acmin)
(vla-put-windowstate app acmax)
(vla-put-windowstate app acnorm)

ribarm

  • Gator
  • Posts: 3278
  • Marko Ribar, architect
Re: Lisp Function instead of the one in Doslib
« Reply #6 on: July 03, 2011, 09:52:45 AM »
Thanks for explanation Tharwat,

that variables Acmax, Acmin, Acnorm actually have values 3, 2, 1... But only after (vl-load-com)

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Lisp Function instead of the one in Doslib
« Reply #7 on: July 03, 2011, 09:57:01 AM »
Your way of doing it is not mentioned in the Acad Help , so where did you get the inspiration form to convert to variant ?  :-)

It works when converting to variant also . ;-)

Thanks