Jlink Insert Feature sample in UG
The following code, that is in the Wildfire 4.0 toolkit documentation, always produces the XToolkitNotFound exception. Can anyone tell me if there is something special that I need to know to get this code to work?
public Feature createImportFeatureFromDataFile (Solid solid, String csys, String filename) throws Exception
{
IntfNeutralFile data_source;
ModelItems c_systems;
CoordSystem c_system = null;
Feature import_feature = null;
ImportFeatAttr feat_attr;
try
{
data_source = pfcModel.IntfNeutralFile_Create(filename);
c_systems = solid.ListItems(ModelItemType.ITEM_COORD_SYS);
for (int i = 0; i < c_systems.getarraysize(); i++)
{
if (c_systems.get(i).GetName().equals(csys))
{
c_system = (CoordSystem)c_systems.get(i);
break;
}
}
feat_attr = pfcModel.ImportFeatAttr_Create();
feat_attr.SetJoinSurfs(true);
feat_attr.SetMakeSolid(true);
feat_attr.SetOperation(OperationType.ADD_OPERATION);
feat_attr = null;
import_feature = solid.CreateImportFeat(data_source,
c_system,
feat_attr);
}
catch (jxthrowable x)
{
System.out.println("Exception Occured:" + x);
throw new Exception(x);
}
etc...etc...etc...
Paul

