šŸ¢ PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • (Windows) Plugins Locations

    5
    0 Votes
    5 Posts
    318 Views
    Dan RathbunD
    @thomthom said: @jim said: @dan rathbun said: User acces to the AppData folder heirarchy on Win 6+ is problematic. Reference? [Citation Needed] .. what for ? Just try it. I'm not saying there is not a solution. But you first need to recreate the situation. 1) Create a new (temporary,) user account on your Win7 machine called "JoeUser" or whatever. Do not give this new user account admin privileges. Just a standard user like in a work or school setting. 2) Now try and access the %APPDATA% path in Windows Explorer. (Heck.. even try it as an Admin,, it's still a PITB !)
  • Linux and Mac Virtual Key Codes

    2
    0 Votes
    2 Posts
    1k Views
    Dan RathbunD
    See these threads: My Apple Keyboard VK_KEYS onKeyDown repeat parameter problem Keyboard translation PC / Mac
  • Ruby rbconfig.rb

    2
    0 Votes
    2 Posts
    430 Views
    Dan RathbunD
    Should be the same, BUT the values of the Config::CONFIG hash attributes WILL DIFFER. The problem with the above statement is that rbconfig.rb is written by mkconfig.rb, (when the Ruby was built,) which may have itself changed over the various versions. Also, on Windows, some users install a one-click installer edition, that was not built on their own computer, and they may install it in a custom path, which may invalidate some of the values in the rbconfig.rb file. AND, only machines with a full Ruby install will have the rbconfig.rb file (in the platform subdir, of the Ruby lib dir.)
  • Model's save method, about chinese filename and path

    6
    0 Votes
    6 Posts
    476 Views
    O
    I would like to support chinese path as Sketchup's open_file method, model's save method why not support it?
  • Make A Component Using only Ruby code

    2
    0 Votes
    2 Posts
    299 Views
    J
    Hi Steve, You seem to have a grip on it for the most part. Instead of creating the geometry before creating the ComponentDefinition, you should create the Definition and then add entities to its Entities collection. You can use ComponentDefinition#save_as to save it out to disk. new_def = Sketchup.active_model.definitions.add("My Component") new_def.entities.add_face(...) new_def.save_as("C;/My Component.skp") model.entities.add_instance(new_def, [0,0,0])
  • Where to Store User Settings?

    29
    0 Votes
    29 Posts
    2k Views
    K
    @thomthom said: That would then not be User data - but Model data. Two very different things. Looks like I interpreted thread subject in a context of my own thoughts I mean, I was going to suggest to use template for storing user settings data. [image: EVA0_template.png] It is less elegant than just click "OK" button in "Settings" dialog of the plugin, of course But the user can save his own presets in template file, add description to it, then it will be possible to revert back to any previously saved configuration. UPD. The point is that I was thinking about abstract "application user" not the operating system user. Application means plugin here. So I thought that application (plugin) usually runs "system wide" (not in "per user mode") and the problem is what is the best way to persist application settings (i.e. user preferences *application user here again). Storing plugin settings right in document allows user preferences persistence across different machines and even across operating systems in theory (when I say "user" I mean plugin user). So user can take his *.skp file anywhere and continue working with it on any device that has SU and plugin and he does not have to care about configuring plugin again on each device.
  • How to do a crossing box select by ruby?

    6
    0 Votes
    6 Posts
    244 Views
    thomthomT
    You could perhaps do a simplified version and map the boundingbox of the groups to a cached array, then use Geom.point_in_polygon_2D to see if any of the points are within the selectionbox of your custom tool. It will miss the cases where a selectionbox crosses the group's boundingbox but the corner points are outside, but if you start to do intersection on all that you might very well end up with a sluggish tool. Might be good enough?
  • Undo stack question

    6
    0 Votes
    6 Posts
    276 Views
    Dan RathbunD
    You are correct ... ... a Layer is a subclass of Entity, so perhaps the EntityObserver might fire the onChangeEntity() callback. You'd have to try it. I do not know if it will work.
  • Unique identifier for model?

    9
    0 Votes
    9 Posts
    367 Views
    D
    Yes the problem comes when you have multiple SU processes running (I'm guessing users do this more on OSX because of the way windows are managed). So when the plugin starts and tries to delete tempfiles, there could be another SU using it. Hence the file lock.
  • SketchupExtension path question

    4
    0 Votes
    4 Posts
    218 Views
    D
    OK, thanks. Good to know.
  • JS - HTML error

    6
    0 Votes
    6 Posts
    170 Views
    Chris FullmerC
    Excellent, thanks Dan. It is working as expected, but I'm still very confused what the error was. This code works: id = "113" t = %Q^<form><input type="button" value="Click me!" id="#{id}" onclick="change_time(this.id)" /></form>^ But this one causes errors: id = "113" t = %Q^<form><input type="button" value="Click me!" onclick="change_time('#{id}')" /></form>^ As I've been playing with it over and over, it seems everytime I introduce the single quote into the function arguments, it crashes. But I'm doing it that was in other very similar onclick functions. Oh well, its beyond me. Thanks for helping everyone, I've got a wokring version now! Chris
  • Accessing Match Photo feature with the Ruby api

    4
    0 Votes
    4 Posts
    335 Views
    Dan RathbunD
    @jrudd said: Any idea what the make_pano_pm.rb file does? @unknownuser said: Creates a set of photo matched pages given a series of panoramic images. Also creates a box (using create_box) which makes it easier to start sketching over top of the images. In the last edition of CatchUp (#5), was a article entitled: "INTERIOR DESIGN how to make a look around background" (midway thru the zine, just after "MAYOR MIKEā€™S GADGETS" section.) http://78.47.159.221/CatchUp_5_2011_10.pdf
  • Import image with only front face visible.

    3
    0 Votes
    3 Posts
    155 Views
    J
    @tig said: Add the Image inside a new empty group group.entities rather than the model... Manipulate the Image size etc as desired Explode the Image. You now have a face inside the group.entities Find the face in the entities - there's only one. Leave the face.material as it is [i.e. the image now made into a texture]. Make face.back_material=nil to use the 'default back material' or say use face.back_material="Black" to make it 'black'... That did it! Genius, TIG!!
  • BoundingBox.depth. Accurate?

    4
    0 Votes
    4 Posts
    143 Views
    jolranJ
    Ah, thanks. Doing some tiling with thoose mesurements. Should be ok then.. @unknownuser said: The internal unit is converted to user units only in the UI That's why I got back different results in the ruby console when changing the Model precision. Maybe that goes for some other mesurement as well, havent just thought about it until now. @unknownuser said: When dealing with user units, make the Length class do the work for it. And make sure you know if your objects are Floats or Lengths. I'll try to stick to that.
  • Getting Ruby to work on Mac

    13
    0 Votes
    13 Posts
    561 Views
    D
    @dan rathbun said: If I was a Mac only user, I'd be raisin' hell... getting a petition going, or similar to get the Mac Sketchup Ruby updated (at least equal to that of the PC.) It would be nicer if both platforms were updated to the latest patch in the 1.8.7 trunk. I am in the process of raising hell to Google... @dan rathbun said: It would be beneficial if you could figure out a way, to install an additional frameworkized v1.8.7 Ruby beneath (alongside) the Sketchup obsolete Ruby, and then have a "switching" utility that allowed the user to change the symbolic links, to load the newer Ruby. Sigh... these convoluted workarounds are getting old. I think it will be resort to using shell commands instead of the Ruby libraries I need. Mac comes with curl and gzip, and I believe this will eliminate my need for stringio as well. Thank you for your input Dan. I will pass this on to Google.
  • ModelTranslation[X,Y,Z]

    4
    0 Votes
    4 Posts
    388 Views
    P
    I seem to have determined the units of the ModelTranslation values - inches. My problem now is to reset the z-axis of the model to make it easier to calculate elevations. For instance, I want to show the impact of a flood which reached a certain height. That height is given in AHD (Australian Height Datum) relative values. I presume that the location data elevations are also AHD-relative. I can represent a flood by drawing a rectangle centred on 0,0,0 and pulling the surface up to the height of the flood. The idea works well, apart from some apparent inaccuracies in the terrain data. However, it is far easier to simply pull the "water" to a given height in metres, than to convert the height to inches, subtract the Z translation in inches, then reconvert the difference to metres to calculate a level relative to 0,0,0 to pull to. Flood level
  • (solved)locked files

    7
    0 Votes
    7 Posts
    1k Views
    jolranJ
    OOPs There was a typo in my code. Now the comps are loading(hopefully). Forget the last post. Edit: Problem solved by saving components(like Dan said) in user/my documents/anyfolder. Then I can copy and paste from there.
  • Mac Toolbars Editable?

    15
    0 Votes
    15 Posts
    3k Views
    H
    @driven said: jim, thom you can edit the nibs on NSPanels, and I guess you could change the content if you know all the tool codes... [attachment=0:1e21rm0n]<!-- ia0 -->tool palettes .jpg<!-- ia0 -->[/attachment:1e21rm0n] john hi i want this can you show me how?
  • How to force IE 8 or 9?

    4
    0 Votes
    4 Posts
    193 Views
    thomthomT
    Yea, all kinds of stranges rules comes to play when an embedded webcontrol is used. ...and it's damn hard to find anything documented.
  • [C\C++] SketchUp window handle

    12
    0 Votes
    12 Posts
    823 Views
    thomthomT
    Here's a way that doesn't iterate every windows there is. It enumerates the windows of the calling thread. Cuts down the searching and ensure that you don't get the wrong window. win32_sketchup_window.rb

Advertisement