Solid Edge How to get total dimensions in drawing file

2021-10-06T23:53:31Z
PART/SHEETMETAL

Summary


Details

How to get total dimensions in drawing file?

Solution

Imports System.IO
Imports System.Runtime.InteropServices
Imports SolidEdgeConstants 


Module Module1


    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim objDimensions As SolidEdgeFrameworkSupport.Dimensions = Nothing
        Dim dimension As SolidEdgeFrameworkSupport.Dimension = Nothing
        Dim line2d As SolidEdgeFrameworkSupport.Line2d = Nothing
        Dim lines2d As SolidEdgeFrameworkSupport.Lines2d = Nothing


         Try
 


            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objDraftDocument = objApplication.ActiveDocument
            objSheet = objDraftDocument.ActiveSheet
            objDimensions = objSheet.Dimensions
 
            MsgBox("Total dimensions in drawing file are = " + objDimensions.Count.ToString())


        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            Console.WriteLine("GTAC")
        End Try 


    End Sub
End Module



Hardware/Software Configuration

Platform: AMD64
OS: window
OS Version: XP64
Product: SOLID_EDGE
Application: AUTOMATION
Version: V110.0
Function: API_DOCUMENT

Ref: 002-8007273

KB Article ID# PL8007273

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES