======== Methods_ ======== getModel ======== .. autofunction:: hwx.inspire.core.Core.getModel **Example** .. code-block:: from hwx import inspire model = inspire.getModel() # get objects in the model print("objects:", model.getChildren()[:3], "...") newModel ======== .. autofunction:: hwx.inspire.core.Core.newModel **Example** .. code-block:: from hwx import inspire # Start with an empty model model = inspire.newModel() # New model is initialized with materials, ... print("initial objects:", set(type(obj) for obj in model.getChildren())) # Construct your model from scratch model.createSolidSphere() inspire.fitView() openFile ======== .. autofunction:: hwx.inspire.core.Core.openFile **Example** .. code-block:: from hwx import inspire filePath = inspire.getTutorialFilePath("Structures/baseline_oilpan.stmod") model = inspire.openFile(filePath) print("parts:", model.parts) importFile ========== .. autofunction:: hwx.inspire.core.Core.importFile **Example** .. code-block:: from hwx import inspire model = inspire.getModel() print("parts:", model.parts) filePath = inspire.getTutorialFilePath("Structures/bolt.x_t") inspire.importFile(filePath) print("parts:", model.parts) # Add new part filePath = inspire.getTutorialFilePath("Structures/bracket.x_t") inspire.importFile(filePath) print("parts:", model.parts) inspire.fitView() getTutorialFilePath =================== .. autofunction:: hwx.inspire.core.Core.getTutorialFilePath openTutorialFile ================ .. autofunction:: hwx.inspire.core.Core.openTutorialFile importTutorialFile ================== .. autofunction:: hwx.inspire.core.Core.importTutorialFile getUnits ======== .. autofunction:: hwx.inspire.core.Core.getUnits usingUnits ========== .. autofunction:: hwx.inspire.core.Core.usingUnits getProject ========== .. autofunction:: hwx.inspire.core.Core.getProject getMaterials ============ .. autofunction:: hwx.inspire.core.Core.getMaterials getSystemDirectory ================== .. autofunction:: hwx.inspire.core.Core.getSystemDirectory getSetting ========== .. autofunction:: hwx.inspire.core.Core.getSetting setSetting ========== .. autofunction:: hwx.inspire.core.Core.setSetting ishole ====== .. autofunction:: hwx.inspire.core.Core.ishole runningInBatch ============== .. autofunction:: hwx.inspire.core.hwfdmpluginAdapter.runningInBatch **Example** .. code-block:: :caption: Check if application is running in gui or batch mode. from hwx import inspire if inspire.runningInBatch(): print("We are running in batch mode") else: print("We are running in gui mode") enableDebugMessaging ==================== .. autofunction:: hwx.inspire.core.Core.enableDebugMessaging **Example** .. code-block:: :caption: Print inspire messages to command window. Use parameter level to set the debug level. Level must be one of ERROR, WARN, INFO or ALL. Level can also be set to False to disable messaging. from hwx import inspire inspire.enableDebugMessaging(level="ALL") print('TODO make an error occur so we can see the message') runInParallel ============= .. autofunction:: hwx.inspire.core.FEAnalysis.runInParallel resultsFormatOptions ==================== .. autofunction:: hwx.inspire.core.FEAnalysisResults.resultsFormatOptions