sketchucation logo sketchucation
    • Login
    1. Home
    2. jshal
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Groups 1

    jshal

    @jshal

    10
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    jshal Unfollow Follow
    registered-users

    Latest posts made by jshal

    • RE: [REQUEST] Convert single instance components to groups

      Wow, TIG, you have saved my day(s) ๐Ÿ˜„ Big thanks!

      posted in Plugins
      J
      jshal
    • [REQUEST] Convert single instance components to groups

      I was looking for quite while searching for the following problem:

      Importing (Revit) DWG data into Sketchup creates a lot of single instance components. The trouble is that when copying multiple of these files together that Sketchup slows down to a crawl because it is trying to match components that are similar. Usually I end up with sketchup files with hundreds of single component instances. Sketchup works faster when these single instances are in fact groups, making copying between sketchup files way faster. Normally I explode the selected instance and group these again, but with hundreds of these, this is too cumbersome.

      So what I need is the following:

      1. select all single instance components within my current SketchUp file (or current selection)
      2. convert these to standard groups

      I think this is quite useful for anybody working with imported files and want to keep on working quick.

      For number 2) I found the following code snippet from sdmitch (https://sketchucation.com/forums/viewtopic.php?f=323&t=17590&p=140679&hilit=single+instance+component#p623006)

      
      @mod = Sketchup.active_model
      @ent = @mod.active_entities
      @sel = @mod.selection
      @vue = @mod.active_view
      cmps = @sel.grep(Sketchup;;ComponentInstance)
      cmps.each{|ci|
       grp = @ent.add_group(ci)
       grp.name = ci.definition.name
       ci.explode
      }
      @mod.definitions.purge_unused
      
      

      [highlight=#ffffbf:39rhwwt6]Does anybody know how to realize part 1?[/highlight:39rhwwt6]

      Thanks in advance!

      posted in Plugins
      J
      jshal
    • Dynamic Compont Ceiling Error?

      I have a problem creating a simple dynamic component. It is a square, where the user enters the square meters of this square. The X-value can be changed manually, so that the Y-value changes accordingly. The units in the model are in meters.

      Size
      LenX=ceiling(current("LenX"),30)
      LenY=ceiling(Area*10000/LenX,30)

      Behaviors
      ScaleTool: Scale along red. (X)
      Custom
      Area (User imput in m^2), Units:Text, Users can edit as an textbox, Display in: Whole Number

      The problem is that with the scale tool, the final X-value changes randomly.
      When I remove LenX=ceiling(current("LenX"),30), the square behaves normally, but I want the X and Y value incremental every 300mm. Does anybody have a solution? TIA!

      See model: http://jshal.site88.net/wp-content/uploads/2009/07/dc_room.skp

      posted in Dynamic Components sketchup
      J
      jshal