Ah, this one took me a while to find too.
The method you are looking for is a method of the Model class called place_component. It attaches a ComponentDefinition to the mouse pointer for placement.
Ah, this one took me a while to find too.
The method you are looking for is a method of the Model class called place_component. It attaches a ComponentDefinition to the mouse pointer for placement.
It's a context menu plugin (right-click on things.) And under the Tools menu...
I found this excellent plugin and thought I'd share it.
I am not the author and have no affiliation with the project. It's just a superb example of code and the possibilities of WebDialogs.
@burkhard said:
I have another question.
Remember the calc.rb can be open from the Plugins menu.
But if I close Sketchup the calculator does not automaticly close with.
Is this fiasible ( viable,contrivable or whatever )?Burkhard
On Windows, you can use AppObserver.onQuit to set up the observer, and WIN32API to find (by name) and close the calc.exe window.
See my Ruby Toolbar plugin for using WIN32API window functions. I learned it from SketchyPhysics creator Chris Phillips.
@agrazdi said:
1 - Is there a ruby that can be added to the BOX.rb and be able to select the initial point < like you do with the wall ruby > ?? instead of the origin or an x,y,z coordenates?
2 - Last one, is there a way to get with a Ruby the size of groups and components ?
Thanks in advance
agraz
Yes, it's possible.
Look into using a PickHelper or a InputPoint object to select the initial point.
It depends on what you mean by "size"? Look up the bounds method for Groups and Components. A BoundingBox is a 3D box aligned to the global axis, and includes all the entities inside the Group.
I see, the methods listed in the File class are actually defined in the ftools.rb file. Also, the docs recommend using FileUtils.rb over ftools.rb.
Thanks. I was toying with the idea of cleaning up .skb and AutoSave files from the the user's model folder.
I'm curious why File.delete is allowed, but File.move and File.copy aren't supported?
CamStudio is open source screen capture, you mean CamtasiaStudio.
Double-clicking with the mouse wheel centers on that location. Maybe your mouse is malfunctioning?
Ok, version 6 file replaced with v5.
Here's one way. There's probably a quick, clever way to do it, but this is just hand stitching. Even so, it doesn't take long.
Methods I used: copy the arc, scale the arc, draw in the lines. Used end-point inference for everything.
Smooth out the lines, and then copy around 90 deg. 3 times.
Just out of curiosity, what level of detail are you going for? Will you be building it from the ground up, stick by stick?
@unknownuser said:
Hi Folks!
I'm going to design and build my dream house using SketchUP.
Finally, i will need to get a list of all components with their quantity, to be able to prepare an estimate. Is there a way to do so?
Thank you for your help!
It comes down to passing Strings from the javascript to the ruby callback by setting the window.location and using the skp: prefix.
// this is javascript
window.location = "skp;somecallback"; // no paramters
window.location = "skp;somecallback@" + someString;
# this is ruby
dialog.add_action_callback("somecallback") do |d, a|
# d is the dialog
# a is the string passed after the @ in the javascript
puts "somecallback called;#{a.inspect}"
end
Just a thought... it's should be possible to make a ruby to always add a centerpoint when drawing a circle.
You need to use camera.set. The vector from the target to the eye is the direction.
m=Sketchup.active_model
view=m.active_view
camera=view.camera
v1 = (camera.target - camera.eye).normalize
v2 = camera.direction.normalize
p v1 == v2
camera.set takes 3 arguments: the eye (Point3d), the target (Point3d) and the up direction (Vector3d).
camera.set(eye, target, up)
It's not an odd question, I think it's just an informal market survey. He didn't ask for any personal information, only how many people use SketchUp and/or the 3D Warehouse. I don't see the harm in it.
The Google SketchUp Groups have some vague stats:
http://groups.google.com/group/SketchUp/about
http://groups.google.com/group/sketchup-Pro-Groups/about
These forums have just passed 2000 registered users with 26,000 posts.
When I stopped counting (a year ago), the 3D Warehouse was getting 100 new models per day.
Go to http://www.alexa.com and look up the SketchUp homepage for number of visitors to the page.
I've always thought the tendency for favoring the blue axis was a little strong.