sketchucation logo sketchucation
    • Login
    1. Home
    2. peweuk
    3. Posts
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 29
    • Posts 138
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Plugin for DC's

      Dave,

      Thanks for your time and input.

      Your example was most illuminating, and having looked at it briefly I think I see how it works, but can't see how I can utilise it in my situation.

      My DC's are cabinets of different shapes and sizes with different codes for each one. On each of these I place doors which are a seperate range of DC's.

      I have created various reports for quotes and cutting lists, the information for which (including colour from the 'Material' attribute) is taken from the DC.

      There are about 20 different cabinet colour options and 40 different door colours that can be used.

      If I place 20 or 30 different components in a model (made up of cabinets and doors) I would like to be able to change the colours of some (pre-selected) or all the cabinets at once, likewise the doors, and have that change updated in the DC material attribute so the correct colour is used in the reports. At present I have to do every one individually which is tedious 😒

      A plugin to do this I am sure would not be too complicated for an experienced coder (which I am not), but I could be wrong πŸ˜‰

      Pewe

      posted in Plugins
      P
      peweuk
    • RE: Plugin for DC's

      Thanks Chris, that is hopeful.

      Now I need to find someone to write it for me - anyone suggestions as to how I might find them?

      posted in Plugins
      P
      peweuk
    • Plugin for DC's

      I have a number of dynamic components which all have the 'Material' attribute accessed for change using the component options panel, where the material code can be entered manually.

      However I can have over 30 of components in a model and if I want to change the colour of them all (to the same colour) I have to do them one at a time.

      Does anyone know if it would be possible to have a plugin writtten which would allow the colour (Material attribute) to be changed for all (or a group of selected) components?

      posted in Plugins
      P
      peweuk
    • RE: Help with IF statements

      @unknownuser said:

      It was a fun exercise in DC's.

      Yes they are fun - to start with.

      I have a whole stack of them to do to produce a complete kitchen cabinet catalogue

      I am trying to construct a complete drawing, customer quote and ordering/manufacturing system, and DC's are a godsend for this, although there are issues they don't address that I will have to deal with, and with no coding experience/skills that should be interesting πŸ‘Š

      posted in Dynamic Components
      P
      peweuk
    • RE: Help with IF statements

      Thanks Chris.

      Sorry I didn't get back to you on your first two reponses, it was the middle of the night here when I posted and I've only just got back to my PC.

      Looking at the sample I think it is exactly what I need except for a couple of things which I can easily change. πŸ‘

      The only user input is answering the four questions - the colour is fixed, taken from another input box elsewhere.

      The final answer is also invisible to the user as this concatented field is used as a data filed in a report exported to file for use in another programme.

      I thought about doing the script as four if statements, but was unfamiliar with the 'Concatenate' formula and how to combine four attributes into one with the - separator included, but your example was extemely useful is showing me how it is used. Doing it this way also makes life a bit easier in making the component as the question input can be put into the main component of a model (with all the other input) and then the answer copied down to all sub components in the model - saving the need to put it into every part.

      Later today I will transfer your sample to my test model and see how it goes - but I'm sure it will give me what I need.

      Thanks again

      posted in Dynamic Components
      P
      peweuk
    • Help with IF statements

      I have used simple 'IF' statements before but now I have a problem that I'm not sure can be resolved with a series of IF statements and would appreciate any guidance.

      I have four attributes (Question1, Question2, Question3 and Question4) all of which can have an answer 'Yes' or No'.
      I have a fifth attribute (Colour) which has a value (Red).

      A sixth attribute (Answer) has to be automatically completed depending on the values of the four questions. The value of this attribute has to be filled with four values seperated by a - depending on the answers to the four questions.

      Example

      • if 'Question1' is 'Yes' and the other three are 'No' then 'Answer' is 'Red-0-0-0'
        if 'Question1' and 'Question2' are 'Yes' and the others 'NO' then 'Answer' is 'Red-Red-0-0' etc.

      If this is possible, any assistance would be appreciated.

      posted in Dynamic Components sketchup
      P
      peweuk
    • MultiWallTool31

      To anyone using the mutliwalltool31
      Am I missing something or does this script not use the VCB when drawing 'wall segments'.
      Each time I start to draw a wall segment and then type a value, when I press the enter key the walls are drawn to the point at which I stopped the tool - not to the value entered.

      posted in Plugins
      P
      peweuk
    • Changing units - Dynamic components

      I am creating some DC's using Metric measurements.

      I was wondering if there is any simple method (eg a ruby or other tool) which will allow the conversion of these to 'Imperial' (inches) units which will not mess up any formulas used in the component as is the case if I simply change the units in the DC window?

      posted in SketchUp Discussions sketchup
      P
      peweuk
    • RE: Dual Installation

      Thanks guys.

      I have a second PC in the office on which I can try it next time I am there (snowed in at home at present) and see what happens.

      posted in SketchUp Discussions
      P
      peweuk
    • Dual Installation

      I have SU V7 pro installed (Vista) and for specific reasons would like to also install the 'Free' version (also V7)to run seperately on the same PC.

      Would the method outlined here also be the method I need to follow to do this?
      http://forums.sketchucation.com/viewtopic.php?f=15&t=22158&st=0&sk=t&sd=a

      Are there any issues I may encounter - (eg registry content as the Pro version is licensed?)

      posted in SketchUp Discussions sketchup
      P
      peweuk
    • RE: New Toolbar button ?

      No worries - I fixed it πŸ‘

      posted in Developers' Forum
      P
      peweuk
    • RE: New Toolbar button ?

      Here are the errors shown in the console when I click the toolbar icon.

      @unknownuser said:

      Error: #<NameError: undefined local variable or method dcomp_reporter2' for DCompReporter2:Class> C:/Program Files/Google/Google SketchUp 7/Plugins/DComponentReportercsv.rb:37 C:/Program Files/Google/Google SketchUp 7/Plugins/DComponentReportercsv.rb:36:in call'

      posted in Developers' Forum
      P
      peweuk
    • RE: New Toolbar button ?

      This is what I have at the beginning of the script, the part between the toolbar mods is what I added to the original script - did I put it in the wrong place?

      @unknownuser said:

      require 'sketchup.rb'

      Monkeypatching the hash to allow the uniq function of array to work...

      class Hash
      def hash
      to_a.hash
      end
      alias eql? ==
      end

      class DCompReporter2

      #-----toolbar mod begins-----------

      toolbar = UI::Toolbar.new "Reporter"
      # This toolbar icon simply displays Hello World on the screen
      cmd = UI::Command.new("Reporter") {
      dcomp_reporter2.generate_attributes_report("report.html", Sketchup.active_model.entities)
      }
      cmd.small_icon = "dcreports/Excel16.png"
      cmd.large_icon = "dcreports/Excel32.png"
      cmd.tooltip = "Produce Report"
      cmd.status_bar_text = "Produce Report"
      cmd.menu_text = "Report"
      toolbar = toolbar.add_item cmd
      toolbar.show

      #-----------------------------toolbar mod ends------------

      After that is the script which still works when loaded from the plugins menu.

      I get no errors on screen when I start SU, and when I click the icon on the toolbar, nothing happens.

      How do I check the console to see if there are any errors when I click the icon?

      posted in Developers' Forum
      P
      peweuk
    • RE: New Toolbar button ?

      Thanks Thomthom.

      Forgive my ignorance, but I am not a script writer and have simply cobbled together a couple of scripts by 'hacking' parts of other scripts together to suit my needs, and this particular task is a little bit beyond me at present.

      When you said
      @unknownuser said:

      The same command you used in your menu item.
      I assumed that you were referring to the part in my 'myruby.rb' where the command is added to the plug-ins menu - ie

      @unknownuser said:

      plugins_menu = UI.menu "Plugins"
      plugins_menu.add_item("Generate CSV") {
      dcomp_reporter2.generate_attributes_report("report.html", Sketchup.active_model.entities)

      I tried replacing the UI.messagebox "Hello World"with the third line of the above (which appears to be part that launches the script from the plugins menu), but this does not work.

      What have I misunderstood.

      TIA

      posted in Developers' Forum
      P
      peweuk
    • RE: New Toolbar button ?

      Thanks ThomThom.

      I have looked at this and got it working with my own icons and dialog, but can someone tell me what I need to enter in the cmd line to launch a ruby - for example called 'myruby.rb' which is in a plugin subdirectory called 'myruby'.

      @unknownuser said:

      toolbar = UI::Toolbar.new "Test"
      # This toolbar icon simply displays Hello World on the screen
      %(#FF0040)[cmd = UI::Command.new("Test") {
      UI.messagebox "Hello World"
      }]
      cmd.small_icon = "ToolPencilSmall.png"
      cmd.large_icon = "ToolPencilLarge.png"
      cmd.tooltip = "Test Toolbars"
      cmd.status_bar_text = "Testing the toolbars class"
      cmd.menu_text = "Test"
      toolbar = toolbar.add_item cmd
      toolbar.show

      posted in Developers' Forum
      P
      peweuk
    • New Toolbar button ?

      I posted earlier about creating a new ruby for reporting.

      Ok - I've got that figured now, but for the next step I'd like to add a toolbar button to launch the script (rather than it being done from the plug-ins menu).

      Can anyone tell me if this is do-able - and if so, is there any information anywhere explaining how to do it??

      TIA

      posted in Developers' Forum
      P
      peweuk
    • RE: Problem with script

      @unknownuser said:

      But can't this already be done in SU with the Generate Report function?

      The problem with the inbuilt report generator is the same as the script referred to above.

      It is not very flexible, even if you take the option to report on selected components ony, it still includes all the attributes of all the components, and it reports in imperial measurements even if the model is in metric.

      What I would prefer is a report which is more selective such as the example I detailed above.

      The problem I am having is finding someone who could modify the above script. 😒

      posted in Developers' Forum
      P
      peweuk
    • RE: Problem with script

      I think the answer is - yes.

      What it is for is cabinets.

      Sometimes I make them, and sometimes I buy in.

      I have created some dynamic components for the carcasses. These consist of the various panels which make up the carcasses. Those I buy in could have a Reportthis attribute of 'Yes' for the parent (ie the whole carcass)and 'NO' for the sub-component panels which make it up.

      Those I make could have the Reportthis attribute of the Parent as 'NO' and all the sub-components set to 'Yes'.

      I hope this makes sense πŸ˜‰

      posted in Developers' Forum
      P
      peweuk
    • RE: Problem with script

      Thanks Thomthom.

      posted in Developers' Forum
      P
      peweuk
    • RE: Problem with script

      Thank you very much TIG. Much appreciated.

      I corrected the line as you suggested and the script now loads and works.

      The script produces a report (.csv or .html) which includes all the attributes of all the groups and sub-groups of all the components in the model, with dimensions in imperial measurements.

      What I need is a list of only the groups (and/or sub groups) with a specific attribute (say I had an attribute called 'ReportThis' with a value 'Yes' or 'No'), and to only list some of the other attributes (eg Height, Length, Depth, Cost, Description etc), and the dimensions showing in cm or mm.

      I could extract this information from a full report in .csv using Excel and formulas, but wondered if you, or anyone else could explain how I may add this to the script to do it with a ruby.

      Thanks in advance for any forthcoming assistance.

      posted in Developers' Forum
      P
      peweuk
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 2 / 7