-
Notifications
You must be signed in to change notification settings - Fork 34
How to edit multiple models in one script
Ondřej Michal edited this page Mar 31, 2022
·
6 revisions
If your project requires editing multiple models you can do it. The only think that prevents such use is session defined in initModel.py. The variable called trans allows us to create persistent connection. This is much faster but allows only one model to be edited. With cModel = Client(new) instead of cModel = Client(new, transport=trans) the connection is established every time the request is send. With this one adjustment the following can be executed. NOTE: Check Server port range in Program Options & Settings if working with more than 8 models (8081 is port reserved by application, 82-89 by models).
Model(True, 'TestModel5')
Material(1, 'S235')
Model(True, 'TestModel6')
Material(1, 'S275')
Model(True, 'TestModel7')
Material(1, 'S275')
Model(False, 'TestModel5')
Material(2, 'S450')
Model(False, 'TestModel6')
Material(2, 'S450')
Model(False, 'TestModel7')
Material(2, 'S450')
Model(False, 'TestModel5')
Material(3, 'S355')`