sketchucation logo sketchucation
    • Login
    1. Home
    2. HPW
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    H
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 29
    • Posts 126
    • Groups 1

    Topics

    • H

      Sketchup 7 setting opacity with ruby?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      245 Views
      thomthomT
      For materials it's Material.alpha. If you are drawing polygons to the viewport using View.draw then you need Color.alpha. The Secrets of SketchUp’s Materials - There is a section there "Material.alpha vs Color.alpha"
    • H

      Getting and iterating scene list?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      316 Views
      Dan RathbunD
      @hpw said: Edit: Kernel.sleep does not work for that. Yes.. I guess we decided it would not, because the C++ engine cannot call observers, as the scene changes, etc.
    • H

      Neobook application builder in Sketchup

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      871 Views
      No one has replied
    • H

      PdScript-interpreter for GUI Scripting in SketchUp-Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      6k Views
      H
      Hello, I made a small page for the sketchup plugin on my website. I updated the above link for the download. Hans-Peter
    • H

      3D PDF with support for dynamic components properties/values

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      1
      0 Votes
      1 Posts
      186 Views
      No one has replied
    • H

      RPS 3D PDF Supporting Dynamic Components?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      3
      0 Votes
      3 Posts
      308 Views
      H
      Hello, That would be a nice feature to add. I agree, getting the same structure in the PDF as is Sketchup would be very nice. If you add tis, make it optional, to allow people who have other interests to use it in the current way. Adding property/value to each node/component would transport the complete information available. Regards Hans-Peter
    • H

      Exit/Shutdown SU 7 ??

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      3k Views
      Dan RathbunD
      @alexmozg said: > def Sketchup;;exit > model = Sketchup.active_model > model.save "temp_model.tmp" if model.modified? > Sketchup.send_action 57602 > end#def > Model doezn't realy save. Do NOT use exit as a method name !!! It is already defined as a global method by the Kernel module (and so is inherited by ALL classes and modules.) exit() Initiates the termination of the Ruby script by raising the SystemExit exception. Also runs any at_exit block methods before termination.
    • H

      Model.save does not save

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      2k Views
      Al HartA
      After wrestling with this problem for an hour or two for a routine I am writing to load a .SKP file, change it and resave it, I came up with this solution: Replace \ with / in the file name (save does not seem to like ) Save the current model with a temporary name (in the same folder as the desired final name) Close the current model (You have to close the model so you can modify the .skp file already on disk) Remove the current .skp file (if it exists) Move the temporary file to the desired file (rename()) # routine to save a .SKP file with the same name as the current model # need to save file with a temporary name, close model, then move the temporary name to the real name def resave_file(sfile) # save() does not seem to like back slashes # replace them withforward slashes sfile.gsub!(Regexp.new("\\\\"), '/') printf("sfile; %s\n", sfile) # save to a temporary location first # this assumes the file name ends with .skp (or .SKP) sfile2 = sfile[0, sfile.length - 3] + 'TMP' printf("sfile2; %s\n", sfile2) bret = Sketchup.active_model.save(sfile2) printf("Save file; bret; %s\n", bret) return(bret) if !bret # now move sfile2 to sfile # remove existing file # need to close existing model first Sketchup.file_new if File.exists?(sfile) begin File.unlink(sfile) rescue warn "could not delete file; " + sfile return(false) end end#if bret2 = File.rename(sfile2, sfile) printf("Returning bret2; %s2\n", bret2) return(bret2) end#def If you need to file to still be open after the save, you could open it again. Let me know if it works for you
    • H

      Commandline Import DWG

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      3
      0 Votes
      3 Posts
      654 Views
      tbdT
      you can use SketchUp Bridge and send command Sketchup.active_model.import("file.dwg",false) SketchUp already supports dropped images & skp
    • H

      Ruby equivalent for edit/delete guides?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      130 Views
      TIGT
      I've made various - search for 'ConsDeleteContext.rb' as one set for a context-menu right-click that differentiate between points and lines and all or just in active context etc... 'Guides' are often referred to as 'Construction' Lines/Points... their 'old name'... Search for those too...
    • H

      DC Dictionary storage

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      1
      0 Votes
      1 Posts
      678 Views
      No one has replied
    • H

      Text_Only labels in DC possible?

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      1
      0 Votes
      1 Posts
      766 Views
      No one has replied
    • H

      Add DC-Attribut to group not show up

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      205 Views
      TIGT
      Unfortunately, as you say, a group is not a component ! The group.make_unique is 'deprecated' BUT it works till it's fixed by Google... Why don't you make the group into a component, THEN you can probably use it as desired - inst=group.to_component - returns its instance OR defn=group.to_component.definition - returns its definition if you want to add to that... OR instn=defn.instances[0]to return what you just 'componentified' from the group...
    • H

      Component options remember its size betw. calls and sessions

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      2
      0 Votes
      2 Posts
      429 Views
      T
      here, here!
    • H

      Ruby console remember size between calls and sessions

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      11
      0 Votes
      11 Posts
      897 Views
      Chris FullmerC
      Sure, this is from a simple dynamic component, that only has dialog height and widtrh asigned to it. _dialogheight_label: DialogHeight _dialogwidth_label: DialogWidth _formatversion: 1.0 _has_movetool_behaviors: 0.0 _lastmodified: 2009-05-06 22:59 _lengthunits: INCHES _name: Component#1 dialogheight: 560 dialogwidth: 345 nil Hope that helps, Chris
    • H

      Fastest way to select component by definition.name

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      H
      Hello TIG, Again many thanks for the hint. sel_def.instances[0].add_entities(MySubCompArray) does the job for me. Now I can use the imported dummy-block from autocad as the hierarchy-master instead of creating a separate new group. Will keep the outliner structure more readable. I also use now Jim's togglewindows.rb to keep the outliner close during execution.
    • H

      Turn component into non-editable DC

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      185 Views
      H
      The sample 'Make Sang Red' from here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=17888&p=145120&hilit=Make+Sang+Red#p145120 might help: # Add a new configurable option to Sang. # (Any attribute that starts with an underscore # is a "meta attribute" that describes behavior.) sang_def.set_attribute 'dynamic_attributes', 'weight', '145' sang_def.set_attribute 'dynamic_attributes', '_weight_label', 'weight' sang_def.set_attribute 'dynamic_attributes', '_weight_formlabel', 'My Weight' sang_def.set_attribute 'dynamic_attributes', '_weight_units', 'STRING' sang_def.set_attribute 'dynamic_attributes', '_weight_access', 'TEXTBOX' Not sure if this would enough to make a normal component into a DC! Will try.
    • H

      Group components from array

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      533 Views
      H
      @unknownuser said: Ruby is kind of cool in that you can increment Strings. Thanks Jim for the tip. In this case I can not use it, since my block-numbering-steps comes from the imported autocad-blocknames. But maybe it gets usefull in the future. @unknownuser said: Do whatever works for you best... Thanks again TIG. Hans-Peter
    • H

      Ruby Sketchup keyword list syntax highlighting

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      327 Views
      Chris FullmerC
      I think they have been made for Notepad ++. Check out this page: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10142 and go down to Editor suggestions to find links to a version made by Didier and Radhikari. However, I don't know if those will be helpful though. I was thinking there might be some way to use them, or at least extract or convert their information into something useable by your editor of choice. But maybe someone else has a better suggestion, Chris
    • H

      Ruby console shortcut act as a toggle

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      1
      0 Votes
      1 Posts
      460 Views
      No one has replied
    • 1
    • 2
    • 1 / 2