M

ViewSheet.Create

Description:
Creates a new ViewSheet.
public static ViewSheet Create(
	Document document,
	ElementId titleBlockTypeId
)
  • document
    The document to which the ViewSheet will be added.
  • titleBlockTypeId
    The type id of the TitleBlock type which will be used by the new ViewSheet. For no TitleBlock, pass invalid element ID.
Return Value ViewSheet The new ViewSheet.
  • The ElementId titleBlockTypeId does not correspond to a TitleBlock type. -or- document is not a project document.
  • A non-optional argument was null
  • The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
  • The document has no open transaction.