Get or set 'File Naming Rule' SE Option checkbox. True value means 'Use Document Number and Revision' rule set, False is for 'None'.
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; } }