sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    ComponentReporter+.rb

    Scheduled Pinned Locked Moved Plugins
    6 Posts 2 Posters 980 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dedmin
      last edited by

      Hi TIG. Is it possible to generate just a name + Component Definition Description report with this plugin?

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        @dedmin said:

        Hi TIG. Is it possible to generate just a name + Component Definition Description report with this plugin?

        Yes - just edit it so that the .csv file it writes is limited to those two things... πŸ’­
        file.puts("DEFN-NAME,COUNT,DESCRIPTION,GUID\n\n") ###... file.puts(c[0]+","+c[1]+","+c[2]+","+c[3])
        returns DEFN-NAME, COUNT, DESCRIPTION, GUID
        so to limit it change it to
        file.puts("DEFN-NAME,DESCRIPTION\n\n") ###... file.puts(c[0]+","+c[2])
        So just those items in the array 'c' are added πŸ€“

        TIG

        1 Reply Last reply Reply Quote 0
        • D Offline
          dedmin
          last edited by

          Super - I deleted the other 2 reports and now have only what I need! Thanks, TIG!
          πŸ‘ πŸ‘ πŸ‘

          1 Reply Last reply Reply Quote 0
          • D Offline
            dedmin
            last edited by

            One more question - is it possible to report only components that don't have any nested components with this rubby?

            1 Reply Last reply Reply Quote 0
            • TIGT Online
              TIG Moderator
              last edited by

              @dedmin said:

              One more question - is it possible to report only components that don't have any nested components with this ruby?

              Not too easily... but if you make a list of definitions and then test their entities etc etc...

              model=Sketchup.active_model
              not_nested=[]
              model.definitions.each{|d|
                nested=false
                d.entities.each{|ee|
                  if ee.class==Sketchup;;ComponentInstance
                    nested=true
                    break
                  end#if
                }
                not_nested<< d if not nested
              }
              ### 'not_nested' is now an array of all definitions that don't contain a component instance...
              ### so now process this list...
              
              

              πŸ€“

              TIG

              1 Reply Last reply Reply Quote 0
              • D Offline
                dedmin
                last edited by

                It seems that even if I choose to apply the report on the selected components it reports all the components.

                http://screencast.com/t/MzBhMjZmMj

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement