ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Weld (true / multi)

    5
    0 Votes
    5 Posts
    395 Views
    A
    Thanks for the explanation, Tig! I have a better perceptive on why things were happening the way they were.
  • Best way to create ruby addon in sketchup

    2
    0 Votes
    2 Posts
    161 Views
    thomthomT
    Hello and welcome! Google Sketchup FAQ: http://code.google.com/intl/nb/apis/sketchup/docs/faq.html The API manual: http://code.google.com/intl/nb/apis/sketchup/docs/index.html More links and info in the Stickies in this forum section - such as this one: http://forums.sketchucation.com/viewtopic.php?f=180&t=10142 Some other tips: Wrap your code in a module to avoid conflicts with other scripts. Don't modify base classes - as other scripts might rely on their original behaviour. Beware observers - many are bugged.
  • Xcode and Ruby function menu

    12
    0 Votes
    12 Posts
    2k Views
    D
    AdamB, cheers for the reply, before attempting to write any rubies myself I'm trying to analyze what I can and can't see using Xcode and Console (in combination) it appears (to me) that if a ruby or it's loader.rb and subfolder reside in SU Plugin folder they will be initiated on start-up whether required or not and generate error reports if they have a prerequisite for "xxx" which is not available/selected prior to start-up(which, of course it's not) This type of error does't seem to be generated for rubies that are placed inside their own sub-folder with a non-automatic step in their path i.e. rudy console, or a separate toolbar ruby that has it's own sub-folder that contains a on/off-button for an in-folder loader ruby that opens/closes the desired ruby. Not even sure I follow that myself, but main lightup ruby (for example) appears to have to a degree of separation (for activation at least) and cannot generate errors and cause conflicts, unless it's actually being used and there's a problem. What I think I'm after is a way to active/de-active any ruby, from within SU using a single(per ruby) external action. Do you know if that's even realistic en-mass? Which Xcode template is appropriate for SU rubies? or is there an importable or custom layout that's preferable? cheers john
  • Dialog.set_on_close

    5
    0 Votes
    5 Posts
    170 Views
    chrisglasierC
    Thanks but onunload doesn't work. I will give the appObserver a try later on.
  • Matrix Multiplication in C[++]

    13
    0 Votes
    13 Posts
    484 Views
    Chris FullmerC
    I like those lines of code Chris, I want to test those later tonight. Chris
  • Instance.move!() and instance.transform!()

    2
    0 Votes
    2 Posts
    106 Views
    Chris FullmerC
    Yes, .move! is great for animations for those reasons. It should not be compared to .transform! though, as they are dissimilar methods. It should be compared only to .transformation = . As that is what the .move! method is acutally doing. Chris
  • RDoc question

    24
    0 Votes
    24 Posts
    786 Views
    Dan RathbunD
    @thomthom said: But I do like the sound of the @tags it has available. Appear to leave more control than plain RDoc. Such as parameter types and return types and version numbering. It's sounding better all the time! Keep us advised.
  • Create toolbar on the fly

    5
    0 Votes
    5 Posts
    252 Views
    Dan RathbunD
    @pout said: Am I correct? Is it not possible to create a toolbar, from in the ruby console, using these commands? The danger is that the console is running inside Object, and you are using local variables (cmd and toolbar.) Any other 'unwrapped' script that afterward uses the same variable names, will make those 'symbols' point to other UI::Command and UI::Toolbar objects, and you will lose access to them. (Ruby will still know what they are, and the command and toolbar should still work. But you will not be able to make any changes, such as changing the tooltip text.) IF that's OK, or your just testing, no harm. But if you want later access to your command or toolbar objects, you will need to keep them in unique variable identifiers. For example, you could store them in a Hash. MyToolbars={'FancyCommand' => cmd, 'PoutTools' => toolbar } Then later on: MyToolbars['FancyCommand'].tooltip="Select object before doing something Fancy!" See this post for more info: http://forums.sketchucation.com/viewtopic.php?f=180&t=15621&p=220266#p219128
  • Quickly rename layers on several components

    5
    0 Votes
    5 Posts
    1k Views
    M
    @gaieus said: Certainly a plugin would be best Gaieus, you do know that my "how to Ruby" section of the tutorial is well underway, don't you? No programming experience required: http://www.MartinRinehart.com/models/tutorial/tutorial_11.html
  • Changing transformation variables

    13
    0 Votes
    13 Posts
    338 Views
    M
    @honoluludesktop said: Hi Martin, I originally posted an application that did some simple transformations, and became interested in the subject. As you know I am a beginner at all of this and while experimenting, I tried to change some values just to see how my components would behaved, failed to do so, and asked for help Fine. I was afraid you overlooked available ways of getting stuff moved / rotated / scaled. I know I did when I started fiddling.
  • How do you execute Ruby API commands in headless mode?

    3
    0 Votes
    3 Posts
    345 Views
    Dan RathbunD
    @advancecoder said: How do you execute Ruby Plugin API commands in headless mode (e.g. not opening the GUI for Google Sketchup Pro)? You Don't. I went 'round and 'round with another guy over at GoogleGroups that thought he could somehow use the engine behind Sketchup (which is Google Intellectual Property,) to write a better GUI and/or integrate it with a debugger. Anyhow, read the thread if your interested: http://groups.google.com/group/sketchupruby/browse_frm/thread/8d93e9408891fa59#
  • SU Menu Font and Size

    7
    0 Votes
    7 Posts
    267 Views
    Dan RathbunD
    @thomthom said: Will need to do some testing. I got an OSX and Linux box... Here's a test page for the SystemColors: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/colors/sys_colors.htm
  • Sketchup AutoCAD-like command

    6
    0 Votes
    6 Posts
    3k Views
    TIGT
    @pout said: I'll have a look into it. Btw, to insert a second point, is it mandatory to first click to box in which you insert the coordinates? Or can you just type it? You can just type it in as a dimension - the line's vector is take from the current cursor position OR a second-picked point if you have done it. For [] or <> coordinates no need to pick anything after the first point is clicked.
  • Menu.add_item algorithm problem

    11
    0 Votes
    11 Posts
    578 Views
    thomthomT
    Pauline: I split off the last posts Dan and I made. It turned into a separate discussion.
  • DC / Dictionary Interaction

    8
    0 Votes
    8 Posts
    270 Views
    thomthomT
    hm... I need to look into this. Check what happens with my scripts under SU6... Pauline: sorry for going a bit off topic. Maybe it's best if I split these last couple of posts into a new thread? Ok, Pauline & Dan? Edit: Now split of - as you can see.
  • Edge Orientation on a Rectangle

    4
    0 Votes
    4 Posts
    170 Views
    TIGT
    If the rectangle has a face then face.outer_loop.vertices are always listed counterclockwise [right-hand rule]. You can test if a face and its edge are 'reversed?' too...
  • Naming 'Untitled'

    3
    0 Votes
    3 Posts
    145 Views
    M
    @tig said: better you can use Sketchup.open_file("myname.skp") to open that newly made file, with the 'Untitled' one being closed without saving Thanks, TIG. Any way to fire that extra "N" (don't save Untitled) from Ruby?
  • Rotation Check

    3
    0 Votes
    3 Posts
    135 Views
    R
    No, it will not return true in any of those cases. Having said that, if i was less lazy it would be fairly trivial to get it to check for translations and 'skews, scales and rotations' (although not each separately.)
  • Scaling + move!() == ant feast

    9
    0 Votes
    9 Posts
    395 Views
    mitcorbM
    Damn! (notice modifier at end of damn) So much to learn--so little time.
  • Creeping bug (WxSU + SU Tool) SU 7 only

    9
    0 Votes
    9 Posts
    748 Views
    T
    @thomthom said: And the SU developers has said: the Ruby 1.8.0 implementation isn't a standard Ruby packages. Parts has been customized for SU In the thread related to Gem installation Dan compared bit by bit both rubies and they are identical. @thomthom said: which is why I'm very hesitant to change it. I would do that if I would be sure that nothing unexpected occurs, but no-one can predict it.

Advertisement