Solid Edge Framework Type Library
AutoCadConfigFile Property
Description
Property to get\set the AutoCAD configuration .ini file.
Property type
Read-write property
Syntax
Visual Basic
Public Property AutoCadConfigFile As String
Remarks
When opening draft files, the OpenWithTemplate method allows the designation of both the AutoCAD file and the Draft file Template, but does not allow the designation of the SEACAD.INI file to be used. Since the units designation is is the SEACAD.INI file, there is a possibility of loading a DXF file at the wrong scale factor (when loading programmatically).
Example
Option Infer On

Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As SolidEdgeFramework.Application = Nothing

            Try
                ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register()

                ' Attempt to connect to a running instance of Solid Edge.
                application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)

                ' Get the documents collection.
                Dim documents = application.Documents

                documents.AutoCadConfigFile = "C:\myseacad.ini"
            Catch ex As System.Exception
                Console.WriteLine(ex)
            Finally
                OleMessageFilter.Unregister()
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            SolidEdgeFramework.Application application = null;

            try
            {
                // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.
                application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");

                // Get the documents collection.
                var documents = application.Documents;

                documents.AutoCadConfigFile = @"C:\myseacad.ini";
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                OleMessageFilter.Unregister();
            }
        }
    }
}
See Also

Documents Collection  | Documents Members  | Solid Edge V18 - What's New