ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Model Hierarchy

    2
    0 Votes
    2 Posts
    557 Views
    TIGT
    A definition.name applies to every instance, as in instance.definition.name - which can't be "" - but an instance ALSO has it's own name - which might be "" - instance.name ?
  • Add to existing groups to a new group

    2
    0 Votes
    2 Posts
    233 Views
    TIGT
    See this parallel thread http://forums.sketchucation.com/viewtopic.php?p=277009#p277009
  • Webdialog component and group html attributes

    5
    0 Votes
    5 Posts
    359 Views
    4
    Thanks, guys. I Hope I can get this to work.
  • Entity.parent gives wrong type

    20
    0 Votes
    20 Posts
    1k Views
    TIGT
    If you make a group into a component it will take the original 'Group#nn' name as the definition's name. You have to use definition.name="new_name" to change it to something else. When you place an instance you can give that a separate name [Entity Info]. So you can have a component definition named "My_component" and the instances of it can also have their own names "v1", "v2" etc...
  • Mechanizing the model upload process?

    2
    0 Votes
    2 Posts
    214 Views
    Dan RathbunD
    You'd have to first export I'd think, via the Sketchup API. Then some kind of automation, perhaps thru a webdialog. (I do not see a specific 3Dwarehouse APi on Google API site.) Try posting a query here: http://sketchup.google.com/3dwarehouse/forum
  • Using the Windows7 Taskbar Progressbar?

    4
    0 Votes
    4 Posts
    6k Views
    T
    I know nothing about Win7 and its progress bar and Win32, but I have done one using WxSU and I export model while having the progress bar alive. The only thin is to give it an update from time to time to keep it 'active'. WxSU gives also an option of Cancel button. It has this advantage over your solution that it works on Mac & lower Win version as well. Disadvantageous is installation\addition of WxSU library.
  • [Question] on transformation.rotation

    3
    0 Votes
    3 Posts
    397 Views
    R
    Great, thanks TIG! Now it works
  • How to set Layer property of a Group?

    7
    0 Votes
    7 Posts
    492 Views
    Dan RathbunD
    @grojguy said: Ah yes, OK, that would make sense, i.e. class inheretance. But, from your comment I was anticipating seeing "layer=" in the instance methods list returned by that nifty command... So, why is "layer=" it not in the list? Because.. you see the warning for the "show inherited" argument is default false for your version of Ruby, but will (actually was,) changed to true as a default, in all Ruby versions 1.8.1 and higher. IF you are still using Sketchup 7.x, then the Ruby DLL distro'd is v1.8.0-initial_release (ie: patch_level p0) You can backup the current "Deceased 1.8.0" dll, msvcrt-ruby18.dll by renaming it: msvcrt-ruby180_p0.dll then replace it with your choice of a newer version from: Ruby Interpreter DLLs (Win32) (you will need to make a copy of the version you want Sketchup to load named: msvcrt-ruby18.dll.) .
  • Undo shifts geometry

    5
    0 Votes
    5 Posts
    228 Views
    thomthomT
    No - I need to ensure that when the tool deactivated that the group is closed.
  • Outliner like tool for geometries

    3
    0 Votes
    3 Posts
    181 Views
    W
    Short version. Sketchup to G-code. The version, sketchuptogcode, does not follow the edges accurately enough. Long version. G-code is the language used to drive the automated router I have access to. I have worked out the details of the three designs in sketchup, then I reenter the design into another CAD tool that can output g-code. I'm just way too lazy to enter even my simple designs twice. G-code is an "edge" based language. G-code commands the router to move in 3-D lines and arcs. A few details beyond just following a edge, but pretty straight forward. I have written software to perform this kind of task many times in my past life, but it was not done for Sketchup in Ruby. As a retired programmer, I thought I might look into creating a g-code generator. So a Ruby script that outputs geometry info serves two functions: offers a concrete example I can build on; and offers a concrete example I can learn from. I know I will learn Sketchup and Ruby much faster if I have a problem that's of interest to me. Woodworker Bob, retired programmer - I'm so old I wrote programs using paper tape and teletypes.
  • [Code] Group.real_parent

    2
    0 Votes
    2 Posts
    1k Views
    thomthomT
    Standalone version - doesn't extent the base class and also returns the definition for Group, ComponentInstance and Image entities: # Returns the definition for a +Group+, +ComponentInstance+ or +Image+ # # @param [Sketchup;;ComponentInstance, Sketchup;;Group, Sketchup;;Image] instance # # @return [Sketchup;;ComponentDefinition] # @since 2.0.0 def self.definition(instance) if instance.is_a?(Sketchup;;ComponentInstance) # ComponentInstance return instance.definition elsif instance.is_a?(Sketchup;;Group) # Group # # (i) group.entities.parent should return the definition of a group. # But because of a SketchUp bug we must verify that group.entities.parent returns # the correct definition. If the returned definition doesn't include our group instance # then we must search through all the definitions to locate it. if instance.entities.parent.instances.include?(instance) return instance.entities.parent else Sketchup.active_model.definitions.each { |definition| return definition if definition.instances.include?(instance) } end elsif instance.is_a?(Sketchup;;Image) Sketchup.active_model.definitions.each { |definition| return definition if definition.image? && definition.instances.include?(instance) } end return nil # Error. We should never exit here. end
  • Interacting with a Sketchup file from another program

    21
    0 Votes
    21 Posts
    6k Views
    Dan RathbunD
    I think the answer is to export as Collada (.DAE,) and have the website use the Google O3D plugin. (Manipulation and User Interaction is done via Javascripting.)
  • Snap Alignment

    13
    0 Votes
    13 Posts
    3k Views
    R
    My ideas was do create a Fence-Builder where you can plan fences for your garden. So you could be able to snap the fences vertically and horizontally. Add doors and so on. Thats what snap alignment would be great for.
  • Create zip files with sketchup ruby api

    4
    0 Votes
    4 Posts
    883 Views
    TIGT
    That's one but there's also http://rubyzip.sourceforge.net/
  • Get Mouse x,y on "resume"

    2
    0 Votes
    2 Posts
    235 Views
    thomthomT
    Don't think you can. It's one of the several annoying limitations of the Tool class. (Why doesn't activate return an view argument?)
  • Using printf to help trace ruby errors

    2
    0 Votes
    2 Posts
    378 Views
    Al HartA
    I was trying to get the function name in the trace as well. It turns out that adding this line after every function definition may work well. It displays the rotuine name as well as the file and line number. puts("TRACE: " + caller(1)[0].to_s) if $rps_show_traces
  • Load an object and attached it to the pointer

    10
    0 Votes
    10 Posts
    625 Views
    S
    And it work ! Thank y'all for your help...
  • Latitude/longitude not working ?

    3
    0 Votes
    3 Posts
    383 Views
    Didier BurD
    Thanks a million TIG
  • The results of "line.strip"

    3
    0 Votes
    3 Posts
    249 Views
    honoluludesktopH
    Tom, Thanks, I previous looked at that page, and tried to correct my code, but couldn't make it work. Guess it's another case where I am asking the wrong question. It's late, I will take another stab at it tomorrow. Except for speed, parsing, layers, block names, and nested blocks the plugin is (beta) usable. [image: Mkj1_temp09.jpg] This is a import of a Dxf file. The coding is very basic, but modular enough to add other Dxf features in the future.
  • Different styles

    3
    0 Votes
    3 Posts
    270 Views
    D
    mm. a shame. would be good to ask the google team to enable this option. no? thanks for replying

Advertisement