🚨 Skimp | 25% Off until March 30 Buy Now

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
  • Does anyone know of a Ruby that saves your shortcuts

    17
    0 Szavazatok
    17 Hozzászólások
    1k Megtekintések
    TIGT
    Simply exporting them to file - say 'myshortcuts.dat' makes a list as a text file thus. [Accelerators] Count=64 0 0 0 Space selectSelectionTool: 0 0 0 L selectLineTool: 0 0 0 E selectEraseTool: 0 0 0 C selectCircleTool: 0 0 0 A selectArcTool: 0 0 0 M selectMoveTool: ... The 0 0 0 fields represents modifier keys Ctrl/Alt/Shift, so 0 0 0 H editHide: 0 0 1 H Edit/Unhide/All ###shift This is used to Import your setting in the Preferences window. To ensure that they over-write any pre-existing ones you really need to edit the Windows Registry [ - be verycareful!]... HKEY_CURRENT_USER\Software\Google\Sketchup7\Settings Num_Shortcuts = REG_DWORD = 64 [or total of list length] Shortcut_1 = REG_SZ = "0 0 0 Space selectSelectionTool:" Shortcut_2 = REG_SZ = "0 0 0 L selectLineTool:" etc... You would 'empty' the 'Settings' prior to re-importing new ones ? Don't try this unless you know what you are doing... else= If you did then you could [with SUp closed] use a batch file to clear the Registry's '...\Settings' entries and then use those saved in the 'myshortcuts.dat' etc to remake those entries to suit... An alternative way to get a list of shortcuts is using the Ruby Console command: myshortcuts_array=Sketchup.get_shortcuts which returns an array of tab delimited shortcuts - e.g. ["Ctrl+A\tEdit/Select All", "Ctrl+C\tEdit/Copy", ...] You could manipulate each entry in that array and puts it into an external file [ myshortcuts_file="...\\myshortcuts.dat" ?] - this is equivalent to Exporting your current shortcut settings from Preferences - e.g. "Ctrl+A\tEdit/Select All" >>becomes***>> "1 0 0 A Edit/Select All" ###becomes 'simplied' - the testing and pattern matching is 'cod' here == it's NOT real code ! text=myshortcuts_array[i] ctrl = "1 " if text.includes "Ctrl" else ctrl = "0 " alt = "1 " if text.includes "Alt" else alt = "0 " shift = "1 " if text.includes "Shift" else shift = "0 " key = text.split("+")[1].split("\t")[0] command = " " + text.split("+")[1].split("\t")[1] line = ctrl+alt+shift+key+command myshortcuts_file.puts(line) ### You could make the script auto-run on close and always keep a list of your current shortcuts ? You could then reimport them as desired using Preferences/Import or using a Registry batch-file lash-up... Hope there're a few ideas there...
  • Chrome for Debugging

    5
    0 Szavazatok
    5 Hozzászólások
    328 Megtekintések
    C
    Check out Firebug lite. http://getfirebug.com/lite.html It works for IE and Safari. All you have to do to debug your Webdialogs is add this line to your HTML: <script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
  • Plugin won't load (&quot;Stack Level Too Deep&quot;)

    3
    0 Szavazatok
    3 Hozzászólások
    559 Megtekintések
    thomthomT
    http://forums.sketchucation.com/viewtopic.php?f=180&t=15585
  • Startup doesn't startup

    5
    0 Szavazatok
    5 Hozzászólások
    402 Megtekintések
    R
    I have also noticed a problem with SelectAtStartup when launching SU - it works, but is apparently overwritten by something either internal to SU or another ruby (haven't tested it yet). However, it still works when opening a file or starting a new model.
  • Entity Info Plug In for Face Area

    2
    0 Szavazatok
    2 Hozzászólások
    294 Megtekintések
    TIGT
    @dean arnold said: Looking for a routine to extract "Entity Info" "such as "Face" "Area" for all entities from a "Layer" of a SketchUp model into a csv, xls or any other file type - an "Entity Info" dump. Some method whereby the numeric and alpha data from a SketchUp model could be imported into a spreadsheet for further analysis. Any information will be a help. I use the free version of SketchUp. I am new to Ruby, but I understand a Ruby Plugin may be a method to accomplish this extraction. Look for ComponentReporter++.rb - this has several examples...
  • Conventions for Output Code

    15
    0 Szavazatok
    15 Hozzászólások
    1k Megtekintések
    thomthomT
    hm.. that's interesting. Haven't paid much attention to HTML5 the last few months. @martinrinehart said: But we wander. Back to my original question.. Ah, yea. The topic! Sorry, I often stray away and webdev is one of my major interests so I stray even quicker and further when that topic is even remotely related. @martinrinehart said: As browsers are more predictable in standards mode than quirks mode, Ruby-generated HTML should include a doctype and should be valid for its doctype. Agree. Since webdialogs must run under the webkit engine and IE the best chance for platform compatibility is following the W3C standards. When I make webdialogs I do the same as I do when I develop websites. I code to the standards, then to account for IE notoriously bad handling of the standards I add some conditional comments that adds CSS and JS fixes. Most of the time visual quirks in IE is by triggering hasLayout For better legibility and re-usability, separate CSS and JS their own respective files. Using HTML validators to detect correct markup is very important. Once a document is invalid there's no way to predict how the different rendering engines will recover and you can not expect cross platform compatibility. I'm starting to realise that there hasn't been posted any recommendations of best practices when it comes to webdialogs. Coming from a webdesign background I haven't given it much thought.
  • Trying to improve the speed of a simple script

    7
    0 Szavazatok
    7 Hozzászólások
    516 Megtekintések
    thomthomT
    Did you try to use PolygonMesh?
  • [Need help]How to add several rb_files to a sub_menu

    3
    0 Szavazatok
    3 Hozzászólások
    373 Megtekintések
    W
    Thank you! I tested it.As what you say ,when sketchup initialize , my rb files can add themself to the same submenu.
  • Alternate Class Reference TOC

    3
    0 Szavazatok
    3 Hozzászólások
    228 Megtekintések
    Chris FullmerC
    I like that too Martin, thanks! Good to see you around the forums again, Chris
  • (REQ) Different (2-4 or more) Viewports

    2
    0 Szavazatok
    2 Hozzászólások
    476 Megtekintések
    Chris FullmerC
    Nope, that is not possible in SU at this point, and I've never heard of any plan to implement it. Chris
  • Switch to scene by ruby script

    8
    0 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    N
    Thanks for good explanation. I see, I told not clearly, to type the only one script line in the ruby console.
  • Changing the orientation and position of the axis?

    3
    0 Szavazatok
    3 Hozzászólások
    368 Megtekintések
    Didier BurD
    Hi Laura, Applying a transformation to geometry is available for groups and components. If your user rectangle is not a group or component, you'll have to retrieve what the user did exactly (translation, rotation) with its rectangle. That's not simple IMHO. If at first you make a group with the rectangle, then let the user translate/rotate it, it's really easy to draw openings in the rectangle because you can retrieve the group transformation and then draw your openings at origin and then apply the transformation to them, or each time you calculate a point of an opening boundary, apply the transformation to it: # Create the group; group=Sketchup.active_model.entities.add_group() # Draw the user rectangle here and let him translate/rotate it ... # get the group transformation; trans=group.transformation # Apply the transformation to a point of an opening; point.transform!(trans) # Explode the group if neede at the end of the draw; group.explode Hope this helps,
  • [Info/Request] Sections division

    3
    0 Szavazatok
    3 Hozzászólások
    301 Megtekintések
    C
    Yes, this is very simple. You can probably do it more complicated, like doing any number of sections on any 3d shape and the division of each section at the same time, choosing the degrees, etc. Or may be pie charts from xml or tabulated text document...
  • [Code] layers.purge_unused

    18
    0 Szavazatok
    18 Hozzászólások
    3k Megtekintések
    chrisglasierC
    Thanks all. I need to rethink this before asking people to venture further down a blind alley. I can reduce a Sketchup up model to two plain text lists. One lists components and groups and the other lists scenes. Both lists are turned into javascript multi-level arrays. But I don't want to wipe out any established relationships between components and layers, layers and scenes, scenes and styles and scenes and property settings. I thought I could do that by manipulating the model but I am thinking it is probably better to capture the data and regenerate the whole thing. If you are interested in why I want to do this please see the discussion in the Modelur thread. Thanks and regards Chris
  • Problem with Observers

    4
    0 Szavazatok
    4 Hozzászólások
    298 Megtekintések
    C
    thanks for the quick replies. after reading the articles, I tried to use a selection observer, but there seems to be some "gotchas" with it. for example, if you manually select something, it won't trigger the "onSelectionAdd" event, but if it is automatically selected, then it will. any ideas?
  • Compile Ruby code?

    8
    0 Szavazatok
    8 Hozzászólások
    808 Megtekintések
    T
    @unknownuser said: take a look at http://www.rubyinside.com/how-to-create-a-ruby-extension-in-c-in-under-5-minutes-100.html I am on completely unknown territory and have stopped on the 'make' command. I presume it is the command responsible for compiling the C code with the makefile created in a previous step. I would like to recreate the MyTest in VC++ 2008 Express Edition... and I am lost. I will dig through internet to understand the whole process, but if someone can explain me in few words how to compile the example with VC++2008 will be thankful. Tomasz
  • Need good Ruby scripter

    12
    0 Szavazatok
    12 Hozzászólások
    782 Megtekintések
    thomthomT
    Though, for these border cases, I have found that restarting SU help. Probably frees up a little extra memory. And some times I have more luck by exporting to BMP. I assume BMP works better because it's uncompressed so less processing is required.
  • Max number of plugins?

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    thomthomT
    I might have to reconsider my latest version of Selections Toys that add Select Deselect menu items for each layer in the model... Or at least put a cap limit to it for those models that contains an obscene amount of layers.
  • Project: Floating Input Box (for developers)

    7
    0 Szavazatok
    7 Hozzászólások
    563 Megtekintések
    J
    @whaat said: Have you released the code yet? I thought I did, but I guess I haven't. I will review it and let you know where it is. @thomthom said: I don't find the UI.input class to be that user friendly. It doesn't scale well when you start adding more elements. @whaat said: One of my goals is to make the interface as similar as possible to the existing UI.inputbox class, thus increasing the liklihood that it will be used. Simplicity of use by the script-writer was my primary goal for creating my inputbox class - I could never remember how to construct a dropdown. So I made a single method to add a prompt - named 'add'. Then inputbox creates the appropriate type of input based on the arguments given. Have a look at the example code on the inputbox page. it shows how it turns an Array into a dropdown automatically, amongst other features.
  • Lost sketchup.rb

    6
    0 Szavazatok
    6 Hozzászólások
    670 Megtekintések
    M
    @jim said: Hi Martin, You don't need to re-install - I'm sure this is just a configuration issue. First, IRB and sketchup.rb do not mix. Stupid me! That was the whole problem. Thanks!

Advertisement