⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Modifying Reporting Area Script

    2
    0 Votes
    2 Posts
    180 Views
    JQLJ
    Have you tried report label areas plugin by Fredo? http://sketchucation.com/forums/viewtopic.php?f=323&t=40025&p=471921&hilit=area#p376837
  • OnKeyDown not working when Web dlg is focuse...why?

    6
    0 Votes
    6 Posts
    430 Views
    D
    some reading http://unixpapa.com/js/key.html it's title JavaScript Madness: Keyboard Events trying to get my head around it at the moment...
  • How to distinguish face size

    11
    0 Votes
    11 Posts
    782 Views
    pingpinkP
    Thank you very much ! Actually , I refer "round_to" in a class Fixnum below my main codes. I don't see any error. It's my new knowledge about sprintf("%.2f", 1.23456) [ruby]class Fixnum def abs rx = self if rx < 0 rx = -rx end return rx end def to_meter ufactor = 1.m rx = (self) / ufactor return rx end def round_to(x) (self * 10**x).round.to_f / 10**x end def ceil_to(x) (self * 10**x).ceil.to_f / 10**x end def floor_to(x) (self * 10**x).floor.to_f / 10**x end def rad_to_deg (self / Math;;PI) * 180.0 end def deg_to_rad (self * Math;;PI) / 180.0 end def comma_format s = self.to_s if s.include? ?. pre, post = s.split '.' "#{pre.reverse.gsub( /\d{3}(?=\d)/, '\&,' ).reverse}.#{post}" else s.reverse.gsub( /\d{3}(?=\d)/, '\&,' ).reverse end end end [/ruby][/code]
  • Can't draw subclasses of Sketchup::Edge

    25
    0 Votes
    25 Posts
    1k Views
    thomthomT
    I hope we get to see your creation one day. It sounds interesting!
  • Sorting algorithm

    9
    0 Votes
    9 Posts
    444 Views
    bomastudioB
    Ok TIG I understand.....I just said "group" because I don't use neither the SUpro import nor external plugin, I'm using mine importer: it return to me a group with all the dxf drawing. I used your technique (sustituting the group to the componenet.definition) and it works fine..
  • Grey Out Issue is back

    30
    0 Votes
    30 Posts
    811 Views
    Rich O BrienR
    I'm also noticing that box select is not selecting or click select. If i right click something it selects but the menu is greyed
  • How to create donation button for your plugins?

    6
    0 Votes
    6 Posts
    585 Views
    renderizaR
    Thank you very much TIG!
  • Custom importer preview?

    5
    0 Votes
    5 Posts
    207 Views
    bomastudioB
    @dan rathbun said: @voltaicsca said: If so, how does one access this functionality? This is an operating system feature. Previews will display if a thumbnail image has been saved INSIDE the file. (Which SketchUp can do with models.) But this works only if a picture is available.... so thinking about SU only if I'm writing an exporter (in the case I've got the SU model and its thumbnail). But what about the opposite situation (an importer, say a DWG/DXF/OBJ etc)?
  • Followme &amp; Pushpull Commands

    4
    0 Votes
    4 Posts
    669 Views
    pilouP
    You have also a French section here where few ruby developpers can help you (Fredo6, Didier Bur, Matt666... (when they make a little visite User Control Panel / UserGroups/ Français
  • Ruby to open a sequence of files - run ruby

    8
    0 Votes
    8 Posts
    505 Views
    T
    Thanks Dan, this worked great! Sketchup.undo() while Sketchup.active_model.modified? Stuart
  • Can a script fire another?

    23
    0 Votes
    23 Posts
    894 Views
    CadFatherC
    @aerilius said: Sorry for being late that's quite alright.. i was taking my time anyway..
  • Modifying geometry in freshly copied Groups (not unique)

    8
    0 Votes
    8 Posts
    659 Views
    Dan RathbunD
    @jolran said: However I was thinking more as a benefit to others, keeping this info visible. I added this topic to my manual list of Snippets. See Groups: [Code Snippets] by Subject
  • [Plugin] ToolbarBuilderDemo

    13
    0 Votes
    13 Posts
    544 Views
    BoxB
    I think a three or four button save in the free version will get you many more Pro buyers.
  • Ruby script to detect OS

    5
    0 Votes
    5 Posts
    2k Views
    A
    That (edit: scott's) is already almost ruby code. This should do it: module TDxSkp WIN = ( (Object;;RUBY_PLATFORM =~ /mswin/i || Object;;RUBY_PLATFORM =~ /mingw/i) unless defined?(WIN) OSX = ( Object;;RUBY_PLATFORM =~ /(darwin)/i ? true ; false ) unless defined?(OSX) if WIN require 'sketchup.rb' require '3DxSketchUp/3DxSketchUp.dll' file_loaded("3DxSketchUp.rb") elsif OSX require 'sketchup.rb' require '3DxSketchUp.bundle.plugin/Contents/MacOS/3DxSketchUp.bundle' file_loaded("3DxSketchUp.rb") end end # module http://sketchucation.com/forums/viewtopic.php?f=180&t=34631&p=305368 We use proper operating system names because we are not detecting hardware. I'm not sure if that's the namespace ( TDxSkp) that they use, but our constants should better not float in top level namespace. However note that 3DConnexion is a binary plugin and adds content to the Ruby environment that we can not check for errors (or we can find but not fix them).
  • How to get transformation.origin of a internal component

    2
    0 Votes
    2 Posts
    456 Views
    TIGT
    First find the insertion point of the Redbox instance in its current context. Next find the transformation of the Bigbox container instance. You need to get a handle on the 'Redbox'. Let's assume there is only one instance and that's inside Bigbox. redbox = model.definitions['Redbox'].instances[0] Now get its insertion point pt = redbox.transformation.origin Now let's assume there's only one instance of 'Bigbox'. bigbox = model.definitions['Bigbox'].instances[0] Get its transformation tr = bigbox.transformation Apply that to the point 'pt' pt.transform!(tr) The point 'pt' is now relative to the model's origin, NOT the Bigbox's internal origin...
  • File Path with backslashes

    6
    0 Votes
    6 Posts
    385 Views
    TIGT
    @dan rathbun said: TIG's example: .tr("\"","/") means replace all double quotes with a slash. It probably should be: **.tr("\\","/")** Dan thanks for spotting my typo. I've corrected the original... By coincidence I was doing some changes between double and single quotes and it got stuck in my muscle memory !
  • Reference to entities(id)

    7
    0 Votes
    7 Posts
    523 Views
    jolranJ
    Yep, solid tip. Thank you Dan.
  • How to unhide single entity in a hidden hirarchy of entities

    3
    0 Votes
    3 Posts
    834 Views
    B
    Thanks for a quick reply! @tig said: If you use nested objects [groups or component-instances] and give them different layers, you can use layer-visibility to control what you see... My target plugin requires to use nested objects 'inside each other' to identify entity parents and their IDs in a complex scene Is there a way to 'unnest' an object?
  • Bat print skp files

    5
    0 Votes
    5 Posts
    306 Views
    TIGT
    This idea is not new... http://sketchucation.com/forums/viewtopic.php?f=15&t=37510 https://groups.google.com/forum/?fromgroups=#!topic/sketchupruby/XCW2zuW_lY8 etc Without considerable effort and extreme programming skills, you will almost certainly have to open each SKP in turn and export it as a jpg or png, then print that using a 'bat' file ? This is readily programmable in ruby...
  • Action callback - Duh!

    4
    0 Votes
    4 Posts
    228 Views
    jolranJ
    I see. Clever solution, anyway. Save's some code.

Advertisement