Name Property (IExternalReference) Send Feedback
See Also  Example
Gets or sets the name of the external reference.

Syntax

Visual Basic 
Property Name As System.String
C# 
System.string Name {get; set;}
JavaScript 
get_Name () : String
put_Name (
   NewVal : String
)
COM native C++ 
HRESULT get_Name(
   BSTR* Val
) 
HRESULT put_Name( 
   BSTR NewVal
C++ 
DSRESULT get_Name (
   dsString* Val
)
DSRESULT put_Name(
   const dsString& NewVal
)

Property Value

Name of the external reference

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

See Also

Availability

DraftSight V1R1