Solid Edge How to use (Inspect > Optimize > Finish) optimize command in ST10 for Synchronous and Ordered mode

2021-10-06T23:52:30Z
PART/SHEETMETAL

Summary


Details

How to use (Inspect > Optimize > Finish) optimize command in ST10 for Synchronous and Ordered mode





Solution

Imports System.Runtime.InteropServices


Imports System.IO


 


ModuleModule1


    Sub Main()


 


        Dim objApplication As SolidEdgeFramework.Application = Nothing


        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing


        Dim objModels As SolidEdgePart.Models = Nothing


        Dim objModel As SolidEdgePart.Model = Nothing


        Dim objConstructions As SolidEdgePart.Constructions = Nothing


        Dim objConstructionModel As SolidEdgePart.ConstructionModel = Nothing


 


        Dim file AsString = ""


        Try


            objApplication = Marshal.GetActiveObject("SolidEdge.Application")


            objPartDocument = objApplication.ActiveDocument


 


            'For Synchronous Mode 


            objPartDocument.ModelingMode = SolidEdgePart.ModelingModeConstants.seModelingModeSynchronous


 


            'For Ordered Mode


            objPartDocument.ModelingMode = SolidEdgePart.ModelingModeConstants.seModelingModeOrdered


 


            objModels = objPartDocument.Models


            Dim nCount AsInteger = objModels.Count()


            objModel = objModels.Item(1)


 


            objModel.HealAndOptimizeBodyEx(False, True, True, True, True, "c:\temp\gtac.txt")


            objModels.Item(1).Recompute()


 


        Catch ex AsException


            Console.WriteLine(ex.Message)


        Finally


            Console.WriteLine("GTAC")


        EndTry


 


    EndSub


EndModule





Hardware/Software Configuration

Platform: INTL64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V110.0
Function: CUSTOM_SAMPLES

Ref: 001-8531844

KB Article ID# PL8002090

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES