TitleBlocks.add Method

Parent Object: TitleBlocks

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.


Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/TitleBlocks.h>

Description

Creates a new title block based on the provided input settings. The new title block is added to the drawing's title block list and does not change the title block on the active sheet. When source is ReferenceTitleBlockSourceType or DrawingFileTitleBlockSourceType and originTitleBlock is empty, all non-default title blocks from the source file are imported (ANSI_TITLEBLOCK and ISO_TITLEBLOCK are skipped); title blocks are imported only when the source file drawing standard matches the target drawing standard (ISO or ASME/ANSI). Title block names are not used to infer standard. Title blocks whose names already exist in the drawing are not imported. If any such name is found in the source file, no title blocks are imported and TitleBlocks.add throws. The returned TitleBlock is the first compatible title block added.

Syntax

"titleBlocks_var" is a variable referencing a TitleBlocks object.

returnValue = titleBlocks_var.add(input)
"titleBlocks_var" is a variable referencing a TitleBlocks object.

#include <Drawing/Drawing/TitleBlocks.h>

returnValue = titleBlocks_var->add(input);
"titleBlocks_var" is a variable referencing a TitleBlocks object.

returnValue = titleBlocks_var.add(input);

Return Value

Type Description
TitleBlock Returns the newly created TitleBlock object, or the first imported title block when originTitleBlock is empty for a template or drawing file source. Throws if the input is invalid or the title block could not be created.

Parameters

Name Type Description
input TitleBlockInput A TitleBlockInput object created using the TitleBlocks.createInput method.

Version

Introduced in version October 2026