TagFolderRef
A lightweight placeholder for a TagFolder that hasn’t been fully loaded yet.
When you create tag folders inside a SketchupOperation,
the API returns TagFolderRef objects immediately, before
SketchUp has finished processing. You can pass these refs to
other operation methods (like creating tags inside the folder),
but if you need the full TagFolder instance, you can
request it with entityForRef().
Tag folders organize tags (layers) into collapsible groups in the Tags panel — useful when a model has many tags.
Think of a ref as a “claim ticket” — it guarantees a tag
folder will exist after the operation commits, but it doesn’t
carry the folder’s properties (name, children, etc.) yet.
A ref is only valid inside the performOperation callback
that created it — do not return it or use it after the
operation commits.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();
await model.performOperation(async op => { // Create a folder to organize MEP tags const folderRef = op.createTagFolder('MEP');
// Create tags inside the folder op.createTag('Plumbing', folderRef); op.createTag('Electrical', folderRef); op.createTag('HVAC', folderRef);
const folder = await op.entityForRef(folderRef); console.log(folder.name); // => "MEP"}, 'Create MEP tag folder');Properties
Section titled “Properties”sketchupId
Section titled “sketchupId”
readonlysketchupId:Readonly<SketchupId>
Returns
Section titled “Returns”the sketchupId of this tag folder reference
readonlytype:TagFolder=EntityType.TagFolder
Accessors
Section titled “Accessors”typeName
Section titled “typeName”Get Signature
Section titled “Get Signature”get typeName():
string
Returns a named variant of the type field.
SDK 2.35.0
Returns
Section titled “Returns”string
Methods
Section titled “Methods”toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string