sketchucation logo sketchucation
    • Login
    1. Home
    2. pcmoor
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    đź«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 378
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Componentes dinsmicos para carpinteros

      can not see anything on the video, can you upload link to you tube?

      posted in Dynamic Components
      P
      pcmoor
    • RE: Nested dynamic components

      The rotation is causing a problem as you are going into each level to make the interaction.
      You can isolate the effect (X to Z swapping) by making another group / component of the geometry then move that in the rotated context.

      Generally I would use a switch on one of the levels to animate all the actions using conditional statement to give priority. However the attached solution may suffice your needs


      DC_NestedSets solution 1.skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: Nested dynamic components

      On the bottom of the return full reply (not quick), second tab, choose upload attachment. Then choose file button, the little plus sign if more than one file, then bottom button to add the file to your message

      Capture.jpg

      posted in Dynamic Components
      P
      pcmoor
    • RE: Nested dynamic components

      The trigger point(s) to any animation must be all on the same level, then any changes referenced up or down.
      There is no limit to the number of nesting provide the data is passed through each level

      It would be easier to advise if you post the model

      posted in Dynamic Components
      P
      pcmoor
    • RE: Attribute update

      https://forums.sketchup.com/t/attribute-doesnt-update/104741/2

      posted in SketchUp Discussions
      P
      pcmoor
    • RE: 3D Warehouse

      you could download make2017 and run it along side
      https://www.sketchup.com/download/all

      not sure if this allows you to saveas to 2015, but worth a try

      posted in Newbie Forum
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      saveas the DC to a folder then bring it into another file, for some reason it does not initially work within its created file, after that, should work, regardless of the number of changes, the references are still maintained

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      you can use the component instance name to give each instance an unique name which is reflected in all the dialog, which is the natural inbuilt way

      Capture.jpg

      otherwise set
      Name = _name
      in the DC then
      use a button from the toolbar extension to fire the code snippet to alter the _name attribute, which reads the current definition name, updates the original name to update the option dialog

      Capture2.JPG

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      see the link to topic

      https://sketchucation.com/forums/viewtopic.php?f=289&t=71346

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      The components instance name is already tied to both the attribute and option dialog, this can be updated on the fly. This works if you do not use the name attribute and only after loading the component.
      Otherwise the component definition name can be accessed via a ruby script and placed into an attribute value.

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      to overcome (workaround) this issue you can collect the geometry into another component then reference the current state of the size property

      When experiencing problems with rotation or sizes< I have found that adding another "shell" isolates and protects the contents from SketchUp making unwanted updates.

      The encasing and reference to a current value is the basis for creating components that can be swapped so their current size properties are retained. Like a timber beam with a length in say lenx, can be swapped with a steel beam and their lengths match. Of course you would not want this to to happen when you swap a toilet for a basin, which is the behavior that is built into the DC code and what you are experiencing.


      cielino_fascione coverup (use of current and extra component shell).skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      you basically create a cutting component within another cutting component

      https://sketchucation.com/forums/viewtopic.php?f=180&t=67635&hilit=+hole

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      You can alter the font on component info attributes and labels, not values using syntax as per
      https://help.sketchup.com/en/sketchup/dynamic-components-supported-html-tags

      you can change via formula as per example, so a particular value could set up a warning in the info section


      colors in label and component info.skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: Sketchup 2019 and its knock-on effects

      The exciting developments have been SubD, profile maker 3. Skimp....all extensions, there seems very little difference from Sketchup 2017-2019, rather all the effort has been on a failing on-line version. I for one, am very disappointed in Sketchup development. I would naively hope for some improvement in the areas I work in, now the solution seems to write ones own ruby scripts (not an easy task). If 2020 is not some major improvement, or something to reignite my enthusiasm then if my ruby does not solve my issues, it will be goodbye from me, despite the investment (reason to be faithful so far) I have made.

      I am still on 2018, I may reinvest if 2020 proves worthwhile

      Yes there has been a drift to Sketchups forum at the expense of this one, but I do find the searches much more fruitful here

      posted in Corner Bar
      P
      pcmoor
    • RE: Saving dynamic component

      wrap the group in a component then saveas, then explode on inserting

      posted in Dynamic Components
      P
      pcmoor
    • RE: Swapped components location error

      Components should be saved via right click context menu and "saveas" to appropriate folders on your computer, or 3D warehouse > share component, not as a file containing the component, otherwise the installed component will be a file with the component placed at the position in the file. You will find the reloaded component is the file with the component inside.

      Capture 2.JPG

      Once a path is created to a folder, the swap DC should return to that point, you can change the default via window>preferences>files then change component location via the icon.

      Capture.jpg

      There is a difference between reload and swap, in that attributes are not updated to the current
      so a steel beam length will not update to a timber beam length on a reload

      There maybe another issue, but without a model, can only guess

      posted in Dynamic Components
      P
      pcmoor
    • RE: Dynamic component name?

      Hi
      Sorry didn't see reply until today

      To clarify a few points, a component seen on the model interface is a component instance whereas the definition is retained in data even after all the instances are deleted unless the file is purged. Deleting a component definition in the component dialog will delete all instances.
      Component instances have their own naming system that matches groups, for dynamic components (DCs) provided you don’t use the “name” attribute, changes in instance name are reflected in the title of the attribute and options dialog of the DC. This may be enough for your workflow in showing some uniformity in outliner, labels, and the DCs options.

      If this is too limited, then ruby extensions are required, DCs seem to be very low on the sketchup developers priority list, I naively assume that they would get attention on each new release, been 5 years now with little or any visible improvement, so you really need to use ruby in conjunction with your DC program

      It would be best if you could give an outline of your intentions with regards DCs, for example I use them to create structural drawings and material lists, so easy excess to my DC folders and a placement, scale and orientation tool is my first ruby, then another to simplify the DC to an inert form…and so on. I now use the “description” attribute as main reference to create reports on materials and the instance name to locate container objects with instance name “WF1” or “WF2”… or “RT2” rather than the DC definition name wallframe# whatever number or rooftruss#103 (no longer important or included in my report)

      With regards the ruby API, this is specific to Sketchup and not a ruby learning deposit. To understand ruby you would need to check out some youtube videos, on line books...
      However there is nothing like taking the plunge...

      There a few downloads
      Ruby editor:

      • Of your own choice (I currently use https://sketchucation.com/pluginstore?pln=as_rubyeditor)
      • Create and test ruby scripts

      tool editor:
      https://sketchucation.com/pluginstore?pln=ae_ToolbarEditor

      • convenience of running snippets
      • make buttons toolbar without knowing the ruby required, later you can install your own or a web form for more complex projects

      Attribute editor: https://sketchucation.com/pluginstore?pln=ae_AttributeInspector

      • to understand the DC behind the scenes attributes (_underscore values)
      • to copy lists from one dropdown to another
      • to insert a formatted, excel list rather than write a long list and values

      With DCs a very important ruby code step is redraw.
      There are some situations when a redraw is not triggered, such as entering a DC and changing its raw geometry, consider the facearea() is not updated until a redraw (right click context menu) is made.
      The area example, open option dialog, then the DC, move an edge or two, close, you will note the area calculation does not update. Unless you force a redraw via the context menu, DC,redraw or another method to update the option dialog.
      area example.skp

      Consider the snippets kindly donated by Tig, Dan, Mitch and many others and attach the code to a button create in toolbar editor
      https://sketchucation.com/forums/viewtopic.php?f=180&t=68489
      or https://forums.sketchup.com/t/redraw-all-dynamic-components/77512

      Sketchup.active_model.selection.grep(Sketchup::ComponentInstance).each do |s| $dc_observers.get_latest_class.redraw_with_undo(s) end

      This would be a good starting point, reading it, dot containers, we are looking at a selection, so a selection must be done for this to work, look up grep on internet, so filtered to specific elements of an array, with each do an action….redraw
      Try this first on the example model

      Expand this with
      Sketchup.active_model.selection.grep(Sketchup::ComponentInstance).each do |s| puts s.name puts s.definition.name $dc_observers.get_latest_class.redraw_with_undo(s) end
      puts writes the result to the ruby console, so open this and run the script to see both names
      using puts to the ruby console is a method of checking the results you are seeking, as Dan wrote, messagebox can silently fail, so use the console to get some feedback as you experiment

      Now to this script we can add attributes “name_defn” and “name_inst” or of own choosing. Then assign the results
      ` Sketchup.active_model.selection.grep(Sketchup::ComponentInstance).each do |s|

      s.set_attribute 'dynamic_attributes','namedefn', s.definition.name.to_s
      s.set_attribute 'dynamic_attributes','nameatt', s.name.to_s
      

      $dc_observers.get_latest_class.redraw_with_undo(s)
      end`

      Try it on the example
      It is best if the attribute in is already defined in the DC before altering its value, as there is a reference issue in the internal DC code if done on the fly.

      posted in Dynamic Components
      P
      pcmoor
    • RE: Dynamic component name?

      within the DC formulas
      =_name (underscore name) returns the original name, but no other assign #numbers after the first assignment via the component creator

      this original name for the definition is static, it does not change with any renaming via entity info

      Ruby is the alternative to get the data required, then you can pass it into the DC involved
      but will need to set an external command to do this (button, right click menu...)

      it is suggested you consider a holistic approach in using a script to access the component folders, to place, scale and orientate the instance with the updated data, thus doing many of your requirements in one or a few clicks.

      Such scripts are custom to your workflow and data required. If you decide on this path, then can help as well as others on this forum will.

      posted in Dynamic Components
      P
      pcmoor
    • RE: New to DC: topic for my simple questions to the pros

      Most likely you need to do a redraw, you can set a short cut key to it provided you have a component selected.
      Another method is to set a ruby script to a button
      https://forums.sketchup.com/t/redraw-all-dynamic-components/77512

      You probably need to use some ruby to overcome the shortcomings of DCs

      posted in Dynamic Components
      P
      pcmoor
    • RE: Dynamic Retaining Wall copy issues

      Assumed the sleepers count from top to difference in ground. Use height of wall/depth of sleeper minus the int(height of wall/depth of sleeper) to get the remainder. (there is no MODULAR function)
      I grouped the copied sleepers (Bay) and then copied that, you could make a 2D array, but this method is more economical and easier to understand.
      Use condition statements to place last post and last sleeper length


      SleeperWall_Build (1).skp

      posted in Dynamic Components
      P
      pcmoor
    • 1 / 1