sketchucation logo sketchucation
    • Login
    1. Home
    2. TommyK
    3. Posts
    โš ๏ธ Attention | Having issues with Sketchucation Tools 5? Report Here
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 20
    • Posts 131
    • Groups 2

    Posts

    Recent Best Controversial
    • [Plugin] DC Functions - Calculate Nested Attributes 0.4

      Calculate Nested Attributes works with the Component Attributes window, and offers two new functions that calculate attribute values in nested components and groups, and updates them dynamically.

      =NestedAttributeSum("attribute_name", "attribute_dictionary"{optional})

      • sum of all attributes with name "attribute_name" of all groups and components nested in the component/group (inclusive of the current component/group).

      =NestedAttributeCount("attribute_name", "attribute_dictionary"{optional})

      • counts the instances of an attribute with "attribute_name" in nested components/groups.

      For both functions, an optional "attribute_dictionary" argument is available for those users who wish to calculate values of attributes outside of the "dynamic_attributes" Attribute Dictionary.

      You will not find these functions listed in the functions list at present; these must be typed in manually.

      Installation
      Install from the Plugin Store:
      http://sketchucation.com/pluginstore?pln=DCFunctionNestedAttributes

      As this plugin requires the Component Attributes feature, it will only work on Sketchup Pro. Sorry free users.

      Tested on Sketchup 8, and 2014 Pro

      Usage:
      Usage

      A classic use of this plugin would be to dynamically total prices for a set of components, or even for an entire project (as in image above).

      Other uses would be to track total internal areas for costings, volume of concrete etc, all within the model without having to generate a report. These are simple tools which tie information about your project into the design workflow.

      New in v0.3b

      • New menu options added in Plugins > Attribute Formulas. "Dynamically Recalculate" switches on/of dynamic recalculation of nested attribute formulae. "Recalculate All Formulas" does what it says when "Dynamically Recalculate" option is turned off.

      v0.4

      • Compatability fix for Sketchup 2013 and 2014

      Known Bugs

      • Does not work well with newly opened models. To get formulas to calculate again when a model is opened, any attribute in the group/component with the formula in them must be edited again for the update process to be triggered.
      • Unstable with larger models.
      • Performance issues for very large models with many levels of nested groups/components.

      Note to developers
      This is my first successful attempt at a ruby plugin. Although I have tried to follow the advice given here in the forums and elsewhere, I could probably do with a code review from someone more experienced.

      Future development goals:

      • Improve performance and stability.
      • Add the function to the list of available functions in DC

      Thanks to:

      • Dan and his rigourous documenting of good practices in Ruby coding (I hope I followed them well enough!)
      • TIG for elaborating on the potential of dynamic functions in this post: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=37083|/viewtopic.php?f=180%26amp;t=37083
      • Whoever made this useful document on dynamic attributes: http://wiki.cfcl.com/bin/view/SketchUp/Cookbook/DA

      I welcome all comments! This module needs improvement

      posted in Plugins
      TommyKT
      TommyK
    • RE: DC Custom Function - Sum of attribute values

      I have rewritten the plugin to add up the attribute values as it recursively looks through the components and groups. This works without a problem.

      For future reference, all those people out there dealing with dynamic attributes should probably know that something weird happens when you create an array of nested groups/components and start working on them within the DCFunctionsV1 class. That may be an incorrect diagnosis, but it explains enough for my situation.

      For those interested, see the plugin attached that works. At the moment, when you change the value of an attribute of a nested group/component that is summed, it doesn't automatically update the formula value. Fixing this is my next challenge. Oh what fun I will have with observer classes (of which I know very little about)!


      AttributeSum v0.1

      posted in Developers' Forum
      TommyKT
      TommyK
    • RE: DC Custom Function - Sum of attribute values

      @jolran said:

      Can't help you much more than provide with some reading.
      In case you have missed:
      http://wiki.cfcl.com/bin/view/SketchUp/Cookbook/DA

      some good stuff in there that might help.

      Indeed there is good stuff in there! I'll delve a little deeper to see if it helps my case, but it makes me feel less like I am flying blind.

      Thanks again.

      posted in Developers' Forum
      TommyKT
      TommyK
    • DC Custom Function - Sum of attribute values

      [highlight=#eeeeee:1estmm5k]Plugin now released on this page:
      http://sketchucation.com/forums/viewtopic.php?f=323&t=52969
      [/highlight:1estmm5k]

      Hi I am a relative newbie to Ruby, but have plenty of experience with PHP. This is my third attempt at a Ruby plugin - my first two ended in abandonment after tearing of hair ๐Ÿ‘Š .

      I am trying to create a function that adds up the numeric values of a specific attribute of all nested groups/components within the selected dynamic component. So the custom function

      =attributesum("price")
      

      would look through all the nested groups and components, find the "price" attribute (if any) and add them all up to return the result. The idea is that the user will be able to access the totals of any attribute (area, price, weight, etc.) from within the model without having to generate a report.

      It works thus:
      Script Usage

      I first followed TIG's post about creating custom functions for Dynamic Components Attributes here: http://sketchucation.com/forums/viewtopic.php?f=180&t=37083

      I thought I had got quite far, and now I am utterly confused.

      The main part of the script is here:

      class DCFunctionsV1
        protected
        
        # return attributesum
        # Usage; =attributesum("attribute_name", "dict_name"[optional])
        def attributesum(a)
          puts 'called once'
          # Check attribute_name has been passed to the function
          if a[0].nil? || a[0] == 0
      	  UI.messagebox('You need to specify an attribute name e.g. attributesum("weight")')
      	  return false
          end #if
      	
      	attribute_name = a[0]
      	
      	if defined? a[1] && (a[1].nil? || a[1] == 0)
      	  dict_name = 'dynamic_attributes'
      	else
      	  dict_name = a[1]
      	end #if
      	
      	#load the helper class
      	helper = AttributesFormulaHelper.new
          
      	# Get all child entities which are groups or components (including this entity)
      	all_entities = helper.get_child_entities(@source_entity)
          
      	puts all_entities
      	
      	sum = 0
      	
      	# Loop through all entities and extract the attribute value
      	all_entities.each do |ent|
      	  value = ent.get_attribute(dict_name, attribute_name, false)
      	  	  if (value != false && value.numeric?)
      	    flut = Float(value)
      	    puts 'The value of ' + ent.typename + '\'s ' + attribute_name + ' attribute is ' + value
      	    sum = sum + flut
      	    puts 'current sum is ' + sum.to_s
      	  end #if
      	end #do
      	puts 'last'
      	
      	return sum
        end #attributesum
        protected;attributesum
        
      end#class
      

      The above script kind of works, but where nesting levels are deeper than 2, the script seems to be invoked twice but on different sets of groups/components (please see attached screenshot Script window)?! Have I got some obvious syntax error? Or am I doing something else obviously wrong? I am of the opinion that there is something in the Ruby language that I have overlooked.

      Any help would be much appreciated.


      Sketchup testing file


      Ruby file to be dropped into plugins folder

      posted in Developers' Forum
      TommyKT
      TommyK
    • RE: Label Tool with Auto Fill

      I also wish for something like this.

      I would go one further, and have the label tool be a general "attribute label" tool, which shows the value of any chosen component attribute. Any changes in the model will update the label of course!

      posted in LayOut Feature Requests
      TommyKT
      TommyK
    • RE: Scrapbook Additions

      I haven't been able to find them. But I'll upload my architectural Scrapbook, which is a collection of my stuff and others. Feel free to use as you please.
      http://tomkaneko.com/architecture/resources/sketchup-resources/

      I am looking for electrical symbols right now - wonder where I can get them...

      PS - are there any rules on this forum when it comes to posting links to your own website?

      posted in LayOut Discussions
      TommyKT
      TommyK
    • RE: CAD v Modeling

      @honoluludesktop said:

      Modeling, and visualization only account for a portion of the schematic design process. This phase represents about 10-15% of the effort that goes into the Architect's effort to build a building. If 3D could replace 2D drawings in construction documents, it would have been done a long time ago. Architects have the ability to draw in 3D (perspective and axonometric views) without computers, and are not in love with the effort it takes to ornithologically project a building's views.

      Although i agree that current architectural practice is based on 2D drawings as construction information, I'm starting to feel that 3D information is/will take a bigger share of graphic communication with contractors.

      I am doing a very small scale job right now, and am pretty much using Sketchup as the primary package. That is to say that I have decided to build every element (floor slab, screed, hardcore, stud, cladding joist, roof deck, roof membrane) in Sketchup. I then take dimensioned elevations and sections directly from it and put it into LayOut. I export sections from Sketchup into Vectorworks to create the plan, and draw details. I use Sketchup's orthogonal views, and by turning different layers on/off I can show the structure, foundations, and cladding separately. All this is made very easy, and if I change the model, then all the drawings are updated to register the change.

      I also think builders appreciate 3D information, since it is so easy to read. I think 3D information is far better at communicating an overview of the phases of project, 2D information is only necessary for details and plans, perhaps.

      I guess what I am saying is that 3D drawings have the potential to become the primary communication medium, though I can never say that 2D doesn't have its place. I am relatively young, and still discovering how to do architecture, and I am being pulled to 3D more and more in the production of construction information.

      posted in SketchUp Discussions
      TommyKT
      TommyK
    • Better support for other file formats

      I am getting into the habit of using Layout not just for presenting Sketchup models, but also as the final presentation medium for assembling all sorts of images and drawings. The speed and ease with which Layout can assemble items makes it my number one choice.

      With this in mind, I have the following suggestions for Layout features in the future:

      1. Import DXF, DWG, EPS, PSD file formats (and more?)
      At the moment, LayOut can import PDF and mainstream bitmap files. This is made even more powerful as the link to the imported files can be updated as the image files change. What this allows is for LayOut to become the hub for organising all the disparate material for a complex project, with revised drawings automatically detected by LayOut. It would be great if LayOut could import other file formats, so that we don't have to export to PDFs and JPEGs every time. I'm not talking about being able to edit them, just being able to move, scale and render files in LayOut.
      In such a case, no doubt that each file type could have their own basic options (eg. scale for dxf/dwg, line weight for EPS, layers visibility for PSD etc).

      2. Respect the paper size of imported material!!
      Many drawings like PDFs and JPEG tend to have a set paper size embedded in the file. LayOut ignores this, and resizes it arbitrarily. When the use of scaled drawings are essential in your final presentation, this is very annoying! May I suggest that the "Sketchup Model" pane be changed to "Drawing Options", with a tick box that says "Lock to orginal drawing scale", where image files are highlighted.

      3. Transparencies
      Unrelated to the thread, perhaps, but here goes. It would be useful if elements in LayOut had a transparencies option. It would allow me to overlay a hidden line style view over a full colour view, for instance, to tone down the saturation.

      Are the above tall orders? I have a hunch that it is integration with other software that will make LayOut great, in much the same vein as Sketchup.

      posted in LayOut Feature Requests layout
      TommyKT
      TommyK
    • RE: Create community conventions for attribute names (for BIM)

      @gaieus said:

      Also, what about different standards in different countries (not to speak about metric / imperial units)?

      Indeed, this is a large concern. At the risk of seeming arrogant and ethnocentric, I think we have to stick with an English version if we are ever going to make standards.

      I'm a metric user (UK), I know architects in the US often use imperial. I must say that DC gets messy when I have to convert the units from imperial to metric (and vice versa). Let's hope someone designs a ruby script that easily converts DCs to/from imperial / metric.

      @remus said:

      Having said that, if you could get a few prolific users to use the standard you might be able to build up a reasonable collection of properly attributed components.

      I think this is the best approach. I think I may create an architect's 'DC toolkit' in the coming months, and it will be through releases like this that any kind of conventions emerge.

      I also hoped that Google might be able to host a page with standards within their help pages. I don't know how I should approach them on this one. I'm also assuming that soon, people will be making video tutorials on making DCs - if we could reach them, we could reach a lot of people.

      Anyhow, for the time being, it would be good to have a brainstorm of standards!

      posted in Dynamic Components
      TommyKT
      TommyK
    • Create community conventions for attribute names (for BIM)

      I'm very excited by the new Dynamic Components. One of the features that bring Sketchup a little closer to BIM (Building Information Modelling) is the ability to put attributes on to components. The list of Sketchup's standard attribute names are listed at the bottom.

      For those of you who use SketchUp for architecture (like me), I think it would be really helpful for us all to use standard Attribute names, so that reports will make sense when we are using other people's components. Maybe this is a tall order, and I'd like the community opinion on this. Potentially, I am talking about attribute names like UValues, Manufacturer, ComponentType and things like that.

      I just feel that the open way in which Sketchup designed this feature means that the rest of us will have to create conventions for ourselves to make it useful. Especially when it comes to sharing our Dynamic Components.

      Is this worth it? If so, how best should we publicise these 'standards'? Most importantly, what standard attribute names can you think of which would be useful to you? I will create a list of them if you like.

      For those of you who are interested in the standards for BIM in the US, the following links should be helpful:
      http://www.facilityinformationcouncil.org/bim/pdfs/NBIMSv1_ConsolidatedBody_11Mar07_4.pdf
      http://www.facilityinformationcouncil.org/bim/pdfs/NBIMSv1_ConsolidatedAppendixReferences_11Mar07_1.pdf

      @unknownuser said:

      Sketchup default Standard Attribute Names
      Component Info
      Summary
      ItemCode
      Position
      X
      Y
      Z
      Rotation
      RotX
      RotY
      RotZ
      Behaviours
      Materials
      Hidden
      onClick
      Copies
      FormDesign
      ImageURL
      DialogWidth
      DialogHeight

      posted in Dynamic Components sketchup
      TommyKT
      TommyK
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 7 / 7