Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change Balloon Style?

3 REPLIES 3
Reply
Message 1 of 4
dg2405
807 Views, 3 Replies

How to change Balloon Style?

Hello,

 

how can i change a balloon style to another one?

3 REPLIES 3
Message 2 of 4
petestrycharske
in reply to: dg2405

dg2405,

 

Good afternoon!  Not completely sure if this is what you're after, but here is a short video illustrating how to switch from one balloon style to another.  Hope this helps and have a most blessed day!

 

 

 
Peace,
Pete
Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 3 of 4
salariua
in reply to: dg2405

You can either change all balloons, or prompt the users for the ones to change.

 

prompt for user selection

 

While True
	Try
		' Get balloon from user selection
		Dim oBalloon As Balloon
		oBalloon = ThisApplication.CommandManager.Pick( _
				SelectionFilterEnum.kDrawingBalloonFilter, "Pick a baloon")
											
		If oBalloon Is Nothing Then
			MessageBox.Show ("Selection was cancelled","ilogic")
			Beep
			Exit While
		End If
End While

Change all balloons on all sheets

 

' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oStyles As DrawingStylesManager
oStyles = oDrawDoc.StylesManager

'process all sheets
For Each oSheets In oDrawDoc.Sheets 
	' Iterate over each balloon on the sheet.
	For Each oBalloon In oActiveSheet.Balloons
	'replace "Tags" to your style name
	oBalloon.Style = oStyles.BalloonStyles.item("Tags")
	Next
Next

Good Luck

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 4 of 4
salariua
in reply to: salariua

It has come to my attention that the iLogic code I have posted before is wrong and not working.

 

Here is the corrected version:

 

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oStyles As DrawingStylesManager
oStyles = oDrawDoc.StylesManager

Dim oSheet As Sheet
Dim oBalloon As Balloon

For Each oSheet In oDrawDoc.Sheets
	For Each oBalloon In oSheet.Balloons
		oBalloon.Style = oStyles.BalloonStyles.Item("Tag")
	Next
Next
Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report