Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Return value from vla-get-floatingrows seems to be wrong
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Return value from vla-get-floatingrows seems to be wrong (Read 1409 times)
0 Members and 1 Guest are viewing this topic.
mkweaver
Bull Frog
Posts: 352
WWW
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]
(
defun
GetToolbarPositions
(
/
rtlist
)
(
vlax-for
mgp
(
vla-get-menugroups
(
vlax-get-acad-object
)
)
(
vlax-for
tb
(
vla-get-toolbars
mgp
)
(
if
(
=
:vlax-true
(
vla-get-visible
tb
)
)
(
setq
rtlist
(
cons
(
list
(
cons
'Mgroup
(
vla-get-name
mgp
)
)
(
cons
'toolbar
(
vla-get-name
tb
)
)
(
cons
'top
(
vla-get-top
tb
)
)
(
cons
'left
(
vla-get-left
tb
)
)
(
cons
'DockStatus
(
vla-get-DockStatus
tb
)
)
(
cons
'FloatingRows
(
vla-get-FloatingRows
tb
)
)
)
rtlist
)
)
)
)
)
rtlist
)
Is anyone else seeing this behavior or do I have something in my code screwed up?
Thanks,
Mike
Logged
ronjonp
Needs a day job
Posts: 7533
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.
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
framednlv
Newt
Posts: 65
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)
Logged
mkweaver
Bull Frog
Posts: 352
WWW
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
Logged
Marc'Antonio Alessi
Swamp Rat
Posts: 1454
Marco
WWW
Re: Return value from vla-get-floatingrows seems to be wrong
«
Reply #4 on:
October 29, 2020, 05:06:37 PM »
Maybe this
http://www.theswamp.org/index.php?topic=54120.msg588293#msg588293
can help...
Logged
https://sites.google.com/view/alessimarcantonio/home
Coding manual:
https://tinyurl.com/y643cva6
https://www.facebook.com/alessicad
https://www.linkedin.com/in/marc-antonio-alessi-451959118/
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Return value from vla-get-floatingrows seems to be wrong