×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BOM Balloons

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

You cant add qty on the BOM?

SW2008 Office Pro SP3.1
Intel Core 2 Duo CPU
2.2GHz, 2.00GB RAM
QuadroFX 3700
SpacePilot/SpaceNavigator  

RE: BOM Balloons

Select the balloon and the text, right-click, select group. This will group them together and they will move together.

Chris
SolidWorks/PDMWorks 08 3.1
AutoCAD 06/08
ctopher's home (updated Apr 30, 2008)

RE: BOM Balloons

(OP)
Thanks all.

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

I have 08, it must be an 08 option. Sorry.

Chris
SolidWorks/PDMWorks 08 3.1
AutoCAD 06/08
ctopher's home (updated Apr 30, 2008)

RE: BOM Balloons

"Group" has been around for a long time.  However, it will not be an option if the two annotations do not belong to the same view. That's particularly easy to do with balloons since you usually drag 'em outside the view to start with.

-handleman, CSWP (The new, easy test)

RE: BOM Balloons

If you want to try a really stripped-down version of the note macro that is only capable of adding quantity, take a look at this one.  Just preselect the balloon and run the macro.  "x[qty]" will be added at the upper right corner of the balloon.  If "x4" or "X4" always on the right is acceptable then that is the easiest way to program.  Otherwise you have to consider placement of the note/balloon when the qty is more than one digit.  If "4X" is required and the qty can be always on the left then that's fairly easy too.

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 swApp As SldWorks.SldWorks
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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources