You cannot post messages because only members can post, and you are not currently a member.
Description:
Ask questions and share answers about developing Ruby scripts for SketchUp using the Ruby API for SketchUp.
|
|
|
Attention Ruby Developers
|
| |
Did you know that we have a resource for Ruby developers in addition
to these discussions? You can view the SketchUp Ruby API documentation
in its own Google Group at the link below:
[link]
This is a resource for advanced users of Ruby and isn't intended for... more »
|
|
Having problems posting to the Ruby API Discussion?
|
| |
I've you've come to the Ruby API Discussion to help others or to ask
questions but find you're unable to post, while you may be able to
post without a problem to the SketchUp SDK Discussion then you maybe
stumbling over one of our hiccups. We've moved the Ruby API Group over
to the rest of the SketchUp Developer's area so that there were like... more »
|
|
How can I add faces faster using API?
|
| |
Hi All,
I have an array in my code called $drawtest. It is an array which has 30000 points. I wrote a part of code to add faces from that array. It takes 300 seconds to build all the faces. How can I improve it?? Thx!!
“$drawtest.each_value do |ele|
model = Sketchup.active_model
model.start_operation "Create Site"... more »
|
|
Store a Hash in a Attribute Dictonary
|
| |
I try to store an Hash in a attribute dictionary. If I ask him back with "get_attribute" I get an object of type: NilClass Anyone have any idea why this is happening? With Array's it's going well... Maybe its not possible to store a Hash in a attribute dictionary?
|
|
dynamic constant assignment error and file_load issue
|
| |
Hi All, I am facing two issues in the attached pgm. 1. when using def function iam getting the below error but without use 'def' its works fine. dynamic constant assignment Run = 1.5 ^ C:/Users/sheik.abdullah/Deskto p/Sample Pgms/Reducer/weldedreducerfix. rb:97: dynamic constant assignment... more »
|
|
How to view all values from a defined list
|
| |
Hi All, How to view all values of size (mentioned below) because the list box ends with value 48 due to size limit. Is there any way to set scroll bar to select a required value. prompts = ["Pipe Fittings", "Size", "Unit", "Standard", "MOC"] values = ["Reducer","","inch","BS","GRP "] size = [ "1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18|... more »
|
|
How do I determine the lower left corner of a face?
|
| |
I want to place a (generated by Ruby script) window-frame, at the position of a selected 'face' from the SU model. Therefor I must determine what the 'bottom left corner of the face is.(seen from the front) I think this should be based on the 'outer lines, and the front-normal but I just do not know how.... more »
|
|
How to fix the RuntimeError: (eval):
|
| |
Hi, Iam getting the below error and I would like to know how to fix it. Error: #<RuntimeError: (eval):0:in `load': Could not create Face> (eval) (eval):0 Note : I receive my ouput how I expected after loads my code but the error message also gets dispalyed in ruby console. Thanks & Regards, Abdullah... more »
|
|
move object partially
|
| |
I'm trying to transform an existing object moving half of it along an ax. The objective is to enlarge a window without modifying the size of the frame, so scaling is not an option. I managed to select the some vertexes and move then, but the result is weird: the faces seem to be detached from the edges. Any hint?... more »
|
|
code for saying "no do not save file"
|
| |
Hi, I'm trying to write a ruby that will, open a file 001.skp, run a ruby (in the same plugins directory) close file open file 002.skp and so on. So far I can open files, kinda run a ruby, but in closing a file, sketchup asks "do you want to save this file?" How do I answer this in "no" in code or avoid it altogether?... more »
|
|
variable + text?
|
| |
Hi, when I try to open a filename with a variable it doesn't work, For example name = 5 Sketchup.open_file ("bob_00000" + 'name' + ".Skp") If I put the number 5 in there it works? Sketchup.open_file ("bob_00000" + '5' + ".Skp") How come? thanks! s
|
|
Setting the axes origin view so y is up
|
| |
Hello, I'm trying to write a Ruby script to initialize the origin axis with the Y upwards, X towards the right, and Z going towards the screen. The XY plane is normal towards the screen. Do you work with the camera?, view,? or transformation? Some code examples would be much appreciated. Thanks.... more »
|
|
|