Reply

Add Break Line to DrawingView via API

Is there a way to add break lines to a drawing view via the API?

2 REPLIES

Re: Add Break Line to DrawingView via API

Can anybody answer this old question, please?

The following video shows what I want to do with API:

https://www.youtube.com/watch?v=sfU_n1w-4IU

Thanks in advance!

Re: Add Break Line to DrawingView via API

Just in case anoyone else comes looking. I found an aswer to this old question. Turns out the API call for this is not in the ST8 documentation as far as I could find. Here's how to add break lines to a part

 

Sub breakLineExample()

 

Dim objDrawingView as SolidEdgeDraft.DrawingView

Dim objBreakLine as SolidEdgeDraft.BreakLinePair

Dim X As Double

Dim Y as Double

Dim BreakWidth as Double = 0.01       'Units are in meters

 

objDrawingView.GetOrigin(X,Y)       'Get the coordinates of the drawing view's origin

 

objBreakLine = objDrawingView.BreakLinePairs.Add(SolidEdgeDraft.BreakLinePairDirConstants.igBreakLinePairDirConstants_Vertical, X - (BreakWidth / 2), X + (BreakWidth / 2), false)

 

objDrawingView = nothing

objBreakLine = nothing

 

End Sub

 

You can als specify the breakline type and other properties.

 

Good Luck!