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

    9
    0 Votes
    9 Posts
    387 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
    599 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
    520 Views
    renderizaR
    Thank you very much TIG!
  • Custom importer preview?

    5
    0 Votes
    5 Posts
    175 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 & Pushpull Commands

    4
    0 Votes
    4 Posts
    628 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
    403 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
    566 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
    572 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
    371 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
    407 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
    323 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
    445 Views
    jolranJ
    Yep, solid tip. Thank you Dan.
  • How to unhide single entity in a hidden hirarchy of entities

    3
    0 Votes
    3 Posts
    760 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
    248 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
    181 Views
    jolranJ
    I see. Clever solution, anyway. Save's some code.
  • How to store slected file directory name on a variable?

    6
    0 Votes
    6 Posts
    287 Views
    Dan RathbunD
    @Rafael: The API UI module does not have a folderpicker, YET. We have filed Feature Requests for one, and fontpicker, and colorpicker, and etc., etc. For now users must pick a file within the target folder. (We are out of luck if the folder is empty.) @thomthom said: @dan rathbun said: @sound = filepath.gsub("\\",'/') Since / as path separator isn't hard coded I tend to use: @sound = File.expand_path(filepath) One could also do: @sound = filepath.gsub("\\", File::SEPARATOR) But I prefer the first. Your second one is safer. Yes I got lazy, but my purpose here is going from the OS to Ruby. I imagine that after tha statement the path will be used by Ruby's Dir and File methods. Later on... to go back to the OS I'd use filepath.gsub("\/", File::SEPARATOR) if it is even necessary. Be careful with expand_path() because it is DUMB! Your example will work only because the UI.openpanel method returns an absolute path. When the path is a relative path,... the method simply concatenates the current working directory path and the argument path, regardless if the result is really a valid path.
  • Can Plugin Script Run while using other tools?

    5
    0 Votes
    5 Posts
    148 Views
    renderizaR
    Thank you both for help I think I will not work on that plugin idea for the time being. Cheers!
  • Nested groups

    6
    0 Votes
    6 Posts
    225 Views
    bomastudioB
    THANXXXXXXXXX!!!! it works!!!!!!
  • Ditto mac unix command

    2
    0 Votes
    2 Posts
    552 Views
    D
    I'll start answering my own question... plugs = Sketchup.find_support_file("Plugins")ditto "#{plugs}" ~/Desktop/!plugs`` this duplicates the entire contents folder structure in a new folder on the desktop... not an unknown path insight sooo.... now to write that dropbox plugin john

Advertisement