15 Replies Latest reply on Feb 20, 2009 9:02 PM by Michael Pagendarm

    Referencing dimensions in notes

    Michael Pagendarm
      I've been using solidworks casually at work for about a year.
      However i'm trying to go through and automate alot of parts and drawings with driveworks express and good templates.

      The issue i'm currently trying to solve is making a hole callout the describes the bolt center diameter that it is on. Is there a way to reference a dimension from the part into a hole callout or note.

      I understand that I can create custom properties, however this does not help me automate the process.

      I also can reference SKETCH dimensions from the drawing in a note by using "D2@sketch6", however this reference is eliminated in case that dimension is deleted from the drawing, which is part of my goal.

      What I want to be able to do is reference this diameter on my hole callout.

      Or barring that be able to reference my hole features in a note that I point to the hole.
        • Referencing dimensions in notes
          Michael,

          I think what you are looking for is a Hole Callout. SW has such a feature on the Annotation toolbar.
          • Referencing dimensions in notes
            Josh Brady
            Also, assuming 2008 or later you can link a note to a dimension. Just edit the note and click (or double-click, I forget) the dimension. The text will be inserted and linked.
              • Referencing dimensions in notes
                Dale Dunn

                Josh Brady wrote:

                 

                Also, assuming 2008 or later you can link a note to a dimension. Just edit the note and click (or double-click, I forget) the dimension. The text will be inserted and linked.

                I've been doing this since I started on SW 99. It used to be that only the dimension value appeared in the note, but starting in '06 I think, tolerances and even entire hole callouts appear in notes when linked. I know for sure hole callouts can be linked this way in '07. I did it yesterday trying to work around something else.

                I do this frequently, but I can't remember if it's a double or single-click either. I'll have to watch my finger next time I do it.

                Another reply mentions hiding the dimension as an option instead of deleting it. For dimensions imported from the model, you can delete it. For dimensions created in the drawing, deleting breaks the link. In that case, hiding is required.
              • Referencing dimensions in notes
                Michael Pagendarm
                Ray,

                per my original post, i'm already using a hole callout.

                Josh,
                also per my original post, I know I can do that with a note, the same option of just double clicking does not appear to work for hole callouts.
                if I could get what you are speaking about to work with a hole callout I would be happy.

                Alternately if I could figure out a way for a note to reference the hole taps automatically I would also be happy.


                Thanks for the replies. I'm still looking, no luck so far. I'm really liking solidworks for all the 3d work that i'm doing, but I'm struggling on the drawing features.
                  • Referencing dimensions in notes
                    Dale Dunn

                     

                    Originally posted by: Michael Pagendarm...
                    if I could get what you are speaking about to work with a hole callout I would be happy.
                    ...

                    IIRC this will not work if the hole callout is defined "by geometry" rather than "by hole wizard". (RMB, display options, define by geometry/hole wizard). Hole wizard holes of legacy type cannot have callouts attached which are defined by the hole wizard
                  • Referencing dimensions in notes
                    Josh Brady
                    Sorry, I misinterpreted:

                    "Is there a way to reference a dimension from the part into a hole callout or note. "

                    as asking if it was possible to reference a dimension in a note.

                    It is possible link dimension text (and therefore hole callout text) to other dimension text, but it's difficult, unsupported, and probably more trouble than you want to go to.
                    • Referencing dimensions in notes
                      Josh Brady
                      Also, you can hide the dimension after linking rather than deleting it.
                      • Referencing dimensions in notes
                        Josh Brady
                        You're right, Dale. I think 08 (or maybe even 07) introduced capability to link any annotation to a note - GTol, balloon, surface finish mark, anything. With a little bit of trickeration you can put these same links into a dimension.
                          • Referencing dimensions in notes
                            Dale Dunn

                            Josh Brady wrote:

                             

                            You're right, Dale. I think 08 (or maybe even 07) introduced capability to link any annotation to a note - GTol, balloon, surface finish mark, anything. With a little bit of trickeration you can put these same links into a dimension.

                            Oh yeah? I think I'd just put them both into a note. I hate to hijack the thread here, but approximately how would one go about doing that?
                              • Referencing dimensions in notes
                                Josh Brady
                                Perhaps I should have said "A lot of trickeration". Here are the steps to link the text of a dimension to another dimension:

                                1. Download and unzip the attached macro.
                                2. Create a balloon.
                                3. Create the dimension whose text you want to put inside another dimension.
                                4. Create another balloon.
                                5. Create a note.
                                6. While editing the note, click on both balloons to link the note to the balloons.
                                7. Quit editing the note, select it, and then run the macro.
                                8. If you've done 1-7 correctly, the lower text box should have (among other stuff) two "tags" that look like "[OBJECT ID=X]" where X is some number. There should be one number between the two, like [OBJECT ID=79][OBJECT ID=81]. The number between the two (80 in this case) is the ID for the dimension you created. You're almost done.
                                9. Edit the note again and type (or paste) in [OBJECT ID=X], where X is that number found above. This will fully instantiate the object for the dimension.
                                10. Paste the [OBJECT ID=X] text anywhere you want to link any text to that dimension value. Paste it in a dimension text. Paste it in balloon text. Into a Gtol symbol. Anywhere you want.

                                Once you find the [OBJECT ID=X] tag for an annotation, you can paste that tag anywhere you can input text into a drawing. Put a Gtol inside a surface finish mark. It all works. Wanna crash SolidWorks? Link the text of a balloon to its own OBJECT ID.

                                Most annotations, when linked inside a note, will give up their object ID directly to the macro, just like the balloons did above. However, to get the ID for a dimension you have to go through the extra steps of creating an object before and after to get the number in between.

                                Of course, this is unsupported, so don't complain to anyone if anything goes wrong.

                                Edit: the forum seemed to try to parse the greater than/less than symbols on this page. I couldn't see how to disable tag processing, so anywhere in this post that you see square brackets "[" and "]" they should be replaced by the corresponding < and > symbols.
                            • Referencing dimensions in notes
                              Dale Dunn
                              Interesting. Too bad it has to be so obtuse for dimensions. GTOL in a finish eh? I'll be interested to see if this can make formatting disasters worse than dual dimensions (combined with any other options).
                              • Referencing dimensions in notes
                                Josh Brady
                                You've never seen formatting disasters until you've seen what this can do. By the way, you can use this noteinfo macro to explore HTML-like tags in notes and then use them elsewhere. For example, text size. You can make a note containing multiple sizes of text, but a dimension (by the normal UI) can only be one font size. Using the tag [FONT SIZE=X] (replace [ with <, etc) you can change font size in the middle of a dimension text. So if you want some parenthetical statement on the line with your dimension, you can have

                                [DIM] [FONT SIZE=2] (PARENTHETICAL STATEMENT)

                                The dimension text will be whatever your document default is, but the text following the tag will be 2mm high.

                                All text formatting inside of notes is done with these HTML-like tags - Indents, bullets, typeface changes, etc. And these tags can be applied pretty much anywhere you find text.
                                • Referencing dimensions in notes
                                  Dale Dunn
                                  Heh. I just tried the font size tag. Formatting disaster right of the bat!
                                  • Referencing dimensions in notes
                                    Michael Pagendarm
                                    Havn't been able to come back to this before.

                                    2 things.

                                    1) Dale you talk about importing a dimension from the model and not from the drawing, how does one go about doing that?
                                    2) This macro intrigues me and I will try to work with that to see if it will accomplish what I desire.
                                    • Referencing dimensions in notes
                                      Michael Pagendarm
                                      Josh,

                                      That macro is really neat.
                                      Unfortunately for this case, it creates a reference to an object not a property like the dimension.
                                      So not only does it matter what angle i'm displaying that dimension at elsewhere, if I hide the dimension elsewhere it then hides the linked image of it.

                                      This is really weird that Solidworks cannot reference this dimension. I would also simply create a note and link the hole callout and the bolt diameter, however I need the bolt diameter to appear INSIDE the text of the entire hole callout. My fix would turn out to be fairly elaborate and not as clean looking final appearance as I would like.