sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    DC Report

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    5 Posts 2 Posters 2.7k 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.
    • Phillip HP Offline
      Phillip H
      last edited by

      Does anyone know? Is there anyway to get a report of the formulas in a DC? Obviously the native SU report generator (File>Generate Report...) only reports values, not formulas. Perhaps there is a plugin that might work?

      HP EliteBook 8440p Intel® Dual Core™ i7 M620@ 2.67 4GB RAM
      NVIDIA NVS 3100, 512 MB
      Windows® 8.1 64 bit
      SketchUp Pro 2015 version 15.3.331 64-bit

      1 Reply Last reply Reply Quote 0
      • G Offline
        Garry K
        last edited by

        I run this code on one of my doors

        ` model = Sketchup.active_model
        definitions = model.definitions

        definitions.each{ |defs|
        dicts = defs.attribute_dictionaries()
        next if dicts == nil

        dicts.each{ |dict|
        next if dict.name != 'dynamic_attributes'
        puts '', "dictionary: #{dict.name}, definition #{defs.name}"
        dict.each_pair{ |key, value|
        puts "key: #{key}, value: #{value}"
        }
        }
        }`

        dictionary: dynamic_attributes, definition 96 mm Wire Pull
        key: _description_label, value: Description
        key: _formatversion, value: 1.0
        key: _has_movetool_behaviors, value: 0.0
        key: _lastmodified, value: 2014-03-13 08:29
        key: _lengthunits, value: CENTIMETERS
        key: _name, value: 96 mm Wire Pull
        key: description, value: Cabinet Pull for 96 mm drilling

        dictionary: dynamic_attributes, definition Door#1
        key: _lengthunits, value: CENTIMETERS
        key: _rotz_formula, value: angle
        key: angle, value: 0
        key: lenx, value: 40.0
        key: leny, value: 76.8
        key: lenz, value: 4.6
        key: name, value: Door#1
        key: onclick, value: animate("angle", 0, 120.0)

        1 Reply Last reply Reply Quote 0
        • Phillip HP Offline
          Phillip H
          last edited by

          @garry k said:

          I run this code on one of my doors

          ` model = Sketchup.active_model
          definitions = model.definitions

          definitions.each{ |defs|
          dicts = defs.attribute_dictionaries()
          next if dicts == nil

          dicts.each{ |dict|
          next if dict.name != 'dynamic_attributes'
          puts '', "dictionary: #{dict.name}, definition #{defs.name}"
          dict.each_pair{ |key, value|
          puts "key: #{key}, value: #{value}"
          }
          }
          }`

          dictionary: dynamic_attributes, definition 96 mm Wire Pull
          key: _description_label, value: Description
          key: _formatversion, value: 1.0
          key: _has_movetool_behaviors, value: 0.0
          key: _lastmodified, value: 2014-03-13 08:29
          key: _lengthunits, value: CENTIMETERS
          key: _name, value: 96 mm Wire Pull
          key: description, value: Cabinet Pull for 96 mm drilling

          dictionary: dynamic_attributes, definition Door#1
          key: _lengthunits, value: CENTIMETERS
          key: _rotz_formula, value: angle
          key: angle, value: 0
          key: lenx, value: 40.0
          key: leny, value: 76.8
          key: lenz, value: 4.6
          key: name, value: Door#1
          key: onclick, value: animate("angle", 0, 120.0)
          Garry, thank you. You are a lifesaver. This would make a nice little plugin. You should at least consider posting this in 'Code Snippets' in the developers forum. I'm sure it would be appreciated. 👍

          HP EliteBook 8440p Intel® Dual Core™ i7 M620@ 2.67 4GB RAM
          NVIDIA NVS 3100, 512 MB
          Windows® 8.1 64 bit
          SketchUp Pro 2015 version 15.3.331 64-bit

          1 Reply Last reply Reply Quote 0
          • G Offline
            Garry K
            last edited by

            Thanks Philip - my latest plugin is over 8000 lines of code.
            By comparison this just seems like an exercise.

            I saw your post and then I put threw this together from scratch.
            What I should say is this only works for component definitions which is what DC's are all about.
            You might want to also look at other dictionaries.

            1 Reply Last reply Reply Quote 0
            • Phillip HP Offline
              Phillip H
              last edited by

              @garry k said:

              Thanks Philip - my latest plugin is over 8000 lines of code.
              By comparison this just seems like an exercise.

              I saw your post and then I put threw this together from scratch.
              What I should say is this only works for component definitions which is what DC's are all about.
              You might want to also look at other dictionaries.

              Garry, you are too modest. Not taking away from your GREAT plugin GKWare Cabinet Maker, sometimes a short script is all that is needed to fill a void. There is nothing more valuable than the one that 'does the trick' when you need it.

              Most users are not coders. There is no equivalent native SU report. Dynamic Components are not that well documented for the new user. Your script (it needs a name) makes tracking and changing formulas in DCs much easier for us amateurs: we can paste results in any text editor and print what we need! It streamlines the learning process (priceless!). So again, for all of us that will benefit from this, thank you. You rock!

              HP EliteBook 8440p Intel® Dual Core™ i7 M620@ 2.67 4GB RAM
              NVIDIA NVS 3100, 512 MB
              Windows® 8.1 64 bit
              SketchUp Pro 2015 version 15.3.331 64-bit

              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