Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Component instance name. req help

    3
    0 Szavazatok
    3 Hozzászólások
    266 Megtekintések
    J
    I will add that the Definition name is different than the Instance name, but should work the same. ins = entities.add_instance(cdef, transf) name = ins.definition.name name.gsub!(/#/, '/') ins.definition.name = name
  • Setting material hue-shift or colourize

    3
    0 Szavazatok
    3 Hozzászólások
    289 Megtekintések
    thomthomT
    Ok, so I'm haven't missed any methods that actually do this. One more for the feature requests then.
  • Where to Start with Ruby?

    18
    0 Szavazatok
    18 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    5 Hozzászólások
    406 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    323 Megtekintések
    M
    @chris fullmer said: yes. Headline, today's NY Post: Previous Post Pockets Prestigious Polonius Prize! brevity == wit.soul
  • WebDialog Question

    5
    0 Szavazatok
    5 Hozzászólások
    320 Megtekintések
    M
    @jhoutman said: I found the Webdialog rather obtuse ... Spoken like a diplomat. Some might put that more strongly.
  • REQ - Toolbar Manager

    8
    0 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    2 Hozzászólások
    193 Megtekintések
    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 Szavazatok
    12 Hozzászólások
    4k Megtekintések
    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 Szavazatok
    2 Hozzászólások
    299 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    478 Megtekintések
    P
    CONFIRMED
  • Information in the dictionary = huge filesize

    9
    0 Szavazatok
    9 Hozzászólások
    880 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    438 Megtekintések
    T
    Thank you thomthom, that is exactly what I was looking for.
  • Is This Lazy?

    2
    0 Szavazatok
    2 Hozzászólások
    759 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    308 Megtekintések
    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 Szavazatok
    3 Hozzászólások
    625 Megtekintések
    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 Szavazatok
    2 Hozzászólások
    332 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    589 Megtekintések
    D
    Excellent, thanks for the info!
  • Global Object Stupidity, Ruby Question

    12
    0 Szavazatok
    12 Hozzászólások
    987 Megtekintések
    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 Szavazatok
    29 Hozzászólások
    4k Megtekintések
    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.

Advertisement