FindLocalObject Subroutine

Finds an object inside a group based on the object's partial name. The group could be a Picture, DynamoSet or a Group of shapes.

Syntax

FindLocalObject (StartObject, PartialName)

Properties

The FindLocalObject subroutine syntax has these parts:

Part

Description

StartObject

Object. The name of the Picture or Group where the object you are looking for is contained.

PartialName

String. A partial name for the object to be found. For example, if the object's full name is PipeColorAnim1, you can pass in “PipeColorA”, or “PipeC”.

Return Value

Object. The first object in the Group whose name contains what is entered for PartialName.

Remarks

For example, if, through scripting, you want to get an object inside a Group in order to animate that particular object's vertical fill, use FindLocalObject with the group's name and just a partial name of the object to fill.

FindLocalObject is typically used for Dynamo sets where a Dynamo objects share common names for all of their contained objects - the only difference being the numeric ending. Forms and subroutines that call this subroutine make use of the partial name to operate on all similar Dynamo objects so that all similar Dynamo objects in a picture can use the same subroutines and forms. This assumes that user creating the Dynamo objects uses a naming convention for the objects inside of the Dynamo object.

 

Example