Accessing Geometry Object Names
Each feature produces one or several output geometry objects. To get the names of these objects, enter
String[] oNames = model.component(<ctag>).geom(<tag>).feature(<ftag>).objectNames();
To get the names of all currently existing geometry objects (the geometry objects that were generated by the last build), enter
String[] oNames = model.component(<ctag>).geom(<tag>).objectNames();
To access one of these objects, you can enter
GeomObject go = model.component(<ctag>).geom(<tag>).obj(<objname>);
where the string <objname> is an object name. If <objname> does not exist in the current state, you get an error message. You can get information about the geometry object go by using the geometry information methods, for example,
int numberOfFaces = go.getNFaces();
To access the finalized geometry (the output of the last feature), use
model.component(<ctag>).geom(<tag>)
Naming of Geometry Objects
The names of the output objects of a feature are formed by appending characters after the feature’s tag, in one of the following ways:
ftag(index). For example, split1(1), split1(2), split1(3) if the feature tagged split1 has three output objects. This method is used for most features.
ftag(i1,i2,...). For example, arr1(1,1), arr1(1,2), arr(2,1), arr1(2,2) for a 2-by-2 array feature tagged arr1. This method is only used for the Array feature.
ftag.objectNameIn2D. For example, wp1.r1, wp1.pt1(1), wp1.pt1(2) if the work plane feature wp1 contains the 2D objects r1, pt1(1), and pt1(2). This method is only used for the WorkPlane feature.
ftag.objectNameIn3D. For example, cro1.blk1 and cro1.cyl1. This method is used for the CrossSection feature.
ftag.objectName. This method can be used for the Import feature, and then objectName is taken from the CAD file.