Want to know how to open a model in Solibri using the api method openModel

Viewed 36

I want to write a code to open a model in Solibri using the method

public static Model openModel​(String name,  InputStream inputStream) throws ModelOpeningException

in Solibri api, but am unable to do it could someone explain how to go through this the file to be opened has an .smc extension. this is in java

1 Answers

Please refer to following codes.

public void openModel(String name, InputSteam inputStream) throws ModelOpeningException{

 // Get solibri service for accessing models

 var models = SMC.getModels();

// Open model

 var model = models.openModel(name, inputStream);
 
 inputStream.close();

}
Related