Jesse Cogswell Posted November 5, 2023 Share Posted November 5, 2023 I'm trying to get the preference selector to detect whether or not the user has Dark Mode enabled. In the VW2024 offline function reference, there is selector 6756, but it also is the same selector for Entered in Group and is returning false to me regardless of what my dark mode settings are, so I'm guessing that it's not correct. Quote Link to comment
MullinRJ Posted November 6, 2023 Share Posted November 6, 2023 7013 - Try it, you'll like it 😉 1 Quote Link to comment
MullinRJ Posted November 6, 2023 Share Posted November 6, 2023 Also, FWIW, Entered in Group which is also listed as 6756 might be 6755 as defined on the next line: varGetEnteredGroupHandle = 6755, // Handle read - Get the Handle of the current opened for edit group in VW document. BUT, is it? I have not used this pref yet, so I can't tell you exactly how it's supposed to work, but it looks like GetPref(6755) returns returns FALSE if you are on a Design or Sheet Layer, and TRUE if you are inside a GROUP, a Symbol, a Polyline Profile, an Extrude, i.e., inside a container object – BUT – if you enter a GROUP that's inside a Symbol Definition, it returns FALSE. Not sure I understand this last part. And here if gets weirder, if you are inside a Group inside another Group inside a Symbol Def, it returns TRUE. It's Alice Through the Looking Glass trying to find Waldo. This is all off the cuff, and doesn't answer anybody's question at the moment, so enjoy the rabbit hole, all ye who enter. Raymond Quote Link to comment
Jesse Cogswell Posted November 6, 2023 Author Share Posted November 6, 2023 Selector 7013 did the trick, and I certainly do like it. Selector 6755 sounds interesting. I usually drop in a Waldo locus and do GetParent to figure out where I am, but I think the inconsistency you've stumbled on is fascinating. Thank you for finding the answer. Just as a curiosity, what documentation did you find the answer in? The SDK? Quote Link to comment
Pat Stanford Posted November 6, 2023 Share Posted November 6, 2023 @MullinRJ's hobby is spelunking for preferences. 😉. He just loves to test every possible combination and see if he can figure out what all the undocumented preference numbers do. 😂 But we love him for it and he has saved many of us over the years. Than you Raymond!!! 2 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.