BOM Balloons
BOM Balloons
(OP)
Is there an easy way in SW07 to place a quantity next to balloons? I would like "4X" to be associated with the balloon, but not necessarily the information, just the location.
"Art without engineering is dreaming; Engineering without art is calculating."
Have you read FAQ731-376: Eng-Tips.com Forum Policies to make the be






RE: BOM Balloons
SW2008 Office Pro SP3.1
Intel Core 2 Duo CPU
2.2GHz, 2.00GB RAM
QuadroFX 3700
SpacePilot/SpaceNavigator
RE: BOM Balloons
-handleman, CSWP (The new, easy test)
RE: BOM Balloons
Chris
SolidWorks/PDMWorks 08 3.1
AutoCAD 06/08
ctopher's home (updated Apr 30, 2008)
RE: BOM Balloons
UGlay, we do put quantity in the BOM, we are also starting to add quantities to the ballooned items in the exploded views. I think it is useless and creates another updating task that doesn't need to be there.
Handleman, I saw that thread, but thought the macro was still under development. I will give it a spin when I have more time.
Ctopher, I don't see the "group" option in the RMB menu in SW07.
"Art without engineering is dreaming; Engineering without art is calculating."
Have you read FAQ731-376: Eng-Tips.com Forum Policies to make the be
RE: BOM Balloons
Chris
SolidWorks/PDMWorks 08 3.1
AutoCAD 06/08
ctopher's home (updated Apr 30, 2008)
RE: BOM Balloons
-handleman, CSWP (The new, easy test)
RE: BOM Balloons
This macro is the equivalent of:
1. adding another balloon
2. setting it to "Quantity" type
3. setting its font height to be the same as the document note font
4. setting its balloon style and leader to "None"
5. Adding an additional note with "x"
6. Grouping the entities.
CODE
Dim swDoc As SldWorks.ModelDoc2
Dim swNote As SldWorks.Note
Dim newBalloon As SldWorks.Note
Dim xNote As SldWorks.Note
Dim swSelmgr As SldWorks.SelectionMgr
Dim BalPos As Variant
Dim attEnts As Variant
Dim myEnt As SldWorks.Entity
Dim myTfmt As SldWorks.TextFormat
Sub main()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
On Error GoTo ENABLEAGAIN
swDoc.ActiveView.EnableGraphicsUpdate = False
Set swSelmgr = swDoc.SelectionManager
If swSelmgr.GetSelectedObjectType3(1, -1) <> swSelNOTES Then
Exit Sub
End If
Set myTfmt = swDoc.GetUserPreferenceTextFormat(swDetailingNoteTextFormat)
Set swNote = swSelmgr.GetSelectedObject6(1, -1)
If False = swNote.IsBomBalloon Then
Exit Sub
End If
BalPos = swNote.GetTextPoint2
attEnts = swNote.GetAnnotation.GetAttachedEntities
Set myEnt = attEnts(0)
myEnt.Select4 False, Nothing
'Create the quantity balloon
swDoc.ActiveView.EnableGraphicsUpdate = False
Set newBalloon = swDoc.InsertBOMBalloon2(swBS_None, swBF_Tightest, 3, "", 3, "")
newBalloon.SetTextPoint BalPos(0) + 0.008, BalPos(1) + 0.008, 0
newBalloon.SetBomBalloonText 3, vbNullString, 3, vbNullString
newBalloon.SetBalloon swBS_None, swBF_Tightest
newBalloon.GetAnnotation.SetLeader3 swNO_LEADER, Empty, Empty, Empty, Empty, Empty
newBalloon.GetAnnotation.SetTextFormat 0, False, myTfmt
'Create the "x"
myEnt.Select4 False, Nothing
Set xNote = swDoc.InsertNote("x")
xNote.GetAnnotation.SetLeader3 swNO_LEADER, Empty, Empty, Empty, Empty, Empty
xNote.SetTextJustification swTextJustificationRight
xNote.SetTextPoint BalPos(0) + 0.008, BalPos(1) + 0.008, 0
xNote.GetAnnotation.SetTextFormat 0, False, myTfmt
'Group them
swDoc.ClearSelection2 True
swNote.GetAnnotation.Select True
newBalloon.GetAnnotation.Select True
xNote.GetAnnotation.Select True
swDoc.CreateGroup
swDoc.ClearSelection2 True
ENABLEAGAIN:
swDoc.ActiveView.EnableGraphicsUpdate = True
End Sub
-handleman, CSWP (The new, easy test)