AddColumnAttachment Method


Attaches the column to the target. If an attachment already exists with the same "baseOrTop" value, no attachment is made.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

C#
public static void AddColumnAttachment(
	Document doc,
	FamilyInstance column,
	Element target,
	int baseOrTop,
	ColumnAttachmentCutStyle cutColumnStyle,
	ColumnAttachmentJustification justification,
	double attachOffset
)
Visual Basic
Public Shared Sub AddColumnAttachment ( _
	doc As Document, _
	column As FamilyInstance, _
	target As Element, _
	baseOrTop As Integer, _
	cutColumnStyle As ColumnAttachmentCutStyle, _
	justification As ColumnAttachmentJustification, _
	attachOffset As Double _
)
Visual C++
public:
static void AddColumnAttachment(
	Document^ doc, 
	FamilyInstance^ column, 
	Element^ target, 
	int baseOrTop, 
	ColumnAttachmentCutStyle cutColumnStyle, 
	ColumnAttachmentJustification justification, 
	double attachOffset
)

Parameters

doc
Type: Autodesk.Revit.DBDocument
The document containing column and target.
column
Type: Autodesk.Revit.DBFamilyInstance
A column.
target
Type: Autodesk.Revit.DBElement
A target element.
baseOrTop
Type: SystemInt32
0 to attach the column base, 1 to attach the column top.
cutColumnStyle
Type: Autodesk.Revit.DBColumnAttachmentCutStyle
Control the handling of columns that intersect their targets.
justification
Type: Autodesk.Revit.DBColumnAttachmentJustification
Control the column extent in cases where the target is not a uniform height.
attachOffset
Type: SystemDouble
An additional offset for the bottom. If positive, the column base or top will be higher than the attachment point; if negative, lower.

Remarks

This method modifies both column and target elements.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException column is not a column that supports ColumnAttachments. -or- target is not a valid target for ColumnAttachments. -or- column already has an attachment at its base or top as specified by baseOrTop. -or- column already has an attachment to target.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException baseOrTop must be either 0 or 1. -or- The given value for attachOffset must be no more than 30000 feet in absolute value. -or- A value passed for an enumeration argument is not a member of that enumeration

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →