IExternalReference Interface

IExternalReference Interface | Send Feedback
See Also Members Example

Allows access to an external reference (e.g., referenced drawing).

# Syntax

Visual Basic |
--- | ---
    Public Interface IExternalReference

C# |
--- | ---
    public interface IExternalReference

JavaScript |
--- | ---
    Object dsExternalReference

COM native C++ |
--- | ---
    interface IExternalReference

C++ |
--- | ---
    class dsExternalReference

# Example

This code snippet shows how to get the external references and their names and paths.

#### COM native C++

> _variant_t pVariantArray = dsDoc->GetExternalReferences();
> if( V_VT( &pVariantArray ) != VT_EMPTY )
> {
> IExternalReferencePtr *ExtRef = NULL;
> int countOfExtRef = 0;
> TypeConverter::convertVariantArrayToPtrArray<IExternalReferencePtr, IExternalReference>( pVariantArray, ExtRef, countOfExtRef );

> if( ExtRef && countOfExtRef > 0)
> {
> for( int i = 0; i < countOfExtRef; ++i )
> {
> bstr_t blockName= ExtRef[i]->GetName();

> > bstr_t xRefPath = ExtRef[i]->GetPathName();

> > }
> > delete[] ExtRef;
> > }
> > }

# Example

Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (C#)
Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (VB.NET)
Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (VBA)
Insert External Reference (C#)
Insert External Reference (VB.NET)
Insert External Reference (VBA)

# Accessors

IBlockDefinition::GetExternalReference

IDocument::GetExternalReferences

IExternalReference::GetChildren

IExternalReference::GetParents

# Object Model

ExternalReference

# See Also

####

IExternalReference Members
Interop.dsAutomation Namespace
ISketchManager::DetachExternalReference Method ()