⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Place Text Label script (looking for one)

    18
    0 Szavazatok
    18 Hozzászólások
    5k Megtekintések
    E
    Hi everyone, Like the users ask to Al Hart, I me too want to place a text label in the drawing, using the value of an Attribute on the entity for the text. To be more specific I downlaod a dynamic door compoenent wich is really cool and offer me lot of options, but I really want to have the name of the compomenet and the its length and height to be shown at the bottom of the door for example or eles where in order to view this information when I produce de plan view in layout. I know I can a samrt lable in Layout to do that wich I am doing right now. But I really want to have this implemented in the compoenent so the infomrations is update upon the dynamic compoenent attribute. Because right now, we often miss a door when inserting samrt lable in LAYOUT. It's a hard job to get focus and not mis a door in LAYOUT when we have like 100 doors in our drawing. Thanks in advance for your answer.
  • Crack Versions

    6
    0 Szavazatok
    6 Hozzászólások
    9k Megtekintések
    PixeroP
    I remember Amrosias Escape Velosity game had a rather fun and different way of getting people to pay. http://www.ambrosiasw.com/games/windows/ You could play the game for free and after a while Captain Hector would fly by asking you to pay for the game. If you continued without paying he would come more frequently and after still a while he would become agressive and start shooting at you. He was also invincible so you could never win a fight with him. (I tried.)
  • Webdialog for a progressBar

    9
    0 Szavazatok
    9 Hozzászólások
    1k Megtekintések
    G
    Typically I do not use a progress bar. Instead I use Sketchup::set_status_text I'm happy using a counter with a modulus. I generally try to update the status no more than once every second or two. The same idea would work for a progress bar. All I was trying to do is give bomastudio a solution to his request and show him how to get around the problem of the web dialog being starved of cpu time. Without the timer loop you blow the bottom off the stack. With a timer loop you incur a performance penalty. The interesting thing is the jquery ready function would only fire after the heavy processing had finished.
  • Register_extension error

    5
    0 Szavazatok
    5 Hozzászólások
    850 Megtekintések
    D
    @tig said: If the RB is going to be encrypted use this: ext = SketchupExtension.new(extensionName, "greenspaceLive_gModeller/LiveEnergy-Classes/main") SketchUp automatically finds a matching file RB or RBS... You never mentioned that as a possible scenario... If you have other RB files encrypting in the subfolder[s], then also ensure you use: Sketchup::require(name_without_filetype_suffix) rather than ' load()'... This way the RB files load during testing AND the RBS files still work after the encryption... You have to plan ahead. : Thanks, that should be the only change I need. I was already using encryption but forgot that main.rb was excluded from the encryption on my local copy.
  • Active_path.last original transformation

    10
    0 Szavazatok
    10 Hozzászólások
    1k Megtekintések
    T
    It is good to do something else. When reading about model observers I have found the answer: Sketchup.active_model.edit_transform There is a mistake in the documentation though: @unknownuser said: ModelObserver.onActivePathChangedSketchUp 7.0+ ... When in "edit mode" (aka a Component is being edited), the Ruby API returns object transformations and locations in context of the "local" component axes instead of the global axes. It is other way round. In "edit mode" we are in global context. If one wants to have the local then use edit_transformation. When you want original transformations for the rest of instances then you have to go through the whole "tree" and use edit_transformation for the last group/component.
  • Determine if edge would split face

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    G
    Thanks guys - this gives me some good direction. I like Sam's strategy where he makes use of the raytest.
  • Moving a Line or Edge

    3
    0 Szavazatok
    3 Hozzászólások
    656 Megtekintések
    TIGT
    As Sam says, transformations only apply to containers like component-instances, groups and images. A Point3d does not have a transformation, BUT you can use point.transform!(transformation) it relocate it. Basic entity objects - like vertices, edges and faces - have to be transformed using: objects_parent_entities.transform_entities(a_transformation, [array_of_objects]) this works with any kind of transformation; or for a vector based 'translation': objects_parent_entities.transform_by_vectors([array_of_objects], [array_of_vectors]) note that each object in the first array must have a matching vector in the second array... Also if you are using the these to move say vertices, don't also include some edges or faces which use those vertices - otherwise the vector transformation will be done twice, with unexpected consequences...
  • SketchUp RUBY API Wishlist [way of coding wishes, please]

    107
    0 Szavazatok
    107 Hozzászólások
    43k Megtekintések
    R
    Hello, I am new to google sketchup with ruby script. I have install google sketchup on my linux machine ubuntu 12.04. now able to start with ruby script. i already have ruby script. SO anyone can help to how can i run this script with google sketchup. Thanks
  • UI.inputbox

    4
    0 Szavazatok
    4 Hozzászólások
    666 Megtekintések
    M
    I have "chained" 2 UI.inputbox. First inputbox opens another based on the input from the first box. The first box closes once the second is shown.
  • Sketchup.send_action arguments: Mac vs PC

    10
    0 Szavazatok
    10 Hozzászólások
    4k Megtekintések
    B
    This is an old thread, but I'm adding a tip here that may be of help to other developers who may discover this info... In an effort to create a toolbar button to show the "Entity Info" palette (there's a built-in button for Model Info, but oddly not for Entity Info), I couldn't find a method or action that worked on the Mac. There is a fixnum constant value for the PC, but these don't seem to work on the Mac, even after years of SketchUp evolution on the Mac. Then I stumbled on the get_shortcuts method... Using the "Shortcuts" pane within the "Preferences" window, you can add a shortcut to the command for which you need the string constant, then using: Sketchup.get_shortcuts.sort ...you can discover the string that can successfully be used with the Sketchup.send_action method. For example, I added the F2 key to "Window/Entity Info", and got the following output: Sketchup.get_shortcuts.sort ["A\tselectSelectionTool:", "B\tselectPaintTool:", "C\tselectCircleTool:", "E\tselectEraseTool:", "F\tviewZoomExtents:", "F2\tentityProperties:", "G\tmakeGroup:", "H\tselectDollyTool:", "K\ttoggleDisplayBackEdges:", "L\tselectLineTool:", "O\tselectOrbitTool:", "P\tselectPushPullTool:", "R\tselectRotateTool:", "S\tselectScaleTool:", "T\tselectMeasureTool:", "V\tselectMoveTool:", "Z\tselectZoomTool:", "`\ttoggleHideRestOfModel:", "~\ttoggleHideSimilarComponents:", "⇧G\t/Edit/Context Menu Flyout/Explode"] In there, you'll see "F2\tentityProperties:", so the string constant is "entityProperties:". Voila, a method to discover undocumented action strings.
  • SU7: Sketchup#set_status_text() broken on Mac

    4
    0 Szavazatok
    4 Hozzászólások
    871 Megtekintések
    SkalpS
    @adamb said: Anyone got any good ideas as to how to get around this bug in SU7? Basically, if you have a Ruby that is working hard and wants to show progress by updating the status text in the lower left, in SU7 on Mac its broken (bug logged SU-0282). Now I guess it will get fixed sometime, but in the meantime I'm trying to find a way of encouraging the window to refresh. A quick demo of what the bug is, is to run the following at the Ruby console: 5.times {Sketchup.set_status_text rand(); sleep 0.5} On PC, it updates the status text, on Mac it only shows the last one when the loop is completed. Any ideas gratefully received! Adam Adam, We have found a solution for this problem. If you put the actions inside a UI.timer, the set_status_text can be updated between the timers. Kind regards, Guy
  • Pickray

    2
    0 Szavazatok
    2 Hozzászólások
    793 Megtekintések
    thomthomT
    Maybe due to precision issue? Not sure, but you don't have to convert between screenpoints like that: mod = Sketchup.active_model view = mod.active_view ents = mod.entities ents.clear! edges = ents.add_edges([0, 0, 0] , [100, 100, 100]) edge = edges[0] pt1 = edge.start.position pt2 = view.camera.eye Geom.intersect_line_line(edge.line, [pt1, pt2])
  • Localization

    2
    0 Szavazatok
    2 Hozzászólások
    673 Megtekintések
    D
    I have recently been switching any of mine over to lang_handler... the main reason is concern over the new 'security' measures and where they will go next... I have a plugin that does most the hard work for you, but you still need to do some work... I'll PM it if you want... john
  • Changing Command Icons of the Toolbar

    19
    0 Szavazatok
    19 Hozzászólások
    3k Megtekintések
    M
    Thanks Anton, I was thinking, that I'm doing something wrong, but it seems that this behaviour is not changed yet.
  • Transform face to a known plane

    15
    0 Szavazatok
    15 Hozzászólások
    2k Megtekintések
    C
    @fredo6 said: > tr_axe_inv = Geom;;Transformation.axes(face.vertices[0].position, *(face.normal.axes)).inverse > Neat! Just saved fifteen lines of code in a script...
  • Webdialog losing focus in V16?

    7
    0 Szavazatok
    7 Hozzászólások
    896 Megtekintések
    K
    I think I have a fix for the textbox input losing focus. Just a few lines in the html/Javascript. In the body: <body onblur= go_focus();> And in the Javascript part: function go_focus(){ document.getElementById("textbox").focus(); } Doing a self.focus() or window.focus() doesn't seem to work. Edit: applying the same code to some more complex plugins doesn't seem to work...
  • Module-class

    7
    0 Szavazatok
    7 Hozzászólások
    770 Megtekintések
    M
    Mario, This might help (I reformatted your code a bit), see the last couple of lines -- # require 'sketchup.rb'   # why?  not needed for this code module McF3D   class McF3DTools      def initialize       @mod = Sketchup.active_model  # Open model       @ent = @mod.entities          # All entities in model       @sel = @mod.selection         # Current selection     end     def perceOuv       unless @sel[0].is_a?(Sketchup;;ComponentInstance) &&           @sel[0].definition.behavior.cuts_opening?         UI.messagebox "Sélectionnez un composant F3D !"       end       end    end # class McF3DTools end # module McF3D obj = McF3D;;McF3DTools.new() obj.perceOuv()   The topic of modules & classes in programming is very complex. Conversely, what most people writing a SketchUp extension need to do is a very small subset of that topic. HTH, Greg SUMD SketchUp Misc Docs
  • Enable Web Inspector in WebDialog on Mac

    9
    0 Szavazatok
    9 Hozzászólások
    2k Megtekintések
    TommyKT
    @driven said: Tommy, just set it as a global preference and it works for SU and Safari... defaults write NSGlobalDomain WebKitDeveloperExtras -bool true paste into Terminal or wrap in %x() from Ruby Console... john YES! IT WORKS! SO SIMPLE! THANK YOU!
  • SQLite in SketchUp Ruby

    17
    0 Szavazatok
    17 Hozzászólások
    4k Megtekintések
    D
    you can set the format for the output, so for a webDialog you can use... html = %x(/usr/bin/sqlite3 -html /private/tmp/sp500-data.sqlite "SELECT * FROM companies;") or there's -csv -list -line -column...
  • Creating a Solid with a set of points

    6
    0 Szavazatok
    6 Hozzászólások
    684 Megtekintések
    medeekM
    Wow, I need to come here more often. I'm going to look into the "intersect_with" method further and see if this might not be the key to overcoming this hurdle.

Advertisement