ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • No output text on Windows 7 system command

    4
    0 Votes
    4 Posts
    2k Views
    M
    Jiva, It's complicated. I started using Ruby years ago with SketchUp. Been away from SketchUp for while, but I'm still using Ruby. As I recall, the files get split into two locations, you have to edit the SketchUp.exe file, etc. I've also been building Ruby for quite a while, so the files I used were my own and built with current compilers & toolchains. With SU 2017, it can only run with Ruby 2.3 due to the changes that occurred in Ruby 2.4. There may be a publicly available build of Ruby 2.3 in the (hopefully near) future...
  • DOC MULTIPLE REFERENCE MODELS

    4
    0 Votes
    4 Posts
    1k Views
    jujuJ
    Sorry, I'm struggling to understand what you're getting to, I won't be able to help you. Please be sure to update your profile (it is currently showing you're working on SU7), this will help others in assisting you.
  • SketchUp Update Broke the Foundation Plugin

    8
    0 Votes
    8 Posts
    2k Views
    Dan RathbunD
    Or single object extension via mixin module (as shown above.) unless bb.extend(BB_Volume).volume == 0.0 # do code here end Or if only supporting Ruby 2.x+ SketchUp versions, you can use class refinements that are only active within your files. See: http://ruby-doc.org/core-2.0.0/doc/syntax/refinements_rdoc.html
  • Ruby not returning correct dimensions

    4
    0 Votes
    4 Posts
    1k Views
    TIGT
    You have found your own solution.
  • Extension Licensing System

    4
    0 Votes
    4 Posts
    1k Views
    michaelwhksgM
    Thanks a lot, Rich. Will send a PM to him.
  • Extension Signing

    11
    0 Votes
    11 Posts
    7k Views
    G
    My CabMaker rbz is quite large, just over 20 megabytes. I often get a Browser time out - however if I wait a bit and then reopen the portal the message that I can download the extension is there. I then check the rbz for rbe files and rb files. If only the 1 rb file and lots of rbe then I am satisfied. Finally I install the plugin and test it out. The reason for the large size is the manual is almost 8 megs (180 pages with lots of images) Also my context sensitive help folder has 360 png files and is now over 6 megs. I use a batch file that backs up my rb files into the proper version numbered folder and creates the rbz package for the portal. The batch file also moves my testing configuration out of the plugin and moves it back after the package is complete. I also simplify things by using a public area for my plugins. This area is accessible by all versions of Sketchup from SU 7 all the way to SU 2017. require 'sketchup.rb' require_all('c:/users/public/documents/sketchup')
  • Delete a list of components by their definitions.

    24
    0 Votes
    24 Posts
    4k Views
    TNTDAVIDT
    **I can not understand why the texture applied to "TOTO" is purged. If I go through "purge_unused" the texture "TOTO" is not deleted. So I'll get around the problem with another method. To delete a list of materials, I can write this: mat_names = ['TOTO','LOLA','CUBE'] materials = Sketchup.active_model.materials mat_names.each{|mnj| materials.remove(mnj)} Can we do the same with "purge_unused", so that the unused materials of the list are deleted? Thank you for your help.**
  • Pass array to a c/c++ ruby extension

    6
    0 Votes
    6 Posts
    2k Views
    Dan RathbunD
    Never could understand SWIG much. Cryptic interface language. If you intended to write a library that needs interfaces in multiple scripting languages, then SWIG might lessen the workload. Or if you are wanting a Ruby interface for some library already written that has SWIG interface files, then again I can see using SWIG. But for an extension that will be written specifically for SketchUp, since it only uses Ruby, I cannot see much use for SWIG. https://en.wikipedia.org/wiki/SWIG http://www.swig.org/tutorial.html http://www.swig.org/
  • Multi-Point Tool

    2
    0 Votes
    2 Posts
    1k Views
    Dan RathbunD
    @medeek said: What I would like to do is make it possible to hold down the control key or some other key while selecting the point to position the footing, thereby the allowing the user to select multiple points. (As said also in the other forum...) The convention for SketchUp is that the CTRL key acts as a toggle in and out of copy mode. (This is why the API defines the constants as COPY_MODIFIER_KEY and COPY_MODIFIER_MASK. Examine how the SelectionTool switches in and out of add or subtract mode, and the cursor changes to show + or - satellite icons. Or the MoveTool, ... etc. Also see this other thread here at SCF: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=67837#p621579 You'll need to decide how to let the user tell the tool when they are done picking points. Another convention is that the ESC key resets the tool to it's initial state, or cancels the current state. (See the onCancel callback.) The ENTER is another way, detected via a onReturn or onKeyUp callback.
  • Application Development Exploding Component Instances

    16
    0 Votes
    16 Posts
    3k Views
    TNTDAVIDT
    The loading time decreased from 2 minutes to 4 seconds. Thanks Driven
  • Knowing the ComponentInstance a DimensionLinear is attached

    5
    0 Votes
    5 Posts
    1k Views
    TIGT
    Until it's fixed how about a clunky and convoluted workaround ? If the pa=dim.start[0].parent is a component-definition then you need to see if there is pa.instances[1] if not then the one instance is the answer. If there are more than one instance you need to iterate those, and assemble a list of their transformation.origin positions [ensuring the transformation steps back to match the dim's parent's and of course takes into account any instance scaling etc...] - let's call that 'pvs'. The pt=dim.start[0] gives you a point inside the definition. You have ps=dim.start[1] as the point of the dim in 3d space. Transform the 'pvs' inversely and compare that point with ps, if they match then you could have a hit. Of course two or more instances where some are rotated or flipped so that vertex is coincident in 3d returns two or more 'hit' points, so it'd not be possible to determine the attachment that way... So, it's better if it worked like it should !!!
  • Indigo Renderer + Sketchup plugin developer

    7
    0 Votes
    7 Posts
    3k Views
    I
    Hi all, we're still looking for a SketchUp developer to work on our plugin! Please get in touch with us at contact@indigorenderer.com if you're interested. Kind regards, The Indigo team
  • Weird DimensionLinear behavior

    5
    0 Votes
    5 Posts
    2k Views
    Dan RathbunD
    @ittayd said: Thanks, I'm asking about ways to interact with the text: getting, setting. No this is not what you asked! Such a simple thing (as what method's a class has) can be easily found by looking at the API dictionary. http://ruby.sketchup.com/Sketchup/DimensionLinear.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Dimension.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Drawingelement.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Entity.html ... which is a subclass of (and therefore inherits methods from http://ruby-doc.org/core-2.2.4/Object.html You asked about dims nested inside transformed instances. I am not sure if the .text getter will return transformed lengths or not. Also not sure what happens when the context is open and not. So test. The means I showed above avoids the conversion of text ( String) into a numeric ( Length) object, and just gets the length.
  • Bounds change depending on active context?

    5
    0 Votes
    5 Posts
    2k Views
    Dan RathbunD
    @ittayd said: And, I wouldn't mind the coordinates changing if contains? would have acted sanely, always returning true to a point that is inside the group BoundingBoxes are always aligned with the model's axes. This means if you rotate a cuboid instance, it's bounding box will increase. The second thing you need to realize is that bounding boxes have an untransformed state (ie, the definition's entities bounds,) and each of their instances transformed bounds. The transformed bounds are not just translational, they can also be affected by the rotation and scaling of the instance. @ittayd said: I would expect the coordinates to never change no matter what entity is opened. As a coder, most of time when generating geometry, you are just working in the definition's local coordinates with the IDENTITY transform, (ie, everything is 1:1 and you're specifying geometry oriented in relation to the definition's local origin and axes.) But when the user double-clicks into an instance, that might be rotated or scaled (transparently they are actually editing the definition,) but perhaps not at the 1:1 scale. Imagine an instance that has been scaled 2x. The user would be drawing edges that are twice as long on the screen. So their needs to be some transforming back to the definition's scale and coordinates. Julia wrote a really good explanation of this recently (ie past few months.) Need to find this and give you the link.
  • Mass material importer

    14
    0 Votes
    14 Posts
    10k Views
    C
    Thanks a lot guys for the tips ! the script work fine. But really no one have any idea how to batch-adjust the tiling of the material ? Other ways it will take me days to manually adjust each one of them (I have like 500 skm tu adjust)
  • Ruby Group Copy - Regardless of Context?

    6
    0 Votes
    6 Posts
    2k Views
    H
    Thank you Dan!
  • Flags parameter in a tool's onKeyDown/Up

    12
    0 Votes
    12 Posts
    3k Views
    Dan RathbunD
    Ah okay, 3 years and two months ago, Fredo was noticing these same issues in the following topic thread: onKeyDown: getting the charcater value from key In that thread, post # 9, I noted several other related topic threads, and the one that I just remembered by Jim Foltz, which was back in 2009. flags on onKeyDown? (Note that at this time Chris Fullmer was not yet a member of the SketchUp Team, and had not yet learned much programming.) See other related threads: My Apple Keyboard VK_KEYS very difficult key codes! keycodes intelmac Jim's KeyTool.rb is also posted in this topic thread, but not sure if it is the latest version ? Key sequence in ruby Now, @Anton_S posted a Windows only method that calls Windows API C functions, in this post: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=57450%26amp;p=522915%26amp;hilit=keytest#p522915
  • Get mac address in ruby

    8
    0 Votes
    8 Posts
    2k Views
    B
    Thanks that works
  • Axes question

    8
    0 Votes
    8 Posts
    2k Views
    PixeroP
    Thanks for the info.
  • Handling advanced selection in a tool

    4
    0 Votes
    4 Posts
    1k Views
    Dan RathbunD
    @ittayd said: Is there a way to utilize sketchup's own selection tool? The only way is to attach a SelectionObserver, activate SketchUp's native SelectTool Sketchup.active_model.select_tool(nil), collect the object references, detach the observer, and activate your tool. But trying to leverage native tools via code has been problematic in the past. So, this is why they finally added (SU2016) the two window pick methods to the PickHelper class. ThomThom wrote a tutorial and created a graphic helper chart for using this class. http://www.thomthom.net/thoughts/2013/01/pickhelper-a-visual-guide/ Other than that, you best learn by reading the example extension by the SketchUp Team (EW) or others like ThomThom's plugins.

Advertisement