Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

UIaccessor: how can I CLEAR the checkbox

UIaccessor: how can I CLEAR the checkbox

inquestudios
Enthusiast Enthusiast
397 Views
2 Replies
Message 1 of 3

UIaccessor: how can I CLEAR the checkbox

inquestudios
Enthusiast
Enthusiast

I actually need to disable "Convert units" option in 3ds file import dialog, so if someone knows easier way, it also counts as solution.

0 Likes
Accepted solutions (1)
398 Views
2 Replies
Replies (2)
Message 2 of 3

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

 

	fn setCheckBoxState hwnd state = 
	(	
		local BN_CLICKED = 0
		local BM_SETCHECK = 241
		local WM_COMMAND = 273
			
		local parent = UIAccessor.getParentWindow hwnd
		local id = UIAccessor.getWindowResourceID hwnd
			
		windows.sendMessage hwnd BM_SETCHECK (if state then 1 else 0) 0
		windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) hwnd	
		ok
	)

 

This may not seem very simple, but this is how to not only set the checkbox state, but also send a message that the state has been changed...

 

Message 3 of 3

inquestudios
Enthusiast
Enthusiast

Thank you a lot, Denis. Who knows what we all did here without your support 😅

0 Likes