Create new file

This function create a new “3DShape” and assign the according window to a variable [Typ: Window]. The variables “MyEditor” and “MyPart” are assigned to the new editor and the new part.

Public Function CreateNewFileAndSetWindow(ByRef MyEditor As Editor, ByRef MyPart As Part) As Window
    Dim MyService As PLMNewService
    
    Set MyService = CATIA.GetSessionService("PLMNewService")
    MyService.PLMCreate "3DShape", MyEditor
    Set CreateNewFileAndSetWindow = CATIA.ActiveWindow
    Set MyPart = MyEditor.ActiveObject    
End Function

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

+ 73 = 76