I appreciate the input as I am sure other people will as well. I am finding the people in the Sketchup community very helpful. Thanks again.
Hi Dave. I watch a bit of a video and it explains exactly some of the problems I am having. It is very helpful thanks again.
Do you know a programmatic way to create a Group, assign glue-to to its ComponentDefinitionās Behavior and then place an instance in the model such that the glue-to takes effect? I canāt make this work, so Iād be interested in seeing how. Using Ruby I created a Group, set the glue-to Behavior on its CD, then added an instance to the modelās Entities with a Transformation that placed it on an existing rectangle. It placed at the desired location, but was not glued.
In the GUI, behaviors take effect only as you place new instances of the CD, either by pulling them from the Components window or copying an existing glued instance, but you canāt do either of those for a Group. If you canāt do it using Ruby either, then setting the values on the Groupās CDās Behavior is of purely academic interest!
Note that a Groupās ComponentDefinition has a flag set, queried via the group? method, that indicates this CD is for a Group. As a result it isnāt necessary that the CDās for Groups behave the same way as those for ComponentInstances. The GUI already uses this flag to ignore Groups in the Components window.
This also works in a purely programming sense, but since as you note it shows nowhere in the GUI it is of value only within your own coding context.
Iām not really all that familiar with DCās in general. It seems that I was a bit too tired last night/this morning, and confused the definition and instance documentation. Gluing is only in the ComponentInstance classā¦ I donāt know where I saw it in the Behavior or Group classā¦ obviously Iām insane, or I am currently blind. Either way, I havenāt had a need to do any of this, I just always assumed it was possible based on what I had casually seen while flipping through the docs in search of unrelated information.
I tried to get cuts_opening to work, but I couldnāt get it to work for the ComponentInstance eitherā¦ Didnāt try to hard, but I might give it a try later on when I have some free time. I had recently been playing around with the topic, but Iām not really familiar with utilizing any of the extra features that are available with DCās or just regular olā component instances. I havenāt had many requests to programmatically create/modify geometry in the scene. Iām typically just analyzing the existing scene as it is.
My apologizes for posting incorrect and confusing statements in the middle of the night!
Not a problem, I was just seeking edification if there is a way. I like to learn
Incidentally, I was using āCDā as an abbreviation for āComponentDefinitionā. Since you wrote āDCā, which is commonly used as an abbreviation for āDynamic Componentā I hope you didnāt think that was what I meant!
I confuse myself, no assistance necessary
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.