Add dimension on sweep path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! some body can ask me how to add dimension on sweep path! I include 3Dsketch on my view, but i can't add dimension on. If I try manualy I can!
This code work good with all type of drawingcurve is select, except if origine of curve is 3Dsketch
Sub CreateDimension()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oCurve1 As DrawingCurve
Set oCurve1 = oDoc.SelectSet(1).Parent
Dim oIntent1 As GeometryIntent
Set oIntent1 = oSheet.CreateGeometryIntent(oCurve1)
Dim oPt As Point2d
Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(15, 15)
Dim oLinDim As LinearGeneralDimension
Set oLinDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPt, oIntent1)
End Sub
Thanks!!