[Request] Sizing and Feedback of the SU Window Size
-
1- I was wondering if there is a way to give the User feedback interactively of the window size (width and heigth in pixels) when resizing the SU Window or, better yet, the actual size of the drawing area.
2- Could their be a simple dialog as well where you could input the width and heigth in pixels (with a lock aspect ratio option) and then have the window automatically resized to match? Preferably for the SU drawing area but, if not, the over application window?
It would be nice to know the size the window before doing exports rather than finding out that info via the export dialog's Options Button.
-
I have a Camera Info Ruby that changes as you adjust things - it uses a little known built-in floating dialog [PC] so it stays open on top of what you are doing...
require 'sketchup.rb' if not file_loaded?(__FILE__) UI.menu("Camera").add_separator UI.menu("Camera").add_item("Camera Info..."){Sketchup.send_action(10624)} end#if file_loaded(__FILE__)
I don't know where the short snippet of code came from - it's uncredited... Any claimants ?
Copy/paste this text into a new file in the Plugins folder called say 'CameraInfo.rb'
The Tool is then available in the Camera Menu...It does at least some of what you want...
-
TIG,
It is a good start. I see you can input a width/height ratio.
Thanks.
-
John, I could use this as well and I'll see if I can make TIG's code work for me. I've got a freeware application that will size the entire window but that doesn't help so much when it is the size of the drawing space that I want to know/set.
Thanks in advance, TIG.
-
I hope you can up with something. It sure would save a lot of fiddling.
John
-
You can also just enter this into the ruby console:
Sketchup.send_action(10624)
and it will open that dialog box.
As for claiming authorship of the code, I've got no idea. But as far as I know, TBD discovered the hidden camera dialog. You might have written the snippet yourself TIG
Chris
-
@chris fullmer said:
You can also just enter this into the ruby console:
Sketchup.send_action(10624)
and it will open that dialog box.
As for claiming authorship of the code, I've got no idea. But as far as I know, TBD discovered the hidden camera dialog. You might have written the snippet yourself TIG
ChrisI make absolutely no claim on ownership of anything - the code I gave is all there is in the Ruby file that I got from somewhere - I don't remember writing the 'Camera Info' menu item... but then again senility is just round the corner perhaps I did...
I can't recall where thatsend_action
came from - you said TBD - I just found it here http://forums.sketchucation.com/viewtopic.php?p=57709#p57709
It's not on the list in the API Guide OR other expanded lists that have been published - in fact that very number is skipped over !!!
Anyway - it works for PC users... sorry Macsters
It'd be good ifSketchup.send_action("cameraWindow:")
or something similar worked !
It'd be good to be able to get the 'text' action for all OSs from the numerical equivalent used on a PC...
Advertisement