Automatic naming of sub-components  Topic is solved

Automatic naming of sub-components

Postby Tomgood » Thu Mar 26, 2020 6:06 pm

Hy It`s my first post here so let me know if I`m at the wrong place.

I`m looking for a way to label my components inside my dynamic cabinet in one step. I hoped there would be a plugin which it would allow me to add a Nr. to each sub-component.
Or is there a way to add a function in my dynamic component which allows me to rename my components in one step?
For e.g. I have a dynamic component (see attachment) which contains two sides, top/bottom and one back. Each component has already a letter assigned. I write my plans in French so it would be “C” (Cote/Sides) “D” (Dos/Back) “HB” (Top/Bottom).
If I have multiple cabinets, I would add a nr. at each component e.g. C1,D1,HB1
This way every part will be assign to its cabinet 1,2,3…. Which will be labeled in my plans for the shop.
I create my cut lists with “cut list 4.1”
I add a full example in the attachment so you can better understand what my problem is.

I`m thankful for any inside here
Regard Thomas


Re: Automatic naming of sub-components  Topic is solved

Postby pcmoor » Fri Mar 27, 2020 11:05 am

Instance names are automatic updated in outliner, DC option and attribute dialog, also labels in layout. So my recommendation is to use component names for generic terms like panel, board, box...then their #numbers are somewhat redundant. And specific for instance names

The attached file contains a DC, select one of the instance name for any of the generic panels in outliner. Change this instance in Entity info and you will see that its updated in the option and attribute DC dialog. There is a report attached to the file and this is reference to the instance name too.
The parts are made from one DC panel that is placed using a version of the rotation rectangle script, to place, orientate and scale as require, plus excess to the options.

As you would be aware, cutlist 4.1 reports component definition names. However you can change the cutlist script to use the instant names if available otherwise the component name by going into the ruby file and replacing compName = in the reporter


if == "" then
compName =
compName =

save, if sketchup open, close and reopen for the script to reload,

Note if you do decide to use the "power" of instance names for your DCs, then you cannot use the "Name" attribute in the component info section as this disables this function, plus when first creating a DC this does not work, until you have "saveas" it to a folder and inserted an instance.
(You can use _name in the value section to reference the existing definition name if require for an attribute like description = _name & " " & lenx & "x" & leny )

If you wish to create the DC placing script, please ask, then will show what I use, but note the ruby,though works is still at a basic level, I am still learning and do not have the expertise of some of the others on this forum.


Re: Automatic naming of sub-components

Postby Tomgood » Fri Mar 27, 2020 5:48 pm

Thank you "pcmoor"

I really appreciate you helping me out hear.

I do not have any programming skills jet. So it will probably take me a while to understand your replay fully.

But just a thought tough.
Do you think its possible to change the script from “cutlist 4.1” that it would add the “Definition” of the DC component to its subcomponent’s “definition”?
That way I wouldn’t have to change any of my dc and the way I name them.

Thank you very much
Regards Thomas


SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Ad Machine 


Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 2 guests

Visit our sponsors: