sketchucation logo sketchucation
    • Login
    1. Home
    2. MrMitchell
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 10
    • Groups 1

    MrMitchell

    @MrMitchell

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

    MrMitchell Unfollow Follow
    registered-users

    Latest posts made by MrMitchell

    • RE: [Plugin] Display Latitude & Longitude

      Awesome tool, can you make the text extractable from the dialogue box that is generated so that we don't need to run it through an online extractor?

      Thanks again!

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: Save Components as separate files

      Great, I should have PM'd you my feedback on the TIG-export_SKP_by_definition, let me know if it didn't go through and I'll post it here.

      posted in SketchUp Discussions
      MrMitchellM
      MrMitchell
    • RE: Save Components as separate files

      @tig said:

      You can export all component definitions with a simple one-liner.
      Of course it could be made more sophisticated, but here it is...

      m=Sketchup.active_model;puts p=File.dirname(m.path);m.definitions.each{|d|next if d.group? || d.image?;puts n=d.name.gsub(/[\/\\;<>"|\*\?]/,'_')+'.skp';d.save_as(File.join(p,n))};puts
      

      Copy+Paste it into the Ruby Console + <enter>.

      It processes every Component Definition [even nested ones] in the Model, it skips Groups and Images.
      It prints the path to the saved files [the Model's path folder].
      It prints out the names of the individual SKP files as it processes them...
      Note how any characters that might be acceptable in a component's name, but which will be unacceptable in a file-path [e.g. ':'] are replaced by a '_'...

      Can you modify this to specify a specific version of SKP to save as (I think it may be a workaround for the lvl to skp?)

      posted in SketchUp Discussions
      MrMitchellM
      MrMitchell
    • RE: [Plugin] TIG-export_SKP_by_layer.rb

      TIG, still getting problems here. On more complex production files, the routine ends up bogging down hard, prompting the option to abort the script. On "nested" layers geometry is butchered so that solids are not retained, only bringing in line segments. At least named components in layers do work. I am attaching a "simple complex" file that does work as far as finishing the routine, however, on a large scale file, the process bogs down to untenable, and I have yet to sit through a full cycle of the script running...


      "Simple Complex" base file


      Broken Nested Layer file

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] TIG-export_SKP_by_layer.rb

      I'm currently troubleshooting things on my end as well, I simplified the model by removing all instances of components, nested layers inside components and groups (not ideal, but workable; ideally I could keep a "window" component that is LayerWhatever but have SKP-GLASS and SKP-WINDOWS inside so that if I change one instance of windows in the model, they all update as well...) until I explore more, I can at least have glass groups on SKP-GLASS... I am going to try out 2.1, and start slowly adding complexity again until I break it, but what I also did that seemed to help the most (oddly) was remove all ifc tags, group names, and component definitions? I am attaching the SKP2RVT2 working file below.

      One thing I did notice was that for whatever reason in Revit, whenever I brought in the linked SKP, the other layers were still being pulled in (SKP_FLOORS had SKP_DOORS, WINDOWS, etc.) at least on the first linking if I did not choose specify layers to link inside Revit, again, not a problem, I just make sure to only bring in the layers associated with the link, just more FYI.

      I will play around with this all tonight.


      WORKING SKP2RVT2

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] TIG-export_SKP_by_layer.rb

      So, everything is working beautifully on the simpler SKP2RVT file, but something is happening where the more complex SKP2RVT2 file is crashing Sketchup and aborting the process after the Layer0 begins to save. I am attaching both files below.


      Broken File


      Working File

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] TIG-export_SKP_by_layer.rb

      Tig,

      Just a quick question regarding your Layers to SKP plugin:

      I have been searching for some ways to get SKP into Revit, and have a couple workflows that I am able to use well currently, however I am trying to just find some quick optimizations and found your old plugin! I am currently using SKP Pro 2015, and just tried your script and this is what the ruby console spat back at me:

      TIG.export_SKP_by_layer

      Exporting from...
      //Mac/Home/Desktop/SKP2RVT/RVT2SKP.skp
      as

      //Mac/Home/Desktop/SKP2RVT/RVT2SKP-Layer0.skp
      Error: #<TypeError: reference to deleted Layers>
      C:/Users//AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/TIG-export_SKP_by_layer.rb:43:in purge_unused' C:/Users/*****/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/TIG-export_SKP_by_layer.rb:43:in block in export_SKP_by_layer'
      C:/Users/
      /AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/TIG-export_SKP_by_layer.rb:40:in each' C:/Users/*****/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/TIG-export_SKP_by_layer.rb:40:in export_SKP_by_layer'
      <main>:in <main>' SketchUp:1:in eval'

      I am using a Mac Laptop with Windows 10 on Parallels if that info helps at all? Anyway, it just creates the first "RVT2SKP-Layer0.skp" file and then stops... I am wondering what is going wrong?

      If we can get past this hurdle, one feature I have been looking for in this whole deal is to make sure that whatever files are saved, are saved in SKP8 format 😮

      Let me know if you can see where I am erring...
      Thanks!

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] Material Replacer

      None of the files work. Even when I attempted to recover the files using Time Machine, the restored files still were treated like the corrupted files currently in the folder. Here are the recovered files, from the previous evening in case you want to try and poke at them...


      14016 Salter.skp


      14016 Salter~.skp

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] Material Replacer

      Here are the corrupted files. Thankfully I had exported the file as an .obj to render and was able to convert the .obj to a .dae and recomponantize the model back in sketchup... but still... pretty scary.


      14016 Salter.skp


      AutoSave_14016 Salter.skp


      14016 Salter~.skp

      posted in Plugins
      MrMitchellM
      MrMitchell
    • RE: [Plugin] Material Replacer

      I have been exploring the Thea for Sketchup latest build on my Mac at work using SketchupPro2014 and was just playing around with the Thea Materials and Material Replacer this morning and think I have run into a serious problem.

      I had just added some of the default materials from the Thea library to the sketchup material library and had applied them to some of the components I had been working with earlier.

      I had applied the materials to the whole components instead of the faces of the components on some, while going inside of the components and adding the materials directly to the faces of the objects on others.

      I then drew a rectangular plane next to the models to pull the default material color from.

      Next I successfully used the material replacer to replace the materials applied to the components as a whole from their Thea Material (which was one of the default wood materials) back to the default white/blue sketchup material from the rectangular plane I was pulling from.

      However when I attempted to replace the materials inside of the components where the faces had been directly painted (using the example 01.mat.thea inside the displacement folder in the Thea Material Library) sketchup hung up.

      I force quit the program expecting to simply reopen the file, or at least even an earlier version of the file, but to no avail. All I get now when trying to open the file is this error message
      http://i.imgur.com/R10bA0S.png

      I even used Time Machine, which pulled versions of the files created earlier... same problem... Could you please shed some light as to how this problem could have occurred, or how I might be able to recover my files?

      -Thanks

      posted in Plugins
      MrMitchellM
      MrMitchell