ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Distance between a vertex in one group to a vertex in anothe

    8
    0 Votes
    8 Posts
    557 Views
    TIGT
    Something like... ### assuming model, compo'defn, instance etc defined earlier on... transformation = component_definition.transformation * component_definition_instance.transformation this_parent = component_definition_instance.parent while not this_parent == model transformation = transformation * this_parent.transformation this_parent = this_parent.parent end#while ### now have full transformation for the instance no matter how deeply it's nested... ??? Untested - just a thought... Adjust for Edge etc...
  • Request "Real-Line-Cross" Center point

    7
    0 Votes
    7 Posts
    387 Views
    Chris FullmerC
    ah, ok. Another thing to note is that I only tried 3d export, and I only exported a model that was drawn in 2d. So I have not tried 2d export at all. Perhaps it is not working. I'll check it on my machine when I get a chance, but my guess is that I will get your same results - no consutruction geometry. Chris EDIT: I haed acciedntaly mistyped a 3d and 2d....it is all typed as it should be now.
  • Syntax Error at Line 51718725

    3
    0 Votes
    3 Posts
    216 Views
    M
    @unknownuser said: Try one of these "</script>" after lets say every 5 or 6 thousand lines. I'm self-employed and darn sure my crab apple boss will fire me if I ever get to 5k lines in a JS file.
  • Extending ComponentInstance Class

    9
    0 Votes
    9 Posts
    279 Views
    fredo6F
    @adamb said: I'm sure what Fredo meant to say is that its not good practice to overload (or to some degree) extend a built-in class. Its very good practice to derive from / subclass an existing class to create a specialization you may want. Adam Thanks Adam, this is exactly what I meant. Somehow, the best would be that we restrict the possibility of name clashing only at Module level, which implies that all scripts are alway encapsulated within modules, so that it is easier to control.
  • Sketchup Rubis, can a door and window schedule ruby be made?

    2
    0 Votes
    2 Posts
    451 Views
    chrisglasierC
    @redinhawaii said: I know little to nothing about rubies, but it seems there is a need and maybe there is a way to create rubies for door and window schedules, note keys, lots of useful tools for the creation of working drawings in SU/LO. is it possible, is it practical, who knows rubies well enough to understand the issue? aloha red Don't be put off by the topic title but is this the kind of thing you have in mind? If so can you find someone who would be willing to collaborate on a Mac version as I have only a PC? Chris
  • Request - digital watercolor engine

    8
    0 Votes
    8 Posts
    647 Views
    majidM
    dear mates ...I havn't poblished the process yet...so if you are interested to do a co-work plz email me at : majid - ye ga negi (at) yah... com so that i could share you the process
  • Fbx export options

    2
    0 Votes
    2 Posts
    158 Views
    J
    Hi Rob, All we can go by is the API docs - which say nothing about being able to specify options on exporting. It just doesn't appear to be supported. http://code.google.com/apis/sketchup/docs/ourdoc/model.html#export
  • Having trouble ending a simple script

    3
    0 Votes
    3 Posts
    170 Views
    B
    Chris, Thanks so much for the help, the revised script works beautifully. Proof positive that I was and still am in way over my head. Rob
  • Multiple Action Callbacks?

    5
    0 Votes
    5 Posts
    333 Views
    M
    @jim said: One technique I have used is to pass the name of the Ruby callback to the Javascript. In many cases, you can use a single Javascript function to call any number of Ruby callbacks. Neat trick, and that tells me exactly what I wanted to know. Now where to we go to get the docs to say "add one or more callbacks ..."?
  • Hide components panel on close

    6
    0 Votes
    6 Posts
    258 Views
    AdamBA
    @chris fullmer said: It has to be put into a class and you have to instantiate the class as a tool. And you also have to attach an observer to the Sketchup object. Check out the full example in the introduction paragraph on that page. It shows better how to use it in context. Chris Apart from onQuit is broken on Mac OSX which is annoying. Also be aware that these "stuff has finished / been deleted" generally get invoked after the fact so don't expect to get useful info from the objects in question. Adam
  • Dialog with Webdialog

    12
    0 Votes
    12 Posts
    525 Views
    M
    @rickw said: If you give all your form fields an ID, you can reference them in ruby without relying on the info passed in the callback. In fact, there are times I don't pass any data in the callback itself, instead using dialog.get_element_value("myfield") to access the information I need. I only pass the info through the callback if the info is limited to one data set, and then only occasionally. Excellent tip. Thanks.
  • Loading a Material from SKM

    6
    0 Votes
    6 Posts
    878 Views
    F
    Even better: Found the defintions.load method that will load the model into the list of definitions which then loads the materials.
  • Apply transformations to nested DC components

    2
    0 Votes
    2 Posts
    142 Views
    TIGT
    You need to keep applying ' parent.transformation' to it... If it's being edited the ' model.edit_tranform' helps...
  • Scale Feature to fool Sketchup and Operator

    4
    0 Votes
    4 Posts
    329 Views
    mitcorbM
    Ok, Thanks Chris. Of course that is not the answer I wanted to see, considering all of the possibilities that have arisen in this forum. But, you never know...
  • Google Example Plugin Box.rb

    2
    0 Votes
    2 Posts
    274 Views
    S
    I also just found this page that might help. http://code.google.com/apis/sketchup/docs/ourdoc/material.html
  • What is the best way to find the type of an entity

    12
    0 Votes
    12 Posts
    1k Views
    thomthomT
    Think I need to look over my scripts again. Review the ruby code.
  • Locking The Components Panel To The Side

    8
    0 Votes
    8 Posts
    249 Views
    Chris FullmerC
    I like that you had to come back and refute your own statement Jim Chris
  • Exploding Using Ruby Script

    9
    0 Votes
    9 Posts
    2k Views
    S
    @tig said: Sorry - I made a typo, try this... there was loose ) after entities ! Sketchup.active_model.active_entities.each{|e|e.explode if e.class==Sketchup::ComponentInstance} wewt! thanks man that worked a dream. ive spent so long on this thanks
  • Sutool 2009

    2
    0 Votes
    2 Posts
    818 Views
    I
    See here.. http://sketchuplinks.blogspot.com/2009/04/suntools.html
  • Getting the Current Date with SketchUp Ruby API

    3
    0 Votes
    3 Posts
    906 Views
    TIGT
    Built into core Ruby already... Time.now etc, see Ruby http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_time.html et al...

Advertisement