PC-Dmis 2010 MR3 Object Library | Send comments on this topic. | See Object Hierarchy Chart
SaveAs2 Method
See Also

Collapse All Expand All

Name

  String value containing the full pathway and file name to which to save.

CadAsReference

  Boolean value that determines whether or not to save the CAD as a reference to the original CAD file. This lets you reference your CAD model instead of copying a new one. This helps save disk space.

  - TRUE will save the CAD as a reference.
  - FALSE will create a new CAD file with the same name as the part program.

# Description

Saves the part program with the provided name. CadAsReference allows to save the CAD as reference to the original one

This method lets you save the part program with a new name or in a new file location. It differs from the SaveAs method by letting you save the CAD file as reference.

# Syntax

Visual Basic

    Public Function SaveAs2( _
       ByVal Name As String, _
       ByVal CadAsReference As Boolean _
    ) As Boolean

# Parameters

Name

  String value containing the full pathway and file name to which to save.

CadAsReference

  Boolean value that determines whether or not to save the CAD as a reference to the original CAD file. This lets you reference your CAD model instead of copying a new one. This helps save disk space.

  - TRUE will save the CAD as a reference.
  - FALSE will create a new CAD file with the same name as the part program.

# Return Type

Boolean value. Boolean returns true if the function succeeds, false if it fails. TRUE if the part was saved successfully, FALSE otherwise.

# Example

Sub Main (strText As String)

> Dim

App As Object

Set

App = CreateObject ("PCDLRN.Application")

Dim

Part As Object

Set

Part = App.ActivePartProgram

Part.SaveAs2 "d:\temp\testprogram2.prg",

True

MsgBox Part.FullName

End

Sub

# See Also

PartProgram Object

© Wilcox Associates, Inc. All Rights Reserved.

© 2010 All Rights Reserved.