Reply

Remove callout from SolidEdge daft

[ Edited ]

 

Beginner here

I want to remove a callout from a draft doc using VB6

 

Posted by: Scott Smith
Post date: 9/14/2009 7:35:39 AM

5 REPLIES

RE: Remove callout from SolidEdge daft

[ Edited ]

If you want to delete a callout with the text "My text":

 

Private Sub Main()

 

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

'seApp.DisplayAlerts = False

Set seDraft = seApp.ActiveDocument

For i = 1 To seDraft.Sheets.Count

With seDraft.Sheets(i)

100 For x = 1 To .Balloons.Count

If .Balloons.Count = x Then

GoTo 200

ElseIf .Balloons(.Balloons.Count - x).balloontext = "My Text" Then

.Balloons(x).Delete

GoTo 100

End If

Next

End With

200 Next

 

Set seDraft = Nothing

Set seApp = Nothing

End Sub

 

Posted by: Bill Ledbetter
Post date: 9/14/2009 8:20:34 AM

RE: Remove callout from SolidEdge daft

[ Edited ]

Thanks for the help, I'll try it

 

Posted by: Scott Smith
Post date: 9/14/2009 9:09:15 AM

RE: Remove callout from SolidEdge daft

[ Edited ]

 

Bill

Is a SE Callout Anotation and a Balloon Callout the same SE object?

What I'm trying to remove is an SE Callout Anotation

Per your code can I use an incomplete "My text string here" to locate the callout in the array.

in other words if my callout has 20 words can i substitue "My text string" with the first 3 words

and not the whole text string.

 

Posted by: Scott Smith
Post date: 9/14/2009 9:36:57 AM

RE: Remove callout from SolidEdge daft

[ Edited ]

You have two questions here:

 

1. Yes, an Annotation Callout is considered part of the Balloons collection.

2. To use a known string, or parts of it, just use the Left() function. For example:

 

If Left(.Balloons(x).balloontext,13) = "My known text" Then

.Balloons(x).Delete

End If

 

Or you can alternatively search the entire Callout for an instance of your string using the Instr function.

 

Posted by: Bill Ledbetter
Post date: 9/15/2009 12:38:07 AM

RE: Remove callout from SolidEdge daft

[ Edited ]

Got it thanks

 

Posted by: Scott Smith
Post date: 9/15/2009 11:34:33 AM