Code:
Model model = session.GetCurrentModel();
if (model.GetType() == ModelType.MDL_ASSEMBLY) {
// Das Modell wird zum Assembly gecastet, um eine Komponentenlist zu ermitteln
Assembly asm = (Assembly)model;
Features features = asm.ListFeaturessByType(Boolean.true, FeatureType.FEATTYPE_COMPONENT);
for (int a = 0; a < features.getarraysize(); ++a) {
Feature feat = features.get(a);
// Feature zum ComponentFeat casten und eine ModelDescriptor Object ermitteln.
ComponentFeat curComp = (ComponentFeat)curFeat;
ModelDescriptor descriptor = curComp.GetModelDescr();
// Vom ModelDescriptor wird ein Model erzeugt, von dem man dann die Parameter lesen kann.
Model descrModel = session.GetModelFromDescr(descriptor);
}
}