How to Edit the Description Attribute of a Component

Hello Forum, I need to edit some Naming Attributes of existing Components. I can’t find a Way to edit the “Description” of a “Definition”. This Field doesn’t show up anywhere after creating a Component.
…or am I just to blind to see?

1 Like

The list of component definition (= not instances) is managed in the components browser. When you select a component definition and switch to the Edit tab, do you see a field for editing its description?

1 Like

Sorry, I’m so stupid. find It. Thank You very much

@Aerilius is there a Way to get the “Strings” of the “Definition” or/and the “Description” of a Component, without opening the Component-File.

To give more Context: I need to rename a bunch of Components. Changing the Names after the fact seams to be tricky. Changing the Filename of the Component obviosly does not work. Sometimes even after editing the Name in the Component Browser, SketchUp uses the old name, adds a suffix#1 to the name which in my case disrupts the List iam generating based on the Definition of these Components.

1 Like

Apart from the file name (and metadata, permissions etc.) there is nothing of the file’s content that you can get without reading the file.

I am having a similar issue to mzoller. I am updating the naming system for all of my library components, of which there are over 500, and can’t get the components to name properly when published to separate collection folders. The only way I have been able to fix the issue is to explode and recreate each component with the new name. I just want the renamed components to publish with the new name.

Also, I don’t understand why when a new component is created, a description can be added which can never again be viewed or edited unless it is opened as it’s own file and accessed via model info.

Is there a workaround or plugin that I am missing that can edit a components description while still in its original space (not saved to collection)?

1 Like

No it’s not the same issue. One cannot obtain content of a file without reading it. Your issue is that you have a file opened in SketchUp and want to modify metadata of multiple components (without saving them to multiple files).

SketchUp has the concept of component definitions and instances. When you create a component from a selection, a component definition is created containing the geometry (and listed in components browser) and a component instance of it is inserted in place of the selection which stores the local occurence of the definition (position etc.).

There are 3 metadata (which are not attributes):

  • component definition name
  • component definition description
  • component instance name

The “Create component” dialog contains a form field asking for the definition name and the definition description, but not for the instance name.

The “Entity Info” inspector allows to give an instance name (“Instance:”) and edit the definition name (“Definition:”).

When selecting the component definition in the components browser, the upper section contains two editable form fields for the definition name and definition description. These are the same as when creating the component, and the same as in Model Info when opening a saved component file.

What do you ean by “publish”? What are the steps you are using to add components to collection folders?

I think the OP is refering to the ‘Save as a local collection’ feature behind the litlle blue detail icon.
If you load or insert a component from a collection (or use the File->import) you can change the name of the definition, but when you want to rightclick at the component and choose ‘Save as’ (Or use the ‘Save as a local collection’) The original name of the definition is used.

Renaming in the finder or explorer does not work, either.

Depending on the size of the components, I usually create a Working File (WF_huppeldepup) were I create the components or reload them if I want to change, something,

Kind of like this:

I used some ruby script to alter the names of the definitions.
That way, I could create names depending on material of the component, finshing etc.

My problem is this:

When saving components to a local collection (Component Browser / In Model (house button) / Details (blue button) / “Save as a local collection”), the output files retain the original name (example: “thingy”) of a component from when it was first created. After saving to a local collection, the name of the original component (not the output file) can be changed (example: widget) but it will still output a file with the original “thingy” name.

I have changed the Instance name, the definition name, and the description name to “widget” and it will STILL output to a local collection as “thingy” when viewed in file explorer.

1 Like

I’m not sure if my problem is the same as mzoller’s, it just seemed like this thread was the most relevant place to ask about my issues. I apologize if i have detracted from the original post.

Hi Mike
I’m having similar issues with component. I’d like to be able to give them more meaningful names via ruby. I’m wondering if you’d be willing to share the scripts you’ve been using. They might be helpful.

I used this one:

rename DTILE component.rb.rb (1.9 KB)
Very specific for the line of work I used to do

Thanks for the amazing quite response :slight_smile:

@Mike - what does your DTILE script exactly do?

I am facing the same issue, needing to edit the description of existing components. It’s quite labourous to find them in the component tray after expaning. Is there maybe a smart plugin out there that lets you edit this in another fashion? I started to use the save with current definition quite a lot to avoid errors when using save as of an edited component. Separate discussion. Thanks, Thomas

that was used to create multiple collections of components of (almost ) the same base model. other extensions I know of are Attribute Inspector

I think @pcmoor has dived deeper in the ruby part.

Thank you Mike - it was worth a try. I tried both the Attribute inspector and Enroth’s similar plugin but could not find a field for description. Weird, as it makes sense to fill in a description (use it for reporting) but then you have to open that component on it’s own or locate it in the expanded component tray which is super unhandy.