Add dimension on sweep path

Add dimension on sweep path

Anonymous
Not applicable
374 Views
0 Replies
Message 1 of 1

Add dimension on sweep path

Anonymous
Not applicable

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!!

0 Likes
375 Views
0 Replies
Replies (0)