BlockTableExtensionGetBlock Method |
Gets the objectId of a block definition (BlockTableRecord) from its name.
If the block is not found in the block table, a dwg file is searched in the support paths and added to the block table.
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)
Syntaxpublic static ObjectId GetBlock(
this BlockTable blockTable,
string blockName
)
<ExtensionAttribute>
Public Shared Function GetBlock (
blockTable As BlockTable,
blockName As String
) As ObjectId
public:
[ExtensionAttribute]
static ObjectId GetBlock(
BlockTable^ blockTable,
String^ blockName
)
[<ExtensionAttribute>]
static member GetBlock :
blockTable : BlockTable *
blockName : string -> ObjectId
Parameters
- blockTable
- Type: BlockTable
Block table. - blockName
- Type: SystemString
Block name.
Return Value
Type:
ObjectIdThe ObjectId of the block table record or ObjectId.Null if not found.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
BlockTable. 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
See Also