×
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

Balloon Note macro
3

Balloon Note macro

Balloon Note macro

(OP)
Howdy All,

Attached is a first look/beta copy of a Balloon Note macro for SolidWorks I've been working on.

It can be used to add a Quantity Note to an Item Balloon that will update if the model is changed.

I would appreciate any comments you may have after looking this over.

Tobin Sparks
www.nov.com

RE: Balloon Note macro

I just tried running it and nothing happened.  I am using SW2006 (this is probably the problem).  Any suggestions (besides upgrading... lol)

-Dustin
Professional Engineer
Certified SolidWorks Professional

RE: Balloon Note macro

3
(OP)
Howdy,

ShaggyPE - I'm sorry I don't know how to change it so it would also work in 2006. I don't have 2006 in order for me to look at it myself. Only one suggestion is to open the macro with the editor and at the top of the code put an apostrophe in front of the words 'Option Explicit so they won't be recognized when the program runs. Other than that I really don't know how to help you.

fcsuper - can't imagine what is happening with yours either. You might try the same suggestion as above.

Thank you both for your response

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Dustin,

You will need to edit the macro and change the references to the 2006 libraries.  I did get the macro to work on 2006 after doing that.

Tobin,

I didn't dig into every function, but it looks very nice and works fine for me.  I didn't have the problem that Matt noted.

Joe
SW Office 2006 SP5.1
P4 3.0Ghz 1GB
ATI FireGL X1

RE: Balloon Note macro

Works in SW2008 SP1.1. Is there a way of showing - (Qx)? Other than that I like it.
Sylvia

RE: Balloon Note macro

(OP)
Howdy,

JMarv - thank you for you very helpful response.

ShaggyPE - do you understand JMarv's comment? You'll have to open the macro with the editor and go to the menu and pick Tools -> References and uncheck the 2007 libraries the program can't find and make sure your equivalent 2006 libraries are checked. Hope that works.

Thanks again JMarv

Tobin Sparks
www.nov.com

RE: Balloon Note macro

(OP)
Howdy,

felix7502 - I'm glad to here it's working for you in 2008. I wasn't real clear on your question - Do you want to use something other than "X" after the Quantity? Some companies still use "PLCS".

Thanks for your response

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin-
I would like to have the quantity show as (2x) with the parentheses around the quantity and the small "x".
This will be so much more convenient & accurate than using a note and grouping. Thanks. Sylvia

RE: Balloon Note macro

(OP)
Howdy,

felix7502 - Thanks for your interest in this macro. I was wondering about the configuration you are requesting when I started developing this. I'll have to think about it and get back to you. I'm thinking it would be very easy to make a few changes to accommodate you. I want to do some experiments. It will be a little bit of work to have the ability to do both configurations.

Thanks again

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Quite slick Tobin1.  I got it to work on 2006.  Another star for you.

-Dustin
Professional Engineer
Certified SolidWorks Professional

RE: Balloon Note macro

(OP)
Howdy,

ShaggyPE - Thank you for checking it out. I'm glad to here you got it to work in 2006 as well.

I haven't done anything "slick" in a while smile . That reminds me - I should get more hair gel smile .

Thanks Again Enjoy

Tobin Sparks
www.nov.com

RE: Balloon Note macro

(OP)
Howdy,

felix7502 - Attached is a special version of (Balloon Note) that is supposed to do what you requested. There are still some issues, especially related to what happens when you get into double digit quantities. But that is something I will have to address in the original version as well. I could include this option in a released version. Let me know if this works for you.

Thanks

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin-
Thanks so much! This is way more convenient than the way we use to do it.
Sylvia  

RE: Balloon Note macro

(OP)
Sylvia,

No Problem.
I'll let you know when I actually release it.

Thanks

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin-
If you're still working on this macro - I manually revise the distance to .38 before I add a double digit quantity and then add a space to both of the parentheses. This creates the same spacing as a single digit quantity. I'm not sure whether this will help with the macro, but it sure improves the look of my drawings. Thanks. Sylvia

RE: Balloon Note macro

(OP)
Sylvia,

Yes - still working on this macro. I made a lot of changes and included the type of Note you use. I still have a few things to do to finish it. Please continue to let me know what you think. I appreciate your input. Maybe later today I'll be able to give you the latest copy.

Thanks

Tobin Sparks
www.nov.com

RE: Balloon Note macro

(OP)
Howdy All,

Attached is the latest copy of the Balloon Note macro for SolidWorks I've been working on.

It can be used to add a Quantity Note to an Item Balloon that will update if the model is changed.

This also added an option for parentheses around the quantity and a user defined Suffix. - Thanks to Sylvia smile

Your user preferences are saved in your Windows Registry.

I would appreciate any comments you may have after looking this over.

Thanks

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Thanks. Fantastic job.

This is my procedure for left and right quantities with parentheses.
Place balloons.
Click note.
Click for quantity.
Select balloon.
Change distance. Left = .320, Right = .350 for single digit, .450 for double digits
Enter.

I've noticed that if you open the note, all distances are zero. If you close the note and then select a balloon that you know will be a double qty. the distances come up as .385, and .342 which places the right qty. too close to the balloon. Accept and close the note. Select another balloon that will be a single qty. and open the note, the right distance has changed to .446 which places the single qty. too far away. Also in the Note Information –
Balloon: Characters needs a "c" and an "s".

Now, if only someone could figure out how to enter a border around a selected part of an annotation...  

Sylvia
 

RE: Balloon Note macro

(OP)
Sylvia,

Thanks for your response. It looks like you have already figured out a good routine for using this macro. Everybody will be a little different. Adding the parentheses to the Quantity Text type was not easy. Maybe I'll be able to clean it up in the future.

Also thank you very much for noticing my spelling error. You have found one of my weaknesses smile . I left out the "c" about 40 times throughout the code. It's been fixed for the release version.

One thing I was curious about - If you were to start Balloon Note and, while leaving it open, you pick on different Item Balloons - does the Quantity Box update to the proper quantity for that balloon?

Thanks Again

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin –
The qty. does update with the note open, but it seems to be hanging onto the previous distance.

Procedure:
Place balloons.
Open note. All distances are zero.
Click 1st balloon, qty =  5, .385, .446 (should be .342)
Click 2nd balloon, qty = 20, .385, .342 (should be .446)
Click 3rd balloon, qty =  5, .385, .446
Click 4th balloon, qty = 10, .385, .342

I also tried to add a sub-assy to the assy and it updated perfectly.
Sylvia
 

RE: Balloon Note macro

(OP)
Howdy All,

Sylvia - thank you so much for your input. You are right of course. It wasn't functioning the way it was designed. There is so much going on in this code sometimes I'm watching for one thing to work and don't notice something else that suddenly isn't. Your help is very much appreciated.

Attached is the latest "working" copy of the Balloon Note macro.

I would appreciate any comments you may have after looking this over.

Thanks Again

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin
Sorry it took so long to check out the final macro. I have uploaded my observations. Something seems to have happened between the 7/15 & 7/16 macros with the beginning parenthese.
Also, is there something I can tweak in the macro to get a default of .300 on the left side or must I change it each time?
Something else I stumbled onto, that perhaps was already known by others, if you hold down the alt key you can move the parts separately if they get out of whack.
Again, thanks for making this macro.
Sylvia
 

RE: Balloon Note macro

(OP)
Howdy!

Thanks Sylvia and Matt for your comments regarding the Balloon Note macro.

I've been using it too and noticed it doesn't recognize the Balloon as a Note or a Balloon if I try to use it on a Balloon that has a leader with a jog point added. I'll have to work on that. It's also not as consistent as I would like. I'll need to work on the code for version 2. smile

Sylvia - your PDF is an excellent visual explanation of your findings. Thanks for your effort. You are right about the space between the left parenthesis and the number. If I remember right ( smile that doesn't happen often) I did reduce the space so the user could adjust it better. The setting for that space is on the Options page. Pick the Options button from the main macro page, then the Quantity Text (Auto) radio button and the (With Parenthesis) check box. Notice the "Add Space Between left Parenthesis and Quantity" box becomes active. The default 0.00394 may be excessive and 0.00000 may not be enough. 0.002 might work for you - you'll have to experiment a little. Don't forget to save your setting. The macro will remember your last saved setting even after you close the macro.

Now - as far as the other Space setting - how comfortable are you with opening the macro with the macro editor and making changes to the code just for your particular use? The really hard thing about this macro was trying to make it work for so many different possible font types and sizes. A calculation for the font Width has to be created based on the font height. What works for one font may be close but just not quite right for another. Let me know how you feel about changing your code.

Thanks

Tobin Sparks
www.nov.com

RE: Balloon Note macro

Tobin-
After check the Option page, I found that I had changed that setting to .003 for the 7/15 macro. By rechecking default for the 7/16 macro the parenthese did reset itself, but I did play around with it and no matter what other spacing (.002, .006, .009) it remained the same as what was shown in the pdf. I'm satisfied, so you don't have to fix it for me. Just thought you'd like to know.

I have looked at the code, but didn't know where to start. I use 12pt-regular-Century Gothic. If you can point me in the right direction I can hopefully make the adjustment.

I know that this must have taken alot of work to make it compatible for everyone, so thanks again. Sylvia

RE: Balloon Note macro

(OP)
Sylvia,
Thanks for getting back to me. I was at home on Tuesday because of what turned out to be a Kidney Stone sad .

Anyway - I forgot to comment on something you wrote earlier: <if you hold down the alt key you can move the parts separately if they get out of whack> WOW - that's really handy - you know this better than I do smile . I'll have to include that handy hint in the revised description. THANKS!

You wrote <I did play around with it and no matter what other spacing (.002, .006, .009) it remained the same as what was shown in the pdf>. Since you mentioned it I did some more experimenting with this my self and noticed something else I have to fix in version 2. This is something to watch out for. If the Default Parenthesis Space check box is checked the user can still enter a different Space in the box. It appears that the user has entered a new Space but if the Default Parenthesis Space check box is checked it will NOT save the new Space the user has entered. OOPS.
I'll have to fix that. Thanks for pointing that out.

Following are instruction for you to change your code:
(This might work better for your 12pt-regular-Century Gothic)
First make a copy of your macro so you can get back to where you are now just incase my instructions are not clear.
Open a Solidworks .slddrw file – maybe something you use to experiment with that has Balloons.
From the pull-down menu select Tools->Macro->Edit...
Select BalloonNote.swp. This should open the Macro Editor with a bunch of windows in it. Try to find the one that says "BalloonNote – frmBalloonNoteText (Code)" on the title bar at the top. Make this window highlighted or bring it to the front of all the other windows.
From the Microsoft Visual Basic pull-down menu select Edit->Find. The Find dialog box should appear.
On the Find dialog box select the Replace... button. The title of the box should change to Replace instead of Find and there should be a place to enter text for "FindWhat:" and "Replace With:"
In the "FindWhat:" box enter [.85] without the brackets.
In the "Replace With:" box enter [.65] without the brackets.
In the Search frame select Current Module.
All the other boxes should be Un-Checked and the Direction can be set to All.
Select the Replace button ONE time. You should get a line of code that looks like this: QCharOffset = (QCharCnt * swNoteFntmm * 0.85) with the .85 highlighted.
Select the Replace button four more times. You should notice the .85 being changed to .65. After the fourth change you should get a Visual Basic Notice that says "The specified region has been searched."
Select OK, Save your work and Cancel the Replace box.
You should be able to experiment on the .slddrw that you originally opened.
If [.65] doesn't quite make to for you – you can follow the above instructions and substitute anything you might think will work for the .65.

Thanks Again for you input – I hope this helps

Tobin Sparks
www.nov.com

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