Replacing components, with dynamic components


#1

Hello, I have turned all these posts of varying heights into components:
[URL=http://s1303.photobucket.com/user/eskimo___/media/Capture_zpsd6e17daf.jpg.html]

[/URL]
I would like to replace all of them with my dynamic component(the top and bottom are constrained whilst the middle isnt): Which needs to conveniently snap to the size of the post components, retaining its proportions so that I have 3-D versions of all the different sized posts.

Any ideas how i can do this?

Many thanks

p.s im building a sort of template to help automate these sorts of conversions from architects 2d to sketchup 3d and would be happy to share it


#2

chamfered post.skp (86.5 KB)

eskimo,

The simplest DC would be to divide the post into top,middle & bottom; such that the detail is contain top & bottom with the middle able to stretch.
It is recommended that all groups are solids (use entity Info to name them)

The 3 groups are made into a component
Formulas

  1. fix the scale to work in z direction only (don’t need x,y)
  2. lenz is allowed to be accessed
  3. fix bottom lenZ
    4, make position Z of middle = same as fix bottom lenZ (fixed @ height of bottom)
  4. fix top lenZ
  5. the middle lenZ = total height - heights of top & bottom

figures 1 & 2 are made up of solids, 3, 4 and 5 are are non-solids

you now have an option to make the component appear non-solid by hiding the adjacent faces/lines.(fig 4) though okay for some, this leads to problems with material painting and complex report writing

the method in fig 5, although appears more involved, holde a container group which can be outer-shelled and exploded leaving a solid component with data attached, thus it can be painted and produces a simpler report.

another benefit of outer-shelling is that any geometry (provided it is so spaced / moved) within and attached is lost, so hidden options can be removed leaving the one choice.

as with all components the result can be swapped, even with its original and reactivated

DCs can get very involved and clunky, I believe this method of using groups for sub-parts and shelling and exploding means that the end drawing does not get filled with redundant data. which means lower file sizes

Food for thought
philip


#3

Food For thought indeed!

Hi Philip, thank you very much for taking the time to look at my query and making sketch up model.

My dynamic component is made to the specification in your points 1 through to 6 & I can confirm that when scaled only the middle section changes size vertically.

I’m just starting out with DCs, I’ve read ur reply but unfortunately I’m a bit confused.

I think I should have made it more clear, that it is the HEIGHT of the each; red, green and blue circled components I want my DC to snap to.

So say my DC measures 1m vertically and the red, green & blue comps measure 2,3,4 meters respectively; when I replaced them with my DC, I would like it to inherit these heights in each case

Many Thanks

Edward


#4

If you current components have attributes chosen (like Lenx=1m)
You can make a the new component take on the parent component’s attributes by placing them within the current component and have their LenX equal the parent LenX. And then delete your old drawing.
If you delete your old posts first, the overall LenX might automatically become 0 and then this method may not work.


#5

Hi quantj,

Thanks for your response. So I followed your instructions, to try and make the “chamfered post” height snap to the height of the “shell”(parent component) and:

as soon as i hit enter after entering “=parent!shell!LenZ”

I got the error in red text show above

Many thanks, I look forward to your response

Edward


#6

You don’t need to write shell. Parent is the same as shell.


#7

I believe you can only swap components and have them up date if they have the same definition. Otherwise swapping a toilet with a basin would resize as they have common attribute names.

So for your case, you have to insert the DC (chamfer post), scale it to the geometry and then delete what you don’t want.

If you make a family (to use a Revit term) of post types using the original DC (chamfer post) as a template, then swapping family members will update

To make a family, draw a new post say with flutes , divide as before (fig 2) then copy (control c) the group (say top) open the chamfer post DC after making it unique, open top, delete its contents (control A, delete) then paste your copy (control v), quite a simple process once one gets use to it.replace the other two sub groups geometry. then close.
you can rename it and save it as a component in your component folders wherever.

I will upload some family and template under another post to demonstrate this technique, in about 6hrs time, but need to work now…


#8

dc.pdf (1.5 MB)

I want to insert my DC & have it conveniently snap to the height of the bounding box. If you see page 3 of the attached; i was hoping that selecting “replace selected” would do exactly that, for both instances.

on page 4 the lenZ feild has the height, but when i double tap it, it says:

=parent!lenZ

so the equation has been retained, so why does it not work?

Pcmoor, really appreaciate your help. I’ll keep an eye out for the family and template on your other posts. This would be a game changing feature, as i regularly import architectural drawings full of many modular entities which i wish to replace in the same way. With a bit more work I could apply it doors windows etc. Vectorworks imports these all as components to start with, so i might as well leverage it

Many Thanks


#9

Hi

Edit: As suggested by Quan, making the component a parentless child does work, you need to trigger a redraw the parent after placing the child
(right click the parent after closing, select redraw from the DC menu)

With regards to the “Families” I loaded two templates, later I will create the post with a movie file, but for now copy some of the results into a folder (right click on a component and save it to a component folder,)

The mouldings created on the left are base, on the right capital, different insert points. but same family
The doors are another family, the glass member is based on the panel, and so inherits some of its original.

each family member when swapped with another of the same, and will update
the component definition is the same, just the geometry is different

You will notice that I haven’t hid the joins, this is because they are based on using the outer shell & explode method.
so click into the component to the next level, there is a notice, and shell,explode. move out and you are left with a standard DC with no sub-components, which should be a solid with no hidden geometry.
You can change some of the attributes, but it wont change, however swapping will reactive to the values chosen.

try them out, hope to redress this Sunday

moulding template.skp (1.3 MB)


#10

door template too big, so doors onlySolid Panel_4.skp (253.4 KB) Glass Panel_1.skp (89.1 KB) Solid Panel_3.skp (240.3 KB) Solid Panel_1.skp (72.5 KB) Solid Panel_2.skp (166.8 KB)

Solid Panel_5.skp (115.5 KB)


#11

to insert and exchange a 2D shape to match the height…skp (27.6 KB)

I left the modified component within the drawing and you should to see on the component browser in the home tab
(the lenZ has temporarily be replaced with =parent!lenz) as per QuanTJ

select the geometry , right click convert to a component. Add the lenZ to the attributes

now open the component and insert the post
close the component
select the component, right click, menu, dynamic, then select redraw

you can now explode the dummy component select the whole lot, the use shift to deselect the post then delete the wasted geometry
you will find lenZ value has now been overwritten.

tried to do some video, but was unable to load it
Philip


#12

Hi Philip,

I followed your instructions and it worked; however I need the DC post to scale to multiple parents, so I experimented:


When you redraw each parent separately, It will only snap to the height of the first pink comp’(please see edit - to insert and exchange a 2D shape to match the height.skp (67.5 KB) attached SU file)

Even making each DC post unique, didnt help, so i explored the families issue; the green post DC has been saved to my desktop and reimported. This did work, however it defies the point of this topic: scaling them all manually would be quicker.

Many Thanks

Edward