Lorenzo Gil Sanchez wrote:
> Hi all,
>
> I'm finding some problems when creating a PyModel:
>
> model.addEntity(my_entity) does nothing but
> model.entities.append(my_entitye) works
>
> This is not really important and I guess it's easy to fix.
Probably easy to fix, yes, I'll check that, thanks for reporting.
> The next problem is more important:
>
> model.build
> defaultModelSet().addModel(model)
>
> fails with this exception:
[...]
> defaultModelSet().addModel(model.component)
> works without a warning but I'm not sure if this is the preferred way
> of adding a model to the modelset.
Yes, this is a known bug, ModelSet.addModel() (and other methods in
ModelSet as well) only accepts Modeling.Model objects, not PyModels.
In the meantime, adding the PyModel.component is the correct
workaround.
-- Sébastien.
|