Urasik Extensions | Lots of new extensions to check out Learn More

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Where to Start with Ruby?

    18
    0 Votes
    18 Posts
    2k Views
    G
    Read Chris Pines Tutorial and put this cheat sheet together for myself. ==== Ruby for VB Programmers ==== --- Variables --- All variables are variant objects. Variables do not have to be declared before use. Variables are not formally declared. (No Dim statement). As variants they may be re-assigned any data type at any time. Variables that are assigned strings or numbers have methods. (As in VB.NET). Variables that are spelled the same but with different letter case ARE BY DEFINITION different variables. Variables must be assigned names beginning with a lower case letter Ruby --- VB Nil ---- Nothing --- Conversion methods --- to_i = String to integer to_f = String to float to_s = Integer or float to string, Concantinates elements when used with string arrays. --- Strings Manipulation --- Literal Strings are denoted by single quote ( ' ) Backslash is an escape character: ' results in single quote. (\=) Double quoted text is a more flexible form of string defintion. (Inserting and formating) Ruby --- VB ------ & ------------------------ Concantination ------ Str(<string>, <count>) --- Repeat Char/String ------ ' ------------------------ Comments --- Operators and Comparison Operators --- Ruby --- VB ** ----- ^ ----- Exponent % ------ Mod ----- Modulus == ----- = ------ (Comparison) Equivalent != ----- <> ----- (Comparison) Not Equivalent --- Bracket Characters --- denote an array. Curly Brackets { } denote a hash Parenthisis ( ) used in a formula or logical statement work as they should but are optional for methods --- Hashes / Dictionary --- Define as you would an array but with curly brackets and a key. myList = {}; myList{'Bob Mitchell'} = '54823-11'; myList{'Phil Brown'} = '23872-08'; #Etc... --- Arrays --- Arrays are denoted by square brackets rather than parenthisis Arrays are zero based. Arrays elements do not have to be all the same type. Arrays as objects also have methods. (Push, Pop,Last, Length, Sort, Etc...) --- Loops --- Arrays have an interator method: While Loop myArray.Each do | <variable> | ... End While <Statement True> puts <variable> puts <variable> end --- User Methods --- Last variable or Return <variable> Returns value Ruby ----- VB Def( ) --- Sub( ) or Function( ) --- Classes --- Any class may be extended including Ruby's supplied classes. The new method (Implied) is required for object instantiation. An Initialize method may be declared inside a class. The Initialize method can take user parameters. these parameters are required after the <Class>.new method. Properties are defined by the use of the @prefix on variable names. local variables are private to class Private is a Class keyword in Ruby that defines all methods below it as internal to the class. Ruby --- VB Time --- Date
  • How to save settings? Req. help, rubyscript.

    5
    0 Votes
    5 Posts
    383 Views
    TIGT
    @newone said: "...of a .INI file or registry (within the Software > @Last Software > SketchUp section)." This is what I read in documentation. I don't understand really where that .INI file has to be. Or can I set a path? You don't need to worry about 'where it is'... just write the details as set out in the guide and it's saved/read from the right place in the PC's Registry (or a Mac's ini)...
  • Frameset for WebDialog

    5
    0 Votes
    5 Posts
    299 Views
    M
    @chris fullmer said: yes. Headline, today's NY Post: Previous Post Pockets Prestigious Polonius Prize! brevity == wit.soul
  • WebDialog Question

    5
    0 Votes
    5 Posts
    295 Views
    M
    @jhoutman said: I found the Webdialog rather obtuse ... Spoken like a diplomat. Some might put that more strongly.
  • REQ - Toolbar Manager

    8
    0 Votes
    8 Posts
    1k Views
    P
    I saw some website http://www.sketchupbbs.com/forumdisplay.php?fid=327 Develop plugin "New SU tool 2010" [flash=450,370:2zfgo97c]http://www.youtube.com/v/_HAiAtvVTRw&color1=0x234900&color2=0xd4d4d4&feature=player_embedded&fs=1[/flash:2zfgo97c]
  • Growing/Shrinking Text and Checkboxes in MSIE WebDialogs

    2
    0 Votes
    2 Posts
    182 Views
    thomthomT
    IE doesn't play nice with pixel values. It refuses to scale the text then. It only scales relative units. The default font size of pretty much all browsers are 16px. So it's common to set the font-size of html to 62.5% - so that the base font size is 10px. Then you can use em values easier: 1.2em becomes 12px.
  • Soap Skin &amp; Bubble sketchup 7 keeps crashing - using Mac

    12
    0 Votes
    12 Posts
    4k Views
    jeff hammondJ
    @burkhard said: For the Mac you'll find out that some troubles with Plugins depends on what path you choose. If HD/...is not working, I always try out the users/...path which contains also a Sketchup folder. i used to say this a lot around here but i haven't been posting in a while but.... sketchup actually does not have a plugin folder in the users/ path.. i challenge anyone to do a clean install of sketchup and find that folder. installing podium puts the folder there and that's when things start getting screwy.
  • Plugin template

    2
    0 Votes
    2 Posts
    276 Views
    Chris FullmerC
    I also have a simple template I use for my plugins. It is a little more tailored to my suite of plugins, but I have been meaning to put together a generic one like this. I think it looks great Alex. I have a few little things that I have been playing with that I'll try to get posted into this thread later today maybe. Chris
  • Animation export vs animation in SU

    4
    0 Votes
    4 Posts
    467 Views
    P
    CONFIRMED
  • Information in the dictionary = huge filesize

    9
    0 Votes
    9 Posts
    835 Views
    P
    i don't think there is a bug since i can easily read the data from the dictionary. I don't have a example at hand (since they are all way to big) But this is what is added to each entity : e.set_attribute 'libraryname', 'suid', variable (number) e.set_attribute 'libraryname', 'mat_or', name of the original material (text) when a face; e.set_attribute 'libraryname', 'matback_or', name of the original material (text) e.set_attribute 'libraryname', 'typestatus', name of a material (text)
  • Determine zoom level through API

    5
    0 Votes
    5 Posts
    403 Views
    T
    Thank you thomthom, that is exactly what I was looking for.
  • Is This Lazy?

    2
    0 Votes
    2 Posts
    742 Views
    A
    There will most likely be some performance hit, but it's not likely to be significant. My personal opinion is that if it is reasonable to code the appropriate "if" conditions (like version number), you are better off doing that. For a simple issue like this, probably irrelevant; for more complex code, you'll want to be more careful.
  • WebDialog question

    6
    0 Votes
    6 Posts
    289 Views
    M
    You might want to think about using JSON. It's a bit more general, can be really light weight and if you know JavaScript you already know JSON. Example: JSON array: comma-separated list of items enclosed in square brackets. Sample: ['string one', 'string two'] It's a wee bit of extra work, but if you ever want to share data elsewhere ...
  • Dynamic Component Copies and Transformation

    3
    0 Votes
    3 Posts
    590 Views
    M
    Jon, I don't know much about Ruby, or components. I do know that the "generate report" function of pro version is a ruby script by google, and that it (for the most part) can read this problem. That being said, since this is the weekend and I only have my free version here, take my dynamic flange model (posted in the dynamic components section of these forums), which has multiple, multiple embeded copies as a test model. Run the "generate report" function on that model - I believe it will tell you what the X,Y,Z of each component is - and it will give you the same information as you've been getting. Not much help. So, that's what the attribute dictionary is getting. By searching, however, you can pull out information about the copies function (i.e. copy number). You can also find the formula for X,Y,Z by finding _X_Position_Formula (or something similar). Using the direct formula, you could in theory look for the word "copy" in the Position formula, and find out what X SHOULD BE by doing the math yourself. Not pretty, but that's the only thing I can think of until I play around with my pro version at work.
  • Draw2d

    2
    0 Votes
    2 Posts
    316 Views
    A
    Found it. pushing the middle mouse button invokes the orbit tool. But it also suspends and resumes the currently active tool. By handling the resume method and calling view.invalidate, I can force it to redraw the screen every time the orbit tool finishes and returns to the drawing tool.
  • [question] texture coordinates and projected textures

    6
    0 Votes
    6 Posts
    564 Views
    D
    Excellent, thanks for the info!
  • Global Object Stupidity, Ruby Question

    12
    0 Votes
    12 Posts
    928 Views
    N
    I think this can help to understand modules. Since a few hours ago, I did not had any idea about what modules are. This gave me a clue. I hope others will find it enlighting too. http://www.rubyfleebie.com/an-introduction-to-modules-part-1/
  • Tool Bars Question

    29
    0 Votes
    29 Posts
    3k Views
    EarthMoverE
    I'm with you guys. It's gotten to the point that after the last time I restarted sketchup to find all my toolbars had turned themselves on and cascaded down the screen to the point that no drawing space was even visible, I decided enough was enough and just undocked all my toolbars. I'm losing significant real estate, but it's worth avoiding the frustration. It would be interesting to see if someone could implement a toolbar manager, as I requested here http://forums.sketchucation.com/viewtopic.php?f=180&t=22274 for this type of workflow, as it may solve some headaches for thousands of users.
  • New Profile builder with power tools

    4
    0 Votes
    4 Posts
    1k Views
    Bob JamesB
    No way could I figure out how to download this: I clicked on just about everything.
  • Inputbox dropdown is not scrollable

    3
    0 Votes
    3 Posts
    308 Views
    P
    @tig said: Alternatively use a webdialog - but that's another story... Owkee, thx. That's the path i'll take

Advertisement