Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,Everyone
Recently,I want to use logic o create section view, but the code I write doesn't work. Great God, please help me see what went wrong.
Dim oDrawingDoc As DrawingDocument
oDrawingDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawingDoc.Sheets.Item(1)
Dim oPoint1 As Point2d
oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(-1500#, -1500#)
Dim oView1 As DrawingView
oView1=oSheet.DrawingViews.Item(1)
Dim oPoint2 As Point2d
oPoint2 = ThisApplication.TransientGeometry.CreatePoint2d(1000#, 1000#)
Dim oPoint3 As Point2d
oPoint3 = ThisApplication.TransientGeometry.CreatePoint2d(-100#, 100#)
Dim oDrawingSketch As DrawingSketch
oDrawingSketch = oView1.Sketches.Add
oDrawingSketch.Edit
Dim oSketchLine As SketchLine
oSketchLine = oDrawingSketch.SketchLines.AddByTwoPoints(oPoint1, _
oPoint2)
oDrawingSketch.ExitEdit
Dim oView2 As SectionDrawingView
oView2 = oSheet.DrawingViews.AddSectionView(oView1, _
oDrawingSketch, oPoint3, kHiddenLineRemovedDrawingViewStyle,,,,,,)
oDrawingSketch.Visible = False
Solved! Go to Solution.