"""
model :: String -> <ReadGraph> Model
model name = match possibleResourceChild (currentProject ()) name with
- Just m -> fromResource m
+ Just m -> m
Nothing -> fail $ "Didn't find a model " + name + "."
"""
and returns the `configuration` resource
"""
configurationOf :: Model -> <ReadGraph> Configuration
-configurationOf m = do
- conf = singleObject (toResource m) SIMU.HasConfiguration
- fromResource conf
+configurationOf m = singleObject m SIMU.HasConfiguration
"""
Returns the list of all models in the current project.
"""
allModels :: () -> <ReadGraph> [Model]
-allModels _ = map fromResource $ objectsWithType (currentProject ()) L0.ConsistsOf SIMU.Model
+allModels _ = objectsWithType (currentProject ()) L0.ConsistsOf SIMU.Model
importJava "org.simantics.modeling.ModelingUtils" where
"""Removes the index associated with the model."""