⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Followme & Pushpull Commands

    4
    0 Szavazatok
    4 Hozzászólások
    823 Megtekintések
    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 Szavazatok
    8 Hozzászólások
    769 Megtekintések
    T
    Thanks Dan, this worked great! Sketchup.undo() while Sketchup.active_model.modified? Stuart
  • Can a script fire another?

    23
    0 Szavazatok
    23 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    13 Hozzászólások
    933 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    2 Hozzászólások
    563 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    547 Megtekintések
    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 Szavazatok
    7 Hozzászólások
    793 Megtekintések
    jolranJ
    Yep, solid tip. Thank you Dan.
  • How to unhide single entity in a hidden hirarchy of entities

    3
    0 Szavazatok
    3 Hozzászólások
    960 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    497 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    371 Megtekintések
    jolranJ
    I see. Clever solution, anyway. Save's some code.
  • How to store slected file directory name on a variable?

    6
    0 Szavazatok
    6 Hozzászólások
    523 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    338 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    440 Megtekintések
    bomastudioB
    THANXXXXXXXXX!!!! it works!!!!!!
  • Ditto mac unix command

    2
    0 Szavazatok
    2 Hozzászólások
    693 Megtekintések
    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
  • [Talk] Qpik::SimpleRays Overhaul

    11
    0 Szavazatok
    11 Hozzászólások
    6k Megtekintések
    Dan RathbunD
    v1.0.1 download Moved to Plugins forum. Old v1.0.0 deleted. THIS thread retitled as "[Talk] Qpik::SimpleRays Overhaul"
  • I want to write a ruby script : rotate an object

    11
    0 Szavazatok
    11 Hozzászólások
    4k Megtekintések
    Dan RathbunD
    @unknownuser said: I want to learn if instead of having a text inputbox you can also have a dropdown menu list with existing layers on it so you can select from there aswell. Yes I have done that.. it is one one my files (somewhere) just guessing it's similar to this: def choose_layer(active=false) model = Sketchup.active_model layset = model.layers deflay =( active ? model.active_layer.name ; layset.first.name ) laylist = layset.map(){|l| l.name }.join('|') results = inputbox(["Layer ;...... "], [deflay], [laylist], " Choose Layer") results ? layset[results.first] ; nil end #
  • How to draw a cylinder by ruby?

    11
    0 Szavazatok
    11 Hozzászólások
    4k Megtekintések
    D
    hi have a look at linetool.rb and class CylTool < LineTool in the Example scripts folder in ../SketchUp/Plugins/examples/linetool.rb, or download it if it's not...... john
  • Notepad++ SU8 Ruby API Autocomplete

    62
    0 Szavazatok
    62 Hozzászólások
    20k Megtekintések
    B
    Thanks a lot!

Advertisement