⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • New Developer Export to PDF can it be done?

    11
    0 Votes
    11 Posts
    538 Views
    Dan RathbunD
    @bomastudio said: Sketchup.send_action("printDocument;") Where you find it?? In the Code Snippet post: Re: [Code] Sketchup.send_action() : Arguments to Lots of snippets indexed here: [Code Snippets]
  • [Tips] How to make resolution-independent WebDialogs

    3
    0 Votes
    3 Posts
    283 Views
    A
    That was a copy paste mistake. I don't know how it is on OS X. If pixel doubling is used, I'd expect existing webdialogs work without change, but the above points wouldn't hurt. I don't know if it can set anything inbetween. The same goes also for devices like the Toshiba Kira where the manufacturer added pixel doubling etc.
  • How to use TestUp?

    3
    0 Votes
    3 Posts
    195 Views
    renderizaR
    Thanks Dan Rathbun running as admin worked!
  • Toolbar Registry Hacks

    22
    0 Votes
    22 Posts
    5k Views
    TIGT
    Obliquely... Have you also noticed this [reported] bug in v2013 ? Win7 - but others might get it too... Open SketchUp v2013 Arrange some floating toolbars on screen - native, native-rb [like dcs] and plugin. Minimize SketchUp. Context-menu close it from the Task-Bar. Reopen SketchUp v2013. Native toolbars are where you left them. All native-rb and plugin toolbars have been 'deactivated' ! Bummer...
  • Remove layer

    7
    0 Votes
    7 Posts
    396 Views
    jiminy-billy-bobJ
    @tig said: I did write a whole raft of 'missing' layer methods... I just thought I'd let you learn by doing... I learn by looking at what you wrote !
  • My senses are trimbleling!

    2
    0 Votes
    2 Posts
    169 Views
    thomthomT
    New working URL: http://sketchup.com/intl/en/developer/docs/classes.php Hope they fix this so the old URLs doesn't break permanently.
  • Load Newton.dylib file via Ruby

    14
    0 Votes
    14 Posts
    1k Views
    A
    @dan rathbun said: Yes. DL is Ruby bridge to using dynamic compiled libraries. On PC, before DL, we had to use the Win32API library. Interesting topic What about the win32-api 1.4.8 by Daniel J. Berger, Park Heesob? In dl you load the dll file once and then extern as many functions. <span class="syntaxdefault">dlload</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">find_support_file</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"NewtonServer3.dll"</span><span class="syntaxkeyword">,</span><span class="syntaxstring">"plugins\\SketchyPhysics3\\"</span><span class="syntaxkeyword">))<br /></span><span class="syntaxdefault">extern </span><span class="syntaxstring">"void init()"<br /></span><span class="syntaxdefault">extern </span><span class="syntaxstring">"void stop()"<br /></span><span class="syntaxdefault">extern </span><span class="syntaxstring">"void update(int)"<br /></span><span class="syntaxcomment">#...<br /></span><span class="syntaxdefault"> </span> But, in win32api.so and win32-api you load the library every time you create a function, right? <span class="syntaxdefault">api </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> AMS</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Win32</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">API<br />newton </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">dir</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'lib/Win32/newton.dll'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">  <br />Create  </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> api</span><span class="syntaxkeyword">.new(</span><span class="syntaxstring">'NewtonCreate'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'PP'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'P'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> newton</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">Destroy </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> api</span><span class="syntaxkeyword">.new(</span><span class="syntaxstring">'NewtonDestroy'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'P'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'V'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> newton</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">Update  </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> api</span><span class="syntaxkeyword">.new(</span><span class="syntaxstring">'Update'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'P'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'V'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> newton</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> </span> Am I thinking right? Which one is better dl or win32-api?
  • How to get x,y,z texture position of a face?

    3
    0 Votes
    3 Posts
    459 Views
    renderizaR
    Thank you TIG as always and I will look into your recommendation ASAP!
  • Help needed with intersecting geometry

    4
    0 Votes
    4 Posts
    253 Views
    TIGT
    Boolean / Oscoolean ?
  • Global Hash in module (solution without $ ) ?

    5
    0 Votes
    5 Posts
    238 Views
    jolranJ
    Thanks TIG. Your variant is probably more than I need for the moment, but still very clever. And I presume (since nobody mentioned it already) quite safe to use ?
  • Script calls script - how to click Ok to dialog boxes?

    3
    0 Votes
    3 Posts
    296 Views
    T
    Thanks TIG! I will give up on that idea and go # the second script! See you in a year! Thanks for the quick reply! Stuart
  • How to retrieve array of faces that are inside a group?

    14
    0 Votes
    14 Posts
    507 Views
    renderizaR
    Very grateful indeed!
  • [Idea] Storing parameters to model for easy changes

    5
    0 Votes
    5 Posts
    187 Views
    thomthomT
    For bezier curves, or surfaces it's easier - as the mesh is generated from a set of few control points. Round corners base itself on existing geometry - problem arise when you start manipulating the mesh after rounding it. For Bezier Surface I plan to implement a modifier stack.
  • SketchUp crashing on me with this code...why?

    8
    0 Votes
    8 Posts
    388 Views
    renderizaR
    Hi, Thank you guys so much could not do it without you guys!...Here is the latest update for Animatex; http://sketchucation.com/forums/viewtopic.php?f=323&t=52238 There is no scrambler for code so you guys can take a peek and will be grateful if you tell me any inefficiency in code so I can keep learning...cheers! New Web Dialog:: [image: animatex_dlg.jpg]
  • Hidden gemoetry being evil.

    3
    0 Votes
    3 Posts
    224 Views
    V
    @thomthom said: I see this from time to time. Usually it's a result of using imported geometry from for instance DWG/DXF files with some minor precision problems that appear to cascade throughout the model. Maybe CleanUp: http://sketchucation.com/forums/viewtopic.php?t=22920 But it won't prevent the problem from re-appearing. The root cause if probably precision problems. Use imported geometry as a guide, but don't model directly off it. Don't trust it to be square or parallel. Thank you so much for the input Thomthom. This is actually quite helpful. ^.^
  • Your thoughts - Trimble's Possible Extensions Warehouse?

    11
    0 Votes
    11 Posts
    871 Views
    renderizaR
    Understood!
  • Why can't Face not have names just like Groups and Comp?

    4
    0 Votes
    4 Posts
    208 Views
    jolranJ
    My pleasure. There may be more to it I'm not aware about. So don't forget to report back if you find something useful
  • Angle between north and face

    9
    0 Votes
    9 Posts
    623 Views
    K
    Thanks it was the thing I was looking for
  • Webdialog scripting issues

    9
    0 Votes
    9 Posts
    1k Views
    Dan RathbunD
    require('sketchup.rb') module SepulTribe module Sensor # RUN ONCE unless file_loaded?(__FILE__) MAC =( RUBY_PLATFORM =~ /(darwin)/i ? true ; false ) WIN = !MAC @@dialogs = {} # Hash to hold sensor dialog refs @@cmd_main = nil @@cmd_settings = nil @@dlg_settings = nil end # RUN ONCE class << self # proxy class def clear_dialogs() @@dialogs.each {|k,v| if v.is_a?(UI;;WebDialog) v.close if v.visible? end } @@dialogs.keys.each {|k| @@dialogs[k]=nil } GC.start # garbage collection end def create_sensor_dialog(obj) wd = UI;;WebDialog.new( "#{obj.name}'s Info", false, '', 200, 200, 500, 500, true ) main_html_path = File.join( File.dirname(__FILE__), "main.html" ) wd.set_file( main_html_path ) wd.set_position(800,600) wd.set_size(250,250) wd.add_action_callback("get_info") { |dlg, params| dlg.execute_script("show_selected('#{obj.name}', '#{obj.class}')") } return wd end # create_sensor_dialog() def create_settings_dialog() wd = UI;;WebDialog.new( "Main Settings", false, '', 200, 200, 500, 500, true ) settings_html_path = File.join( File.dirname(__FILE__), "settings.html" ) wd.set_file( settings_html_path ) wd.set_position(640,480) wd.set_size(500,300) return wd end # create_settings_dialog() def show_sensor_dialog(obj) # dlg = @@dialogs[obj.object_id] if dlg.nil? dlg = create_sensor_dialog(obj) @@dialogs[obj.object_id]= dlg MAC ? dlg.show_modal ; dlg.show else unless dlg.visible? MAC ? dlg.show_modal ; dlg.show end dlg.bring_to_front end # end # show_sensor_dialog() end # proxy class @@cmd_main = UI;;Command.new("Get Sensor Data") { selected = Sketchup.active_model.selection unless selected.empty? if selected.single_object? if selected[0].is_a?(Sketchup;;ComponentInstance) and selected[0].name.include?('Sensor') show_sensor_dialog( selected[0] ) else UI.messagebox('Selected entity is not a Sensor Component. ') end else UI.messagebox('You have selected multiple entities. ') end end # unless } @@cmd_settings = UI;;Command.new("Settings") { if @@dlg_settings.nil? @@dlg_settings = create_settings_dialog() end unless @@dlg_settings.visible? MAC ? @@dlg_settings.show_modal ; @@dlg_settings.show end @@dlg_settings.bring_to_front } # RUN ONCE unless file_loaded?(__FILE__) # Access SketchUp's Edit menu edit_menu = UI.menu "Plugins" sub_menu = edit_menu.add_submenu("xxx Plugin") item = sub_menu.add_item @@cmd_settings # Access SketchUp's context menu UI.add_context_menu_handler do |menu| selected = Sketchup.active_model.selection unless selected.empty? menu.add_separator menu.add_item @@cmd_main end end file_loaded(__FILE__) end # RUN ONCE end # close module Sensor end # close module SepulTribe FIXED lines : %(#000000)[**34**, **35**, **41** & **59**]
  • Find a component definition in a list

    4
    0 Votes
    4 Posts
    261 Views
    thomthomT
    A less verbose version:. <span class="syntaxdefault">result&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">references</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">find&nbsp;</span><span class="syntaxkeyword">{&nbsp;|</span><span class="syntaxdefault">string</span><span class="syntaxkeyword">|&nbsp;</span><span class="syntaxdefault">string</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">rstrip&nbsp;</span><span class="syntaxkeyword">==&nbsp;</span><span class="syntaxdefault">ref&nbsp;</span><span class="syntaxkeyword">}<br /></span><span class="syntaxdefault">puts&nbsp;</span><span class="syntaxstring">'Hello'&nbsp;</span><span class="syntaxkeyword">if&nbsp;</span><span class="syntaxdefault">result</span>

Advertisement