Table of Contents

Property ExternalReferencePath

Namespace
VectorDraw.Professional.vdPrimaries
Assembly
VectorDraw.Professional.dll

ExternalReferencePath

Gets or sets the external reference file path for this block when the block represents an XREF. If this is set to a valid existing file path the block will be an XREF and the content of Model Entities of the file will be shown as the block content and
the Entities of this block will return the external reference model entities and also the ExternalReferences will updated by adding this document drawing.
If it is set to "" or null then the block will not be an XREF and the block content will be the one defined by its entities collection.

public string ExternalReferencePath { get; set; }

Property Value

string

A string containing the path to the external reference file. An empty string indicates no external reference.

Examples

Set an external reference file path for this block:

var block = document.Blocks.Add("MyBlock");
block.ExternalReferencePath = @"C:\refs\mylib.vdml";
var ins = new vdInsert(document) { Block = block, InsertionPoint = new gPoint(0.0, 0.0, 0.0) };
doc.ZoomExtents();
doc.Redaw(false);

Remarks

The default stored value is an empty string (""). When getting, a null backing field is normalized to an empty string. Setting this property raises the vdDocument.OnBeforeModifyObject event prior to the change and the vdDocument.OnAfterModifyObject event after the change. If the block is not an XREF (IsXref is false) the block's internal entity owner and document are reinitialized so the block's entities are correctly associated with the current document.