Solid Edge Report Bend Center Line Attributes

2021-10-06T23:55:32Z
PART/SHEETMETAL

Summary


Details

--------------- 
Report Bend Center Line Attributes



Solution

 Imports System.IO 
Imports System.Runtime.InteropServices 
Imports SolidEdge.Framework.Interop 
Imports SolidEdge.FrameworkSupport.Interop 
Imports SolidEdge.Constant.Interop 
Imports SolidEdge.Geometry.Interop


Module ReportBendCenterLineAttributes


Sub Main() 
 Dim objApp As SolidEdge.Framework.Interop.Application = Nothing 
 Dim objSheetDoc As SolidEdge.Part.Interop.SheetMetalDocument = Nothing 
 Dim FlatPatternModel As SolidEdge.Part.Interop.FlatPatternModel = 
Nothing 
 Dim FaceBody As SolidEdge.Geometry.Interop.Body = Nothing 
 Dim FaceQueryType As 
SolidEdge.Geometry.Interop.FeatureTopologyQueryTypeConstants 
 Dim FacesCollection As SolidEdge.Geometry.Interop.Faces = Nothing 
 Dim pFace As SolidEdge.Geometry.Interop.Face = Nothing


 Dim int As Integer = 1 
 Dim FaceBodyObj As Object, FacesObj As Object, FaceObj As Object, 
BendCenterLineEndPoints As Object, BendSweepAngle As Object = Nothing, 
BendOrientation As Object = Nothing 
 Dim BendAttributesExist As Boolean 
 Dim AttributeVersion As Object = Nothing 
 Dim BendRadius As Object = 0.0, BendAngle As Object = 0.0 
 Dim StartPoint(3) As Double, EndPoint(3) As Double, Points(9) As Double


 objApp = GetObject(, "SolidEdge.Application") 
 'The .PSM file must have bend and location should be change by user. 
 objSheetDoc = objApp.Documents.Open("C:\Temp\GTAC.psm")


 FlatPatternModel = objSheetDoc.FlatPatternModels.Item(1) 
 FaceBodyObj = FlatPatternModel.Body


 FaceBody = FaceBodyObj 
 FaceQueryType = 
SolidEdge.Geometry.Interop.FeatureTopologyQueryTypeConstants.igQueryAll 
 FacesObj = FaceBody.Faces(FaceQueryType) 
 FacesCollection = FacesObj


 For int = 1 To FacesCollection.Count


 FaceObj = FacesCollection.Item(int) 
 pFace = FaceObj 
 BendAttributesExist = False 
 BendCenterLineEndPoints = Points 
 pFace.GetBendCenterLineAttributesEx(BendAttributesExist, 
BendCenterLineEndPoints, AttributeVersion, BendRadius, BendAngle, 
BendSweepAngle, BendOrientation) 
 If (BendAttributesExist) Then 
 Points = BendCenterLineEndPoints 
 StartPoint(0) = Points(0) 
 StartPoint(1) = Points(1) 
 StartPoint(2) = Points(2) 
 EndPoint(0) = Points(3) 
 EndPoint(1) = Points(4) 
 EndPoint(2) = Points(5) 
 MsgBox("Bend Data Report :" & vbNewLine & "Start Point " & 
vbNewLine & StartPoint(0) & vbNewLine & StartPoint(1) & vbNewLine & 
StartPoint(2) & vbNewLine + "End Point " & vbNewLine & EndPoint(0) & vbNewLine 
& EndPoint(1) & vbNewLine & EndPoint(2) & vbNewLine + "Bend Radius = " & 
BendRadius.ToString() & vbNewLine + "Bend Angle = " & BendAngle.ToString()) 
 End If 
 Next 
 End Sub 
End Module



Notes and References


Hardware/Software Configuration

Platform: INTL64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V110MP5
Function: API_DOCUMENT

Ref: 002-7009648

KB Article ID# PL7009648

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES