PMIAnnotations.itemsByEntities Method

Parent Object: PMIAnnotations

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.


Defined in namespace "adsk::fusion" and the header file is <Fusion/PMI/PMIAnnotations.h>

Description

Gets all the PMI from the collection that are associated with the specified geometric entities and optionally match the specified PMI types.

This is useful for finding PMI that reference specific geometric features.

Syntax

"pMIAnnotations_var" is a variable referencing a PMIAnnotations object.
# Uses no optional arguments.
returnValue = pMIAnnotations_var.itemsByEntities(entities)

# Uses optional arguments.
returnValue = pMIAnnotations_var.itemsByEntities(entities, types)
"pMIAnnotations_var" is a variable referencing a PMIAnnotations object.

#include <Fusion/PMI/PMIAnnotations.h>

// Uses no optional arguments.
returnValue = pMIAnnotations_var->itemsByEntities(entities);

// Uses optional arguments.
returnValue = pMIAnnotations_var->itemsByEntities(entities, types);

Return Value

Type Description
PMIAnnotation[] Returns an array of PMI objects that are associated with the specified entities and match the type filter (if provided) or an empty array if no matching PMI were found.

The type of the objects returned is the base class PMIAnnotation.

Parameters

Name Type Description
entities Base[] An array of core.Base objects that represent the geometric entities to search for associated PMI. These can be BRepFace, BRepEdge or BRepVertex objects. The function will return the PMI that references any of these entities in their geometric associations.

For example, a Diameter Dimension PMI associated with a cylindrical face, a Hole/Thread Note PMI associated with faces that define a hole feature, or a Leader Line Note PMI associated with an edge or vertex.
types integer[] An optional array of PMITypes that filters the results to include only PMI that matches the type presented in the specified types. If an empty array or null is passed, all the PMI associated with the specified geometric entities will be returned, regardless of type.

This is an optional argument whose default value is null.

Version

Introduced in version April 2026