Dynamic Components Function Examples
-
Hi Phillip,
Dynamic components are saved as a definition, their size,position and orientation as are other attributes are held within the file, so editing a DC is done by placing it into a new or existing drawing. An instance of the definition is then observed. When edited it can be save via the right click menu, this includes loading it to the warehouse as a component.
So if you download a DC and save it o a dedicated folder, you then you can insert an instance via the component browser. A copy of this definition remains in the drawing file despite deleting all the instances, one needs to purge the drawing to remove all traces.
In regards to the warehouse, I find the drag and drop method best, have an empty sketchup drawing and drag the component file from the download menu to the sketchup interface and drop. This inserts the component and observed definition intact, you are not opening the DC file. Sometimes you may need to explode the DC as it may have been enclosed in another component wrapperwill keep in touch after viewing your posts
-
@pcmoor said:
Hi Phillip,
Dynamic components are saved as a definition, their size,position and orientation as are other attributes are held within the file, so editing a DC is done by placing it into a new or existing drawing. An instance of the definition is then observed. When edited it can be save via the right click menu, this includes loading it to the warehouse as a component.
So if you download a DC and save it o a dedicated folder, you then you can insert an instance via the component browser. A copy of this definition remains in the drawing file despite deleting all the instances, one needs to purge the drawing to remove all traces.
In regards to the warehouse, I find the drag and drop method best, have an empty sketchup drawing and drag the component file from the download menu to the sketchup interface and drop. This inserts the component and observed definition intact, you are not opening the DC file. Sometimes you may need to explode the DC as it may have been enclosed in another component wrapperwill keep in touch after viewing your posts
Hi! And thanks for your prompt and courteous reply.
While I understand the jist of your explanation, some of the terminology (like 'drawer') is a little vague to me. I was a programmer of old, when operating systems and high level languages for microprocessors were GOING to be the next big thing and the line between hardware and software was still pretty fuzzy. I left off writing dedicated machine code in hex for other pursuits, though I tried to keep up on an amateur level. My last project was consulting with DGO Systems to develop new technology for mobile telephonic voice encoders as the mass communications market had newly transitioned from 'car phones' to cell phones. My man-cave is really a cave and my object oriented context is still pretty sparse.
I think I can follow your instructions. If I have any trouble, I'll check back.
-
Had my dinner.. just checked the warehouse examples, they are indeed empty. This was not the case years before. Someone has stuffed up with updating the models.
Can you share the models you are working on and formulas you are having difficulty with
-
@pcmoor said:
Had my dinner.. just checked the warehouse examples, they are indeed empty. This was not the case years before. Someone has stuffed up with updating the models.
Can you share the models you are working on and formulas you are having difficulty with
I have little experience with scripting languages; Ruby in particular and specifically within the context of the DC limitations of SketchUp, so the function examples I tried have been many. My main focus has been to find what functions work with what attributes and under what circumstances. The environment is pretty constrained so exceptions and work-arounds have been my focus.Completely in keeping with the antiques meme that is me, I have been following a sticky thread started in 2008 by Chris Fullmer: DC Exploration Series. If you look at my meager offerings on 3D Warehouse, I have shared some of my exercises like, Vertical Blinds (Animated & Scalable) and DC Desk. I took it upon myself to attempt a DC that addressed the majority of the challenges in all three parts of the series, DC Exploration 1 - Color!, DC Exploration 2 - Movement! (rotation, linear) and DC Exploration #3 - Scaling and Copying.
The premise is simple. Since the Scale tool seems to be the only integrated tool that offers dynamic component functionality through the mouse; that is, beyond a 'click'; I want to use the Scale tool to manipulate a slider-like component. The idea is to align the X axis with the base of the scale and use a variation of LenX/2 to define three slider controls' X value. Then I concatenate the outputs to an RGB color number. A 1/64th inch [0.015625"] increment amount would give a slide control a travel length of 4 inches (64*4=256 or 0 to 255). So, a slider for Red, for Green and for Blue.
I have to date, limited the X value with a NEAREST(CURRENT("X"),[...increment series...]) function that defines a custom attribute called NewX. Getting the Scale to 'fire' the custom attributes was easy. Concatenating was easy. But I seem to be having some trouble using the SET() function to load ColorCube!Material. I only works the first time and when the Material attribute of the ColorCube is in its <default> state. ...So I'm looking for another workaround.
Thanks for asking. It seems that nobody talks to the basic membership much. Understandable though.
-
the other forum has noted the loss of examples
http://forums.sketchup.com/t/basic-self-paced-tutorials-broken/16489/8
plus other issues with tutorials..maybe this is the lead up to the new release
The DCs are but spreadsheet cell formulas, convenient for simple object manipulation. Ruby on the other hand is a language use to create plugins. (DCs forms and functionality was built using Ruby)
However DCs are the most likely vehicle for information modeling, so understanding how they work is not a waste of time
deleted last comment
going through your examples now
-
I'll be away for a few hours and will check back later. - Phillip
-
Hi
I believe animating the sliders maybe more effective than the scaling idea. Each slider should have a front and back component/group switch, which moves the slider a given distance. Similar to your scale method a step can be updated or reduced. The corresponding step can be added/subtracted to influence the color as well as the slider position.
Added a sample continuous movement on a cube using the set function
Must say G'Night from a Tassie Friend
-
Phillip,
In your first post you seem to be conflating Sketchucation Community Forums with the Trimble SketchUp 3d Warehouse. The Warehouse is run by Trimble (though they do not produce most of the content). These forums and their moderators do not have any responsibilities with the 3d Warehouse.
Still, as you see, you can bring up subjects here related to Trimble and someone might answer.
I personally wonder about DC components. They seem to be an idea that few wish to pursue. So you don't find too many people to discuss them with. There are some nice components out there that people have made but it's not a consistent selection, and nowhere near as widely adopted, or developed as, say, ruby plugins. DC components have added a functionality that allows certain gifted individuals, already well-versed in their respective trades, to provide more parametric aids to modelling. Other than that, I think they tend to end up limited and gimmicky, at least in regard to professional use.
-
@pcmoor said:
Hi
I believe animating the sliders maybe more effective than the scaling idea. Each slider should have a front and back component/group switch, which moves the slider a given distance. Similar to your scale method a step can be updated or reduced. The corresponding step can be added/subtracted to influence the color as well as the slider position.
Added a sample continuous movement on a cube using the set function
Must say G'Night from a Tassie Friend
Ah! A 'taz' man! The coolest people in the world! Rest well my new mate.
I liked your offering. Very elegant. I may use a variation of that algorithm in something else. Hope that's OK with you.
The reason I chose to try and model the Scale tool approach was because I thought it would be difficult. At my current skill level, I was right. But the payoff is noteworthy. In close to only three moves, the user could quickly and somewhat accurately make a discrete selection from over 16 million possibilities. Besides, I had never seen it done; a doable dynamic color-picker.
I know this approach isn't pretty. I didn't expect that it would be. But this was after all, simply an exercise.
Btw, I like your suggestion about being able to 'nudge' the slider to fine-tune the selection. Brilliant! I'll put it in! But first I must get the thing to work!
-
@pbacot said:
Phillip,
In your first post you seem to be conflating Sketchucation Community Forums with the Trimble SketchUp 3d Warehouse. The Warehouse is run by Trimble (though they do not produce most of the content). These forums and their moderators do not have any responsibilities with the 3d Warehouse.
Still, as you see, you can bring up subjects here related to Trimble and someone might answer.
I personally wonder about DC components. They seem to be an idea that few wish to pursue. So you don't find too many people to discuss them with. There are some nice components out there that people have made but it's not a consistent selection, and nowhere near as widely adopted, or developed as, say, ruby plugins. DC components have added a functionality that allows certain gifted individuals, already well-versed in their respective trades, to provide more parametric aids to modelling. Other than that, I think they tend to end up limited and gimmicky, at least in regard to professional use.
Hi pbacot,
Thanks for your reply and for giving me the opportunity clarify my remarks. Your observation is correct and I apologize. Though I seem to mix the two entities up in my post, it is due to poor communication on my part, not confusion. I should have been more careful.
I once had an English instructor about half a century ago that would occasionally remind me that it is not enough to communicate so as to be understood. One must communicate so clearly as to not be misunderstood. I was addressing my remarks to the people here that cite those examples and link to those models. It seems I dropped the ball. Please forgive me.
Just thinking out loud here: As far as the commercial value of DCs, I tend to think that DCs are an under-developed concept and certainly under utilized because of it. A few more predefined attributes and functions could make a world of difference. I have read great praise from some designers that have found them very useful in streamlining their workflow, even in their current state. Kitchen cabinets immediately come to mind.
Considering the importance of labor costs in budgeting design efforts, I would think that there is a great deal of commercial potential here. Were the concept expanded a little, there might be more of an effort to develop, categorize and standardize their use, especially among Web developers for sites where inventories are accessed by designers.
I am surprised that there aren't more collections where whole subsets of inventories are made out of DCs; Hardware, lumber, pipe and fittings, fasteners, etc., rather than endless models ad nausium, all of different sizes and types of the same thing. Instead, a DC that hold the definition(s) for many like items. Seem like great candidates for this type of thing. Better yet, DCs that can produce custom output much like a digital equivalent of a 3d printer. Perhaps a place holder; low poly component 'targets' that holds the item number, the orientation and position in the drawing; one that allows a one-click DC to swap out the more robust replacements when the designer needs them.
I'm probably talking over my head. Again, just spit-balling. Must be the coffee.
Thanks for your input and thanks for listening. It's been a pleasure.
-
@phillip h said:
Thanks for clearing that up. It helps me put things in focus. It's also good to know that I haven't lost my mind, thinking the DCs were empty. If your assumption is correct, then I presume we will see some major changes in functionality.
In the following file, I have broken out things into various attributes to better monitor results. The ColorCube has its Material attribute removed as it need to be added fresh each time. I have been have some difficulty with the Scale tool too, so the same applies. It needs to be reinitialized in each slider; SliderR, SliderG and SliderB. LenX gets evaluated with NEAREST(CURRENT()) and the X axis is aligned to the base of the slider scale. This give a direct relationship between LenX and X. The 'Trick' attribute of ColorCube came from telling myself, this might just do the trick.
Thanks for looking. It means a lot to me.
Upon some reflection, I think I need to move most of ColorCube's attributes to the sliders and do all the processing from there.
My deepest regrets and apologies to all. I have been studying government regulation for testing and re-certification purposes for weeks now. Living off of a few hours sleep a night and too much caffeine does little to help the logic processes. I just went through my drawing and I am so embarrassed, having made so many logic and math errors and then posting them in the drawing for all to see! Yikes!
I'll post the corrected version after a quick nap and some quality time with a spreadsheet program. Sorry.[/quote]
-
Oops
-
@pcmoor said:
the other forum has noted the loss of examples
http://forums.sketchup.com/t/basic-self-paced-tutorials-broken/16489/8
[attachment=0:hi3y6q0h]<!-- ia0 -->Capture.PNG<!-- ia0 -->[/attachment:hi3y6q0h]
plus other issues with tutorials..maybe this is the lead up to the new release
The DCs are but spreadsheet cell formulas, convenient for simple object manipulation. Ruby on the other hand is a language use to create plugins. (DCs forms and functionality was built using Ruby)
However DCs are the most likely vehicle for information modeling, so understanding how they work is not a waste of time
deleted last comment
going through your examples now
Thanks for clearing that up. It helps me put things in focus. It's also good to know that I haven't lost my mind, thinking the DCs were empty. If your assumption is correct, then I presume we will see some major changes in functionality.In the following file, I have broken out things into various attributes to better monitor results. The ColorCube has its Material attribute removed as it need to be added fresh each time. I have been have some difficulty with the Scale tool too, so the same applies. It needs to be reinitialized in each slider; SliderR, SliderG and SliderB. LenX gets evaluated with NEAREST(CURRENT()) and the X axis is aligned to the base of the slider scale. This give a direct relationship between LenX and X. The 'Trick' attribute of ColorCube came from telling myself, this might just do the trick.
Thanks for looking. It means a lot to me.
Upon some reflection, I think I need to move most of ColorCube's attributes to the sliders and do all the processing from there.
Advertisement