Hide Table of Contents
IGetAttachedEntityTypes Method (IAnnotation)

Gets the object types associated with this annotation.

.NET Syntax

Visual Basic (Declaration) 
Function IGetAttachedEntityTypes() As Integer
Visual Basic (Usage) 
Dim instance As IAnnotation
Dim value As Integer
value = instance.IGetAttachedEntityTypes()
int IGetAttachedEntityTypes()
int IGetAttachedEntityTypes(); 

Return Value

  • in-process, in-process, unmanaged C++: Pointer to an array of longs that indicate the attached entity type as defined in swSelectType_e
  • VBA, VB.NET, C#, and C++/CLI: Not supported
  • See In-process Methods for details about this type of method.


    This method supports all annotation types. Use IAnnotation::GetType to determine the annotation type.

    This method returns an array of longs indicating an object type. The list of object types corresponds with the list of objects returned by IAnnotation::GetAttachedEntities2.

    You can associate annotations with additional items not listed in swSelectType_e. If this annotation is attached to one or more entities not listed, then SolidWorks returns a corresponding swSelNOTHING value in one of the array positions.  IAnnotation::GetAttachedEntities2 indicates the unsupported entity by returning a NULL value in a specific array position. COM applications that call IAnnotation::GetAttachedEntityCount2 include the NULL value in the total count of associated entities.

    Likewise, if an annotation is disassociated from its geometry (dangling), then SolidWorks returns a corresponding NULL in one of the array positions and IAnnotation::GetAttachedEntityTypes and IAnnotation::IGetAttachedEntityTypes return a swSelNOTHING value for the dangling item.

    COM applications must call IAnnotation::GetAttachedEntityCount2 before calling this method. IAnnotation::GetAttachedEntityCount2 determines the necessary array size in your call to IAnnotation::IGetAttachedEntityTypes and creates the list of attached entities.

    NOTE: If this annotation is not associated with any geometry (for example, a note without a leaderline), then SolidWorks returns an empty array.


    See Also


    SolidWorks 99, datecode 1999207

    Provide feedback on this topic

    SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

    * Required

    Subject:   Feedback on Help Topics
    Page:   IGetAttachedEntityTypes Method (IAnnotation)
    *   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

    Print Topic

    Select the scope of content to print:


    We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

     Never show this message again

    Web Help Content Version: API Help (English only) 2012 SP05

    To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

    To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.