ReadAutodesk.CreateXRef Method

Creates a block with the loaded entities, adds it to the Environment, marks it as external reference and returns a BlockReference to that block.
Public Function CreateXRef( _ 
ByVal blockName As String, _ 
ByVal basePoint As Point3D, _ 
ByVal environment As Environment, _ 
Optional ByVal exportFileName As String = null, _ 
Optional ByVal exportMode As blockExportType = WriteAutodesk.blockExportType.ExternalReference _ 
) As BlockReference
This language is not supported or no code example is available.
public BlockReference CreateXRef( 
string blockName
Point3D basePoint
Environment environment
string exportFileName = null, 
blockExportType exportMode = WriteAutodesk.blockExportType.ExternalReference 
)
This language is not supported or no code example is available.

Parameters

blockName
string

The name of the block that will contain the loaded entities

basePoint
Point3D

Base point of the created BlockReference

environment
Environment

The Environment object to which add the block

exportFileName
string

The filename of the external reference. If empty, uses the name of the file read from disk or the "<param name="blockName" />.dwg" if the file was read from a stream

exportMode
blockExportType

The export mode that defines whether the file of the external reference will be written to disk in case of a subsequent call to WriteAutodesk. The (blockExportType.Embedded export mode is not supported).

Return Value

BlockReference

The blockReference referring to the created block.

Remarks
 

The block base point is taken from the BasePoint.

The ReadFileAsync.Entities, ReadFileAsyncWithBlocksAndLayers.Layers, ReadFileAsyncWithBlocks.Blocks and ReadFileAsyncWithDrawings.TextStyles are added to the Model and then are set to null.

.NET Framework

Supported in: 4.8

In this article

Definition