Click or drag to resize

BlockTableRecordExtensionInsertBlockReference Method

Inserts a block reference.

Namespace:  Gile.AutoCAD.R20.Extension
Assembly:  Gile.AutoCAD.R20.Extension (in Gile.AutoCAD.R20.Extension.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public static BlockReference InsertBlockReference(
	this BlockTableRecord target,
	Transaction tr,
	string blkName,
	Point3d insertPoint,
	double xScale = 1,
	double yScale = 1,
	double zScale = 1,
	double rotation = 0,
	Dictionary<string, string> attribValues = null
)

Parameters

target
Type: BlockTableRecord
Instance to which the method applies.
tr
Type: Transaction
Transaction or OpenCloseTransaction to use.
blkName
Type: SystemString
Nlock name.
insertPoint
Type: Point3d
Insertion point.
xScale (Optional)
Type: SystemDouble
X scale factor.
yScale (Optional)
Type: SystemDouble
Y scale factor.
zScale (Optional)
Type: SystemDouble
Z scale factor.
rotation (Optional)
Type: SystemDouble
Rotation
attribValues (Optional)
Type: System.Collections.GenericDictionaryString, String
Collection of key/value pairs (Tag/Value).

Return Value

Type: BlockReference
The newly created BlockReference.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BlockTableRecord. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if target is null.
ArgumentNullExceptionThrown if tr is null.
ArgumentExceptionThrown if blkName is null or empty.
See Also