Heard of regular expressions before, This time I tried to understand it. Thanks.
Latest posts made by shirazbj
-
RE: Ruby "split" in file line reading
-
RE: Enums's index of an inputbox return
all good now.
I'll download the ruby book.
Thanks dan.
-
Ruby "split" in file line reading
hi,
I used to use:
b = file.gets()
c=b.split(" ")
to read lines from a data file in text.but the following lines doesn't have a " " between two data if the value is negative.
0.208646094863E+000-0.513313617099E-001-0.915625940530E-003 0.180604789668E+000-0.240882759294E-001-0.872767876563E-003
How do I split them now?
Thanks in advance
Cean
-
Enums's index of an inputbox return
hi,
I was wondering if I could get the index of an enums selection directly.
In my example below, I want to choose between "2D" & "3D" for one variable. The return is either "2D" or "3D". But I want the index number instead, that is "0" for "2D", "1" for "3D".
How could I get the "0" or "1" if I don't compare the return with the list of the enums.
Thanks in advance
Cean
def hw_inputbox iaxi=1 t_iaxi = ["2D","3D"] enums = [t_iaxi.join("|")] values = [t_iaxi[iaxi]] prompts = ["Geo type; "] results = inputbox prompts, values, enums, "my Geo" return nil if not results $iaxi = results[0] your_slection=$iaxi UI.messagebox(your_slection) end UI.menu("Plugins").add_item("hw_inputbox") { hw_inputbox }
-
RE: Color in add_line?
Found this:
Edge color by material
http://forums.sketchucation.com/viewtopic.php?f=180&t=35443#p312624thx
-
Color in add_line?
Hi,
How do I add an color line?
I use face.material="red" to change face color, but line.material doesn't work.
Thanks in advance
Cean
-
RE: UI.openpanel - wildcard bug
I tried "a.jpg".
Why ".jpg" is not listed in the "files of type"?
-
A Transformation demo
hi,
I want to generate component in anywhere with any angle upon my need.
I come up with this code. Now the angle is only about Z axis.
Any advice is welcomed.
Thanks for Matin's wonderful tutorial http://www.martinrinehart.com/models/tutorial
-
RE: Compute Rotation and Scale from Transform Object
@martinrinehart said:
@dburdick said:
I read your wonderful web-page description of the 4 x 4 matrix - ...
I am reading it too. Great job.Thanks.
-
RE: An U bolt
I read your PipeAlongPath code. I'm not using pre-selected path, instead generating by add_line+add_circle+add_line for U.
add_circle return an array of edge, I need to include them into the path array.
it works now (attached).
Thanks