Quick tip for adding lookup lists to new components

i create a lot of custom dynamic components using typical US lumber sizes and to make the components easier to use, and to provide lookups for objname attribute etc, i like to have a list of lumber sizes to select from. however, typing in the same lists over and over is not as much fun as it sounds… so i created a component template (__lists) which has a bunch of the nominal lumber size lists for lumber, sills, header, etc… however, these lists need to be in the PARENT object to allow them to be visible via the DC options UI.
so… one tactic i use to create the top level DC (e.g. “lumber_assm”) and before i add or configure any other attributes, i “reload” it with my “__lists” component. this now sets all my basic lumber attributes and i can just proceed to do my other work. of course i could have just named it “__lumber_template” etc and loaded and renamed, but i just found these steps to be easy, and i only have to adjust the definition name to get going. of course if you can use a similar tactic to reload more complex DC templates.

__lists-step2 __lists-step3 __lists-step3b __lists-step3c

You also can copy lists and add them via the attribute inspector extension, or if you wish to copy a list from an excel sheet, then if you send email via private message can forward a VBA macro.

Isn’t there a danger that the filepath for the component stills points at the list template, and if a save is done it could overwrite the template file ?

I myself would manually copy the template file in explorer to a new file and rename it, before loading it and adding particular attributes and geometry.

yes, either way works. you have to make sure to rename the definition value and then save as. or do that first as you suggest.

1 Like

thanks! i didn’t realize copy and paste via the attributes inspector was an option,
EDIT: i tried it out and it looks like you can only copy and paste a single attribute name or value at a time. i’m guessing this would be nicer for individual copies esp for formulas.