šŸ¢ PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Existing Toolbar Buttons on a New Toolbar

    4
    0 Votes
    4 Posts
    317 Views
    P
    Ah yes, that's perfect, thank you ever so much.
  • Vray Problem

    6
    0 Votes
    6 Posts
    1k Views
    S
    @thomthom said: The image from SU7, is a newer V-Ray for Sketchup version. V-Ray materials are automatically linked now. Find the corresponding material in the V-Ray material list. What does it mean ? Can you explain more than this ? Please tell me with picture. Because my english not good Thank you.
  • All entities in the model?

    13
    0 Votes
    13 Posts
    506 Views
    A
    @jim said: Thomas, what if a definition exists in the DefinitionList but does not have an instance in the model? Do you still want its entities? I guess it depends of what the use of the collection is. Use ComponentDefinition#instances: Sketchup.active_model.definitions.each do |d| if inss = d.instances # line is correct! inss.each do |ins| # ... end end end azuby
  • [ruby request] anti-coma

    3
    0 Votes
    3 Posts
    280 Views
    A
    I'm very very mad on google. They did nothing to improve SketchUp ir version 7. Useless dynamic components and nothing for well knovn bugs!
  • Is it possible to generate Roby to run like autocad Osnap

    3
    0 Votes
    3 Posts
    283 Views
    A
    Todd :D:D:D:D
  • New Policy for Posting Scripts

    4
    0 Votes
    4 Posts
    273 Views
    GaieusG
    Some sort of solution can be found for sure. I have translated two scripts so far (into Hungarian) but it was dealt with in PM's. On top of all one being commercial so I couldn't even have posted it in public )although it was simple hztml for the webdialog which is not secret).
  • Golden Mean Gauge

    8
    0 Votes
    8 Posts
    2k Views
    R
    GoldenGauge is now available for free at Smustard.com
  • About Modules

    13
    0 Votes
    13 Posts
    599 Views
    D
    Dear thomthom, all, @thomthom said: It was just that what deerwood said sounded to me that, modules where to be used for a few methods, but classes if you had many. Maybejust me that read it odd. I've seen often in scripts that classes has been used as purely encapsulation and never used as objects. sorry for my late answer, I just had prepared a continuation of my earlier post ... and lost it completely in an editor (notepad++) crash ! Yes, you are right: if one invents a class with only class methods, it makes no real sense at all to instantiate that class, because the instantiated object(s) don't carry any state. The Java Math class is an example. It has a full load of useful class methods, e.g. Math::sin(), Math::cos() etc, all getting in the values to work on by providing them as parameters. But it has no state at all (and no instance methods). In Ruby one would normally use a module for that (independent of the number of modul/class methods, compare the Ruby Math module). But then, it doesn't harm to use a class. Just do not instantiate any objects from it and use it the same way you would use a module, just to have your own namespace. Class/module methods do their work by accessing some commonly available information (e.g. Sketchup.active_model.selection) or some parameters or a combination of both. Though there is more to tell about Ruby modules (later). But the Ruby way of dealing with things is different. In Ruby almost everything is an object. Even simple things like integers are full blown objects. Try this in the Ruby console: 65 >> 65 65.next >> 66 65.chr >> A 65.next.next.chr >> C You just invoked two easy to use methods on a simple integer number object. What is an object, then? Something having a state (a value or some values, individual to each object) and a behaviour (common to all objects of that type). Every integer object in Ruby has it's own state (that integer value) and a common behaviour (next always gives you a new integer object with it's value incremented by one). And chr spits out a 1 character long string object with the ASCII representation of the value. Note, that both methods take no parameter at all ... they use the internal state of the integer object at hand. It would be very inconvenient to have to define the common behaviour of something in all and every object of that sort. Thus OO languages (including Ruby) have classes to define the common code/behaviour for all things of that sort. If the class is in place, you can later instantiate as many objects of them as you need. Every instance/object will have it's own state (using up memory) but share the same behaviour (not using up memory). So, for now (remeber my loss of ready made explanations): if your plugin does not carry around some state (or you save them somehow externally in attributes) you might be fine with just using module/class methods. Still to be continued ... best regards, deerwood
  • .erase! bug ? or is it me...

    4
    0 Votes
    4 Posts
    512 Views
    Didier BurD
    Thanks Whaat, it seems to works here too, even with a single element array. Fingers crossed !
  • Copy along path ruby strange behavior

    8
    0 Votes
    8 Posts
    980 Views
    F
    Thanks for looking into this. I think my basic problem is basically just a lack of geometry tools in SU. I'm sure SU8 won't have this problem
  • Axis align by object

    12
    0 Votes
    12 Posts
    2k Views
    thomthomT
    @jim said: There is no API method to access the Axes in SketchUp. In other words, we can't change the Axes from Ruby. What about moving and rotating the entities inside a group/component and at the same time moving and rotating the group/component to counter, effectivly changing the axis?
  • An Eclipse plug-in for SketchUp scripts

    4
    0 Votes
    4 Posts
    1k Views
    schorradtS
    Here is a complete Eclipse prepared for Ruby http://www.easyeclipse.org/site/distributions/ruby-rails.html i believe, this is what you want!
  • Transform a Face?

    8
    0 Votes
    8 Posts
    677 Views
    Chris FullmerC
    @unknownuser said: Hey!! You said @unknownuser said: But I want to apply it to the selection, not the entire model. so I answered how to do it from the current selection. Kids these days... sheez. I think I wasn't clear in my post. @unknownuser said: Immediately preceeding the .transform_entities needs to be sketchup.model_active and not model.selection I was correcting my own poor logic, not anything you wrote. Your code worked perfectly and was tailored to what I asked for. Thanks for your help, and the help of everyone else on here! I'm serisouly not used to coming on to the SketchUp forum and asking for help with stuff that I know is beginner stuff. SketchUp I understand. Ruby is sort of kicking my tail, but I'm optimistic. So I'm desperately trying to balance asking for help and not wearing out my welcome So a big thanks again to everyone who helps us wannabe Ruby programmers. Chris
  • View only stuff in front of section plane...

    4
    0 Votes
    4 Posts
    341 Views
    T
    Well DUH! (Is it obvious I haven't worked with section planes much? :`) Guess I should have posted this in the Newbie Forum...can you move it Gai? Oh yeah: thank you for the quick response, I'll use this on a new rendering idea before the day's out!
  • Guy charging U$100 for package containing free rubies!!

    53
    0 Votes
    53 Posts
    6k Views
    H
    @unknownuser said: One of the great strengths of the SCF is its open nature. .... I'm sure that the rising ruby stars of the future look at code written by the developers that regularly contribute to this forum and learn a great deal. This has to be encouraged as this will help both SketchUp and SCF in the longer term. ............. Any lockdown / closing off of the rubies is a bad idea as it closes off this pool of collective knowledge. .............. Charging $100 and Receiving $100 are 2 different things. I would bet that most Portugese speakers who are using SketchUp have at least a rough smattering of English / are smart enough and will be able to figure out how to use most scripts eventually - so why would they pay $100 ??? ......... Just my thoughts Howard L' Yes ! it 's right , I know sketchup and learning in SU ruby well in here ,from local web portal in my country ,which sketchup is just introduce in my country. Do believe that I search here on first line of my-local google search ?, and even my enlish is still not good enough , but I believe that I am smart enough to find this warmed place here
  • Input_point: which component?

    8
    0 Votes
    8 Posts
    517 Views
    daikuD
    This is exactly the info I needed. Thanks guys! CB.
  • Styles and the Ruby API

    4
    0 Votes
    4 Posts
    325 Views
    thomthomT
    I find this thread of interest as well. I was very puzzled when I wanted to access some style information.
  • Ask for a "flashing" feature.

    11
    0 Votes
    11 Posts
    800 Views
    MALAISEM
    Hi All Just a small trial using Morisdov's proper animation plugin and Jim's flasher plugin. I notice the flashing face only supports flicker when entire ( no separate items painted with the same color) MALAISE flashbox.swf
  • Line on surface removal plugin (Request)

    8
    0 Votes
    8 Posts
    1k Views
    Chris FullmerC
    There is an option when you import dwg files to "delete coplanar edges" or something like that. Just use that. It works good, Chris
  • To RickW: NightSky trouble

    4
    0 Votes
    4 Posts
    414 Views
    R
    I can tell you that turning off NightSky will turn off the sky in SketchUp, rather than restore the setting prior to using NightSky. I will look into changing that. As for the dialog box problem, all I can think of is that there must be a security issue with your browser settings, because the html is about as basic as it gets.

Advertisement