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

    New to DC: topic for my simple questions to the pros

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    74 Posts 3 Posters 56.4k Views 3 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.
    • P Offline
      pcmoor
      last edited by

      Any DC with nested DC(s) will become unique on a redraw, so I recommend using the definition name as a category rather than an identity, and use the instance name or a custom attribute as the identity. the #number is not considered, the reports "group by" is the instance or custom attribute.

      If you simplify a DC so its nested components are not dynamic, then the definition #number will remain, so one could consider a method of simplification via a script as a possible solution depending on the DCs concerned.

      Although you could script a swap for same, that "same" would have to be a simple DC with no nested DCs as the uniqueness would only be triggered again if there is a redraw

      1 Reply Last reply Reply Quote 0
      • P Offline
        pibuz
        last edited by

        thanks Phil! Completely understood! Thank you!

        WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

        1 Reply Last reply Reply Quote 0
        • P Offline
          pibuz
          last edited by

          Sorry to bother again...
          I have another tricky question: I have issues trying to report attributes assigned to COPIES of the original instance. I mean: the fields areactually correclty compiled but the native reporting tool keeps only the result of the "original" instance.

          I attach my component (which I'm particularly proud of, maybe naively...).

          You can spot the issue, for example, if you change the size of the main component eg to 150x100cm. In this case I replicate the inner "Riser_strutt.quadrotta", and the copy is resized to 100x50. If you now enter the component you will see that the copy of the original instance has a "COMP_FIN" attribute changed to 50x100 (dimensions of the tile after the copy).
          If I generate report using the "8_PRELIEVO" template, I get a quantity of 2 on the string of "quadrotta truciolare Riser", and the "comp_fin" field still reports "100x100".

          Is there a way I can make this work? or is it impossible?
          In this second case, my solution would be NOT to modify the copy of the original instance but instead include an invisible pre-set 100x50 component, appearing in the right places(s) when needed... Could this work?

          THANKS A LOT IN ADVANCE!


          pedana Riser struttura.skp

          WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

          1 Reply Last reply Reply Quote 0
          • P Offline
            pcmoor
            last edited by

            It has been reported that modified DC copies do not list in the writer, however still no fix, probably unlikely now LCs are the flavor, so we wait while they re-event the wheel instead of fixing thats broken or out of round...

            https://forums.sketchup.com/t/generate-report-does-not-include-component-copies/80600 (2 years)

            @unknownuser said:

            n this second case, my solution would be NOT to modify the copy of the original instance but instead include an invisible pre-set 100x50 component, appearing in the right places(s) when needed... Could this work?

            I believe this your best option, plus a 50x50

            1 Reply Last reply Reply Quote 0
            • P Offline
              pibuz
              last edited by

              Thanks a lot, as usual.
              I ask you a personal opinion: do you think that the trimble team will dismiss the Dynamic Component system? I've writtena whole load of them..... 😢 😢 😢

              WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

              1 Reply Last reply Reply Quote 0
              • P Offline
                pcmoor
                last edited by

                @unknownuser said:

                I attach my component (which I'm particularly proud of, maybe naively...).

                You should be proud, you have grasp the technical challenges of a relative difficult scripting language and now adding you own spin on it. This is what is going to help you adapt and improve whatever the future changes are.

                It is clear that LCs is where the development is, hardwired and web savvy.
                DCs will still be around for 5 years but likely, as before, no development'

                @unknownuser said:

                We intend to launch authoring tools for Live Components sometime next year. Being able to author Live Components is just the beginning though. Those apps/tools will expand over the next several years to offer new ways of modeling in conjunction with SketchUp.

                Link Preview Image
                Introducing a new kind of SketchUp object: Live Components

                Today, we are extremely pleased to introduce a new type of configurable object for SketchUp: Live Components. Live Components are built on Materia, a new modeling platform that aims to deliver smart 3D content to Trimble…

                favicon

                SketchUp Community (forums.sketchup.com)

                I understand they acquired the concept
                https://forums.sketchup.com/t/introducing-a-new-kind-of-sketchup-object-live-components/139815/33

                I would agree with Dan on the period ahead...

                @unknownuser said:

                The Dynamic Components extension has not had any new features for many many years, and will (most likely) not get any more. SketchUp team has said this before. There are too many extensions (some Trimble) that now rely upon the DCs to remain as they are.

                It has also been like “pulling teeth” to get errors in the Dynamic Components extension fixed. I do hope (and politic) for all existing easily fixed errors in DC code to be fixed, before it is “retired” to an optional extension.

                So, it is most likely [speculating] that the Dynamic Components extension would be “frozen” at some version, and thereafter remain as such in the Extension Warehouse as an optional extension. (Ie, it may no longer be distributed as a “default” extension with the SketchUp installer. But [speculating] this is not likely to happen for several major cycles until after Live Components is mature enough.)

                Link Preview Image
                LiveComponents vs. DynamicComponents

                So far I do not see a big difference between Live Components (LCs) and Dynamic components (DC). DCs can react on a click event, so that when clicked on them, an action is performed on the component and they can be scaled…

                favicon

                SketchUp Community (forums.sketchup.com)

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pibuz
                  last edited by

                  Hi again! I've encontered a critical misfunction, I'm posting this in the hope someone can help me figure out how to dodge this.

                  In the file I attach there's a panel. If I copy the panel, select both copies and change the length, both component react correctly BUT the formulas contained in the last 3 top-level attribute rows are deleted, substituted by their value as fixed number.

                  What can cause this?

                  And secondary: is there a way to apply a certain DC configuration to another DC of the same "family"?

                  Thanks in advance!

                  EDIT
                  Found another user's post showing same issue. Seems to be related to the attribute state set to "User can see". Thanks!


                  auto-erasing formulas.zip

                  WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    pcmoor
                    last edited by

                    you could use the summary to display the data as the "component info" section is not affected.

                    I suggest you consider using some ruby scripts with your DCs to help with placement, multiple changes....


                    auto-erasing formulas.skp

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pibuz
                      last edited by

                      Hi all!
                      Sorry to ask for help again: I'm trying to figure out the simplest way to round a result of a formula to the closest upper value of a list with non constant intervals (e.g. 20,70,180,500)

                      Do you have any hints for me?

                      Thanks in advance as usual!

                      WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        pcmoor
                        last edited by

                        nearest
                        then test if input > nearest
                        if so find the next value

                        example 1: use a string of values and string functions to get the next


                        next largest.skp

                        1 Reply Last reply Reply Quote 0
                        • P Offline
                          pibuz
                          last edited by

                          I was almost there 😆 thanks a lot Phil!

                          WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                          1 Reply Last reply Reply Quote 0
                          • P Offline
                            pibuz
                            last edited by

                            Hi! is there a way to select all locked components? a plugin or a one-line snippet maybe?
                            Thanks in advance!

                            WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              pibuz
                              last edited by

                              Hi again! I have a new question for Phil 🤣

                              I have a formula which returns a text string which may contain LUCIDO, SEMILUCIDO or OPACO.

                              I want another attribute to substitute in that exact string the words LUCIDO, SEMILUCIDO or OPACO with GL100, GL60 or GL25 respectively. Is there a way to do that?

                              Thanks in advance!

                              WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                pcmoor
                                last edited by

                                Hi Filippo
                                can use nested SUBSTITUTE

                                order is important
                                example attached


                                SUBSTITUTE.skp

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  pibuz
                                  last edited by

                                  So cool! Thanks a lot, I couldn't have made it by myself. 💚

                                  WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                                  1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    pibuz
                                    last edited by

                                    Hi again! This is slightly OffTopic but it seems I can't find out a plugin I once saw.
                                    Say we have a DC ("wall") in a model, then we copy it 2 more times and make 3 variations in total, which will be called "wall", "wall#1" and "wall#2". Say we later delete the wall#1 instance, so we have "wall" and "wall#2".

                                    This plugin checks the numbered instances of "wall", and renames the "wall#2" instance to "wall#1" (since "wall#1" is available again after the deletion).

                                    Con any of you guys recall what was the name of this plugin?

                                    Thanks in advance!

                                    WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pcmoor
                                      last edited by

                                      Eneroth Decrease Component Number on extension warehouse

                                      1 Reply Last reply Reply Quote 0
                                      • P Offline
                                        pibuz
                                        last edited by

                                        Wonderful!!! THANKS Phil!

                                        WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          pibuz
                                          last edited by

                                          Hi again! Happy new year!
                                          I have the need to bulk export the thumbnails of the selected components, I fiddled around in the forums and I discovered this small but effective Ruby code:

                                          mod = Sketchup.active_model # Open model
                                          sel = mod.selection # Current selection
                                          path = mod.path #current path
                                          mypath= File.join(File.dirname(path),'/') #not the model name

                                          sel.each do |sel| # you would have to select all components in the model
                                          compname = sel.name # each component's definition name
                                          thumbnailname = File.join(mypath, compname + '.jpg') # as jpg
                                          sel.definition.save_thumbnail thumbnailname
                                          end

                                          The only issue is that this plugin doesn't work if i have the character "|" in the component instance name. Is there a way to allow the character in the "allowed" characters? Thanks in advance!

                                          WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                                          1 Reply Last reply Reply Quote 0
                                          • P Offline
                                            pibuz
                                            last edited by

                                            Hi again! Is there a way, even a small oneliner ruby code, to get a dimension in SKP (Not layout) with NO leaders at all? No lines, only the number.

                                            Thanks in advance!

                                            WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

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

                                            Advertisement