Showing results for 
Search instead for 
Did you mean: 

How to add balloon on drawingview

Valued Contributor
Valued Contributor


i want to add a balloon on a drawingview by the  "AddByTerminator" method but my code don't work

I took the code given in the example of the SDK and i modify it


Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgeDraft.DraftDocument

Dim objSheet As SolidEdgeDraft.Sheet

Dim objCircle As SolidEdgeFrameworkSupport.Circle2d

Dim objBalloons As SolidEdgeFrameworkSupport.Balloons

Dim objLine As SolidEdgeDraft.DVLine2d


' Report errors

Const PI = 3.14159265358979

' Create/get the application with specific settings

On Error Resume Next

Set objApp = GetObject(, "SolidEdge.Application")

If Err Then Err.Clear 

   Set objApp = CreateObject("SolidEdge.Application") 

   Set objDoc = objApp.Documents.Add("SolidEdge.DraftDocument") 

   objApp.Visible = True


   Set objDoc = objApp.ActiveDocument

End If

' getting the Active Sheet object

Set objSheet = objDoc.ActiveSheet

' getting the Balloons collection object on the active sheet

Set objBalloons = objSheet.Balloons


Set Drawing = objDoc.Sheets.Item(1).DrawingViews.item(1)

Set objLine = Drawing.DVLines2d.Item(1)


' adding two balloons on the active sheet

Set objBalloon = objBalloons.AddByTerminator(TerminatorObject:=objLine, X1:=0.75, Y1:=0.05, z1:=0, keyPoint1:=True)



' Release objects

Set objApp = Nothing

Set objDoc = Nothing

Set objSheet = Nothing

Set objCircle = Nothing

Set objBalloons = Nothing


Posted by: BONNAUDET eric
Post date: 6/29/2011 11:53:40 PM


RE: How to add balloon on drawingview

Valued Contributor
Valued Contributor

I have find the solution


the good code is :


Set objBalloon = objBalloons.AddByTerminator(TerminatorObject:=objLine.Reference , X1:=0.75, Y1:=0.05, z1:=0, keyPoint1:=True)




Posted by: BONNAUDET eric
Post date: 6/30/2011 4:00:01 AM