Author Topic: Return value from vla-get-floatingrows seems to be wrong  (Read 1317 times)

0 Members and 1 Guest are viewing this topic.

mkweaver

  • Bull Frog
  • Posts: 352
Return value from vla-get-floatingrows seems to be wrong
« on: October 29, 2020, 12:37:48 PM »
I'm building a lisp routine to save and restore toolbar positions.  This is helpful for switching between my office computer with two screens and my remote (home) computer using one screen.

The initial problem I am having is that vla-get-floatingrows seems to always return 1 instead of the number of rows showing in the toolbar.

Code - Auto/Visual Lisp: [Select]
  1. (defun GetToolbarPositions (/ rtlist)
  2.     (vlax-for  tb (vla-get-toolbars mgp)
  3.       (if  (= :vlax-true (vla-get-visible tb))
  4.         (setq
  5.           rtlist (cons
  6.               (list
  7.                 (cons 'Mgroup (vla-get-name mgp))
  8.                 (cons 'toolbar (vla-get-name tb))
  9.                 (cons 'top (vla-get-top tb))
  10.                 (cons 'left (vla-get-left tb))
  11.                 (cons 'DockStatus (vla-get-DockStatus tb))
  12.                 (cons 'FloatingRows (vla-get-FloatingRows tb))
  13.               )
  14.             rtlist
  15.           )
  16.         )
  17.       )
  18.     )
  19.   )
  20.   rtlist
  21. )
  22.  

Is anyone else seeing this behavior or do I have something in my code screwed up?

Thanks,
Mike

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Return value from vla-get-floatingrows seems to be wrong
« Reply #1 on: October 29, 2020, 12:54:32 PM »
Returns all 1's here too.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

framednlv

  • Newt
  • Posts: 64
Re: Return value from vla-get-floatingrows seems to be wrong
« Reply #2 on: October 29, 2020, 01:20:11 PM »
After changing a toolbar, exit cad and reopen...
(FLOATINGROWS . 6)

mkweaver

  • Bull Frog
  • Posts: 352
Re: Return value from vla-get-floatingrows seems to be wrong
« Reply #3 on: October 29, 2020, 03:47:17 PM »
Framednlv, it looks like you hit it.  Just about like the first value read in a session sticks and it won't re-read this property.

Thanks,
Mike