Hello -

 

I am looking for a way to speed up our company's time spent adding bubbles to our internal sketches. We have probably a dozen new sketches a week, plus legacy drawings that need to be brought up to speed. I have personally bubbled sketches that have over 80 smart dimensions, so finding something that can either add balloons as features are dimensioned, or something that can parse through all the features and add bubbles would greatly reduce the workload on our ME department. We do not use a BOM, so the built-in "Auto Balloon" does not work. Something that could put a bubble at the "10 O'clock" position at every smart dimension would be great. Something that could grab every smart dimension, and bubble tied to each smart dimension and export to an Excel spread sheet would be ideal.

 

I am willing/able to spend some time writing my own macro. I do have some programming history, but an unfamiliar with the SolidWorks API and VBA syntax, so obviously if I could find something that already does this that would save me a lot of time and stress.

 

I am currently trying to learn some SolidWorks API through youtube videos, but I am apprehensive about wasting time on this endeavor.

 

Thank you for your time,

 

Ian


Categories: API∕Macros

Comments
Last comment By: Ian Pommer   Fri, 27 Oct 2017 16:40:41 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

This is so specific I'm not sure you'd find something that would accomplish it 100%. Having said that, I don't think this would take you a lot of time to write a macro for it. Simply traverse all views, then for each view traverse all dimensions, select each dimension at a time then insert a note. By default, SOLIDWOKS will insert notes at the 10 o'clock position of the selected entity.

 

Check this out: 2013 SOLIDWORKS API Help - Get Dimension Values in Drawing Example (VBA)


Cheers,
Amen
CADHERO consulting SUARL – SOLIDWORKS API/PDM Design Automation & Training – SOLIDWORKS VBA MACROS, SOLIDWORKS Addins an…

By: Amen Allah Jlili  Thu, 12 Oct 2017 15:49:39 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

something like this?

 

 

 

 

i am actually in the process of completing this project, however it is not a simple implementation

 

what i would suggest to you is this

loop through all of the display dimensions in all views in all sheets

for each DisplayDimension that you want to add a balloon to call this function below

For each Display Dimension Store this

Dim DimBalloonTxt as string

dimballoontxt = getdisplaydimensionText

DimBalloonTxt = DimBalloonTxt & "|" & BalloonNoteAssigned

 

later you can split this on your export to excel

 

 

Public Function GetDisplayDimensionDisplayText() As String

        Dim Txts() As String = GetDisplayDimensionDisplayTexts()

        Dim Txt As String = ""

        For i = 0 To UBound(Txts)

            If Len(Trim(Txts(i))) > 0 Then

                If Len(Trim(Txt)) = 0 Then

                    Txt = Txts(i)

                Else

                    Txt = Txt & vbCrLf & Txts(i)

                    'VBCRLF is the same as  Chr(13) + Chr(10)  i believe

                End If

            End If

        Next

        GetDisplayDimensionDisplayText =Txt

    End Function

 

Public Function GetDisplayDimensionDisplayText as string()

        Dim RetTxt(3) As String

        RetTxt(1) = DispDim.GetText(swDimensionTextParts_e.swDimensionTextCalloutAbove)

        RetTxt(2) = DispDim.GetText(swDimensionTextParts_e.swDimensionTextCalloutBelow)

        RetTxt(0) = DispDim.GetText(swDimensionTextParts_e.swDimensionTextPrefix)

        RetTxt(3) = DispDim.GetText(swDimensionTextParts_e.swDimensionTextSuffix)

        GetDisplayDimensionDisplayTexts = RetTxt

    End Function

 

Function AddBalloon(byval SwDispDim as displaydimension,byval BalloonTxtID as string) as boolean

'Create the Coded Text for solidworks to create the balloon

'you could use the solidworks built in Balloons but they only go to 99

'<font size =2 color=0x000000ff> Makes the text Red

'<font size =2 color=0x00000000> Makes the Text Black Again

'<border type=1 size=0 padding=0>"  This is the circle boarder around the Balloon

 

if you want the color a different color then use this

     Dim BalloonTxt as string = "<font size =2 color=0x000000ff><border type=1 size=0 padding=0>" & BalloonTxtID & "</border><font size =3 color=0x00000000>

if you want it the same color as the display Dimension Text then use this

<border type=1 size=0 padding=0>" & BalloonTxtID & "</border>

if you want the balloon smaller then this

<FONT SIZE=2><border type=1 size=0 padding=0>" & BalloonTxtID & "</border><FONT SIZE=3"

 

'use the one below that looks best to you

     SwDispDim.SetTextAtIndex(SwDimensionTextParts_e.swDimensionTextSuffix,BalloonTxt)

     or to

     SwDispDim.SetTextAtIndex(SwDimensionTextParts_e.swDimensionTextCalloutAbove,BalloonTxt)

     or to

     SwDispDim.SetTextAtIndex(SwDimensionTextParts_e.swDimensionTextCalloutBelow,BalloonTxt)

     or to

     SwDispDim.SetTextAtIndex(SwDimensionTextParts_e.swDimensionTextPrefix,BalloonTxt)

end function

 

 

To export to excel you will need to store all of the DimensionValues and BalloonIDs as something

 

Dim DimensionBalloon as string

 

then the export to excel

 

 

good luck

By: Jacob Corder  Thu, 12 Oct 2017 18:27:06 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Ian,

Please forgive my ignorance, I don't understand the reasoning for placing a balloon on the smart dimensions. You mention not using BOMs so I wonder if the balloon is for part identification, but tagging it to the dim would not do that.

By: Jim Steinmeyer  Thu, 12 Oct 2017 18:42:43 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

We do it here, however we do it at the PDF file level with a program called VIPI.

 

It is an aerospace thing generally (as far as I know).   Basically it is a number designation for a particular dimension because we need to report out for each and every dimension for the Aerospace customers.  The balloon helps keep track of what dimension is being reported on..

Especially useful for a print with 5000-8000 dimensions!

By: Dan Pihlaja  Thu, 12 Oct 2017 18:49:03 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

You mean someone actually uses the prints you make? What a novel idea!

 

That does make sense.

By: Jim Steinmeyer  Thu, 12 Oct 2017 18:54:50 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Jacob -

 

This does look helpful, however we have some specific situations... now that I am spending the time thinking about what our drafters are going through, this project might be more complicated than what I am prepared for.

 

Considering I still have some stuff to learn with VBA, I probably won't be digging into this code or trying to implement until next week. However, I am marking it as the "correct answer" because I suspect I won't be getting a more thorough response than this.

 

Thanks for your time,

Ian

By: Ian Pommer  Thu, 12 Oct 2017 21:36:13 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Correct, we are in the aerospace industry. We use bubbles to help our inspectors keep track of, and record actuals on our inspection articles. We will also be using them soon for data collection and analysis.

By: Ian Pommer  Thu, 12 Oct 2017 21:32:50 GMT
Re: How to auto balloon all smart dimensions (without BOM)?
By: Deepak Gupta  Fri, 13 Oct 2017 04:08:56 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Why you don't give a try on SolidWorks Inspection

By: Tateos Tvapanyan  Fri, 13 Oct 2017 07:30:48 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Tateos Tvapanyan wrote:

 

Why you don't give a try on SolidWorks Inspection

YES!  That was what I was looking for to share, but I couldn't find it!   Good find Tateos!

 

We had our VAR come here to trail it with us, but we were too deep into our process to change at the time.  It would have cost too much money to flip over.  Plus, we have to balloon our customer prints as well, which only come to us via PDF files and using Solidworks inspection would have meant laboriously recreating the PDF print in Solidworks.

 

If you think that it might be a good fit, Call your VAR and ask them to give you a demo.

By: Dan Pihlaja  Fri, 13 Oct 2017 12:02:54 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Dan Pihlaja wrote:

 

Plus, we have to balloon our customer prints as well, which only come to us via PDF files and using Solidworks inspection would have meant laboriously recreating the PDF print in Solidworks.

You do not need to redraw in SW as Inspection can also read PDF/Tiff files

 

I'm not sure if this is available in earlier versions but yes for latest version. I would suggest you to take another look at it.

By: Deepak Gupta  Fri, 13 Oct 2017 12:21:55 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

We use VIPI on a daily basis, very good software.

And ballooning is just a tip of the iceberg what this software can do.

By: Tateos Tvapanyan  Mon, 16 Oct 2017 07:15:20 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

I was able to talk to GoEngineer and get a short trial period to test out Inspection 2017, since I guess our company tried it out 3-4 years back and it wasn't a good fit.

 

I've been trying it out for a week now, and it's *so close* to being perfect software for us to cut down on a lot of labor hours. There are some hang-ups, and I have sent a list of concerns to an Applications Engineer, still waiting to hear back tho.

 

For those of you who have tried Inspection, how flexible did you find it? Were you able to create your own export to excel commands to call for things not pre-built into the export tokens?  Where you able to insert features into the characteristic tree if something was skipped? How does exploding notes work?

By: Ian Pommer  Thu, 26 Oct 2017 14:33:00 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

You should consider a custom addin if you have very specific needs.

By: Amen Allah Jlili  Fri, 27 Oct 2017 16:27:28 GMT
Re: How to auto balloon all smart dimensions (without BOM)?

Yeah, that was originally where I was planning on trying to take this endeavor... However it is easier to write macros for Excel than it is for SolidWorks. I am finding that with some Excel magic I can get almost everything I need from the Inspection Add-In.

 

EDIT: The last and final hangup I am stuck on is trying to convert GDT's from the SolidWorks GDT font to a more universal font.

By: Ian Pommer  Fri, 27 Oct 2017 16:40:41 GMT
You are not authorized to view this page No results found! Suggestions: Check spelling, try a different search, or browse topics below.