Solid Edge Framework Type Library
Get_Set_FileNamingRule Method
Solid Edge Framework Type Library > Application Object : Get_Set_FileNamingRule Method
Gets the value of SEOption if set to True, else sets the value of SEOption
Used as input parameter if bGet is false, to set the value
Used as output parameter if bGet is true, to return the value
Description
Get or set 'File Naming Rule' SE Option checkbox. True value means 'Use Document Number and Revision' rule set, False is for 'None'.
Syntax
Visual Basic
Public Sub Get_Set_FileNamingRule( _
   ByVal bGet As Boolean, _
   ByRef bValue As Boolean _
) 
Parameters
bGet
Gets the value of SEOption if set to True, else sets the value of SEOption
bValue
Used as input parameter if bGet is false, to set the value
Used as output parameter if bGet is true, to return the value
Example
Imports System.IO
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim iVal As Boolean = True

        Try
            'Get Solid Edge Application Object
            objSEApplication = CType(GetObject(, "SolidEdge.Application"), SolidEdgeFramework.Application)
            'Set the "Use Solid Edge data management" option in Solid Edge options to True
            objSEApplication.Get_Set_UseBiDM_SEOption("False", iVal)
            'Set the "Automatically name files via Document Number and Revision" to True
            objSEApplication.Get_Set_FileNamingRule("False", iVal)

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
using System;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
public class Form1
{
    private void Button1_Click(object sender, EventArgs e)
    {
        SolidEdgeFramework.Application objSEApplication = null;
        bool iVal = true;

        try
        {
            //Get Solid Edge Application Object
            objSEApplication = (SolidEdgeFramework.Application)Microsoft.VisualBasic.Interaction.GetObject(null, "SolidEdge.Application");
            //Set the "Use Solid Edge data management" option in Solid Edge options to True
            objSEApplication.Get_Set_UseBiDM_SEOption("False", iVal);
            //Set the "Automatically name files via Document Number and Revision" to True
            objSEApplication.Get_Set_FileNamingRule("False", iVal);

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }

    public Form1()
    {
        SubscribeToEvents();
    }


    private bool EventsSubscribed = false;
    private void SubscribeToEvents()
    {
        if (EventsSubscribed)
            return;
        else
            EventsSubscribed = true;

        Button1.Click += Button1_Click;
        Button1.Click += Button1_Click;
    }

}
See Also

Application Object  | Application Members