shotime
Mechanical
- Feb 6, 2012
- 1
Hello,
I'm looking for help coding a break in a drawing view. The code below is what I have so far. It will only add the lines but not in the proper location.
Any help would be appreciated.
Thanks
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim BreakLine As Object
Dim SelMgr As SelectionMgr
Dim vPos As Variant
Dim xPos1 As Double
Dim xPos2 As Double
Dim retval As Boolean
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID("Drawing View1", "DRAWINGVIEW", 0, 0, 0, False, 0, Nothing)
Part.InsertBreakVertical
xPos1 = 0.15
xPos2 = 0.2
boolstatus = BreakLine.SetPosition(xPos1, xPos2)
Part.EditRebuild3 (swCurrentSheetDisp)
End Sub
I'm looking for help coding a break in a drawing view. The code below is what I have so far. It will only add the lines but not in the proper location.
Any help would be appreciated.
Thanks
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim BreakLine As Object
Dim SelMgr As SelectionMgr
Dim vPos As Variant
Dim xPos1 As Double
Dim xPos2 As Double
Dim retval As Boolean
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID("Drawing View1", "DRAWINGVIEW", 0, 0, 0, False, 0, Nothing)
Part.InsertBreakVertical
xPos1 = 0.15
xPos2 = 0.2
boolstatus = BreakLine.SetPosition(xPos1, xPos2)
Part.EditRebuild3 (swCurrentSheetDisp)
End Sub