ActiveField - QuickField API help

QuickField Student Edition free download     Contacts

ActiveField Technology

Objects Overview

Hierarchy Chart

How to Start: Application Object

How to work with Problems

How to work with Model

How to work with Data

How to Analyze Results

Objects

Properties

Methods

Labels Object

Properties

Methods

Summary

The collection of labels of the same geometric type.

Details

Represents a collection of the Label objects of the same type (block, edge or vertex label). The Labels collection for the DataDoc object contains all the labels in the Data document, whereas the Labels collection for the Problem object contains all the labels referred by the problem. Each data document and problem document has three Labels collections associated with it according to three types of label: block, edge and vertex label.

Using the Labels Collection

The Item( index) method of Labels collection returns a single Label object. Parameter Index is the name of the label or one-based number. The Item method is a default method for Labels collection, so you can omit it.

The Add method creates a new empty Label, the Insert methods copies an existing Label to the collection. To remove the label from the collection, use the Remove method. You can also know the type of labels in the collection by Type property.

If you get a Labels collection using the Labels of a Problem object, each Label might be located in one of two data documents associated with the problem.

The following example copies a label named "ALNICO down" from the library data document of the prb problem to the primary data document of the Magn1 problem and then renames it to "ALNICO magnet":

Dim lb As QuickField.Label, lbNew As QuickField.Label
Set lb = prb.Library.Labels(qfBlock)("ALNICO down")
Set lbNew = prb.DataDoc.Labels(qfBlock).Insert(lb)
lbNew.Name = "ALNICO magnet"