49 Replies Latest reply on Nov 9, 2017 8:32 AM by Glenn Schroeder

    Edit multiple dimensions at once

    Brian Hoerner
      Is there a way, (like in Pro/E ) to select multiple dimensions in a sketch and modify them all at one time instead of one by one editing?
        • Edit multiple dimensions at once
          Troy Peterson
          You can CTRL select all dimension and any common features that can be edited will not be greyed out in the FMT
          • Edit multiple dimensions at once
            Brian Hoerner
            How does that allow me to edit say 5 dimensions at one time without updating the sketch until I click something to continue? Sorry for being doped today
            • Edit multiple dimensions at once
              Charles Culp
              Are you talking about for tolerances? Or the nominal dimension? If you right click on them (after selecting multiple), one of the options is "link dimensions". You could then link them. Then just edit one and the rest change.
              • Edit multiple dimensions at once
                Brian Hoerner
                No, I want to select many specific dimensions, edit/change each one in a form of sorts, then hit ok/enter to complete the operation and update the sketch all at once
                • Edit multiple dimensions at once
                  Josh Brady
                  No, no way built into SolidWorks. Although this wouldn't be a difficult macro to code.
                  • Edit multiple dimensions at once
                    Brian Hoerner
                    Every software has some good and bad baggage, I guess this is one of the bad deals of SW
                    • Edit multiple dimensions at once
                      Josh Brady
                      Are there a lot of people who would be interested in this functionality? As I said... easy to program. It's an interesting challenge. I'm just about done with a macro to do this. You can select any amount of things anywhere in any context, then run the macro. It will examine selections and place values of all selected dimensions in boxes on a form. Edit the values at will, and then hit "OK" to apply changes. It has a checkbox for each dimension to report/determine config-specific or all configs. It's pretty much ready to use as-is. However, I'm trying to figure out just how much functionality to add.

                      1. Monitor document for any dims added and automatically place them in the form?
                      2. "Add" button to add dimensions to the form?
                      3. "Rebuild" button to rebuild with changes?
                      4. Capability to enter mixed units? E.g. 5" + 32mm

                      This tool could really do a lot pretty easily. Any other ideas?
                      • Edit multiple dimensions at once
                        Charles Culp
                        Josh,

                        How does this differ from the "configure dimension" tool?
                        • Edit multiple dimensions at once
                          Josh Brady
                          It's more for modifying the values of bunches of dimensions in a single form rather than having to double-click a bunch of times. In the context of a sketch it would be useful for people like Brian and Lindsay. Box-select the entire sketch and run the macro. It doesn't matter if geometry or reference dims are caught by the selection. The macro picks out the driving dimensions and puts one text box on the form for each dimension. Tab from text box to text box, punching in the values you want, then hit OK and all the values from the text boxes go to the dims.

                          It would also work in an assembly context or with dims from multiple features at once. You know how you can hit "rebuild" in the standard dimension popup to see the result of your dim change without dismissing the popup? This would work just like that, except you can have as many dimensions in the form as you have screen space for. Add dimensions from multiple parts, distance mates, etc. to the form, and you can punch in values and hit "Rebuild" to see your changes. You don't have to go hunting down each dim to change it. The configuration aspect probably wouldn't be so powerful. Right now, the only options I have are "current config" and "all configs". Those two options are available for each dim on the form. "Specify configurations" would be more difficult to integrate because of having multiple dimensions (possibly from multiple different parts!) on the form.
                          • Edit multiple dimensions at once
                            Brian Hoerner
                            Josh,

                            I would be extremely interested and would be more than willing to test it here on my 20+users. I agree with Tom on the needs. I haven't had time to get into macros much at all, but do have experience modifying to fit our needs, so even if yours is a starting point that would be wonderful.

                            From your reply to Charles you have a solid understanding of what I am looking for.
                              • Edit multiple dimensions at once
                                Josh Brady
                                OK, here's the current, first run try. Right now the form is modal, which means that you can't interact with SW while it's displayed. None of the numbered ideas are implemented yet, although you can enter mathematical expressions for dimensions, like "6+40" or whatever.

                                First select some stuff that includes driving dimensions, then run the macro. If you hit "Cancel" nothing will be changed. Hit "Clear" to empty all the text boxes (maybe not so useful). Hit "OK" to accept all values currently in the boxes. Any box that has a valid numerical value or expression will update the corresponding dimension. There's no rebuild incorporated yet, so if you are not currently editing a sketch you will have to hit Rebuild to see your changes. However, if you are editing a sketch then your changes will be reflected immediately.
                              • Edit multiple dimensions at once
                                Brian Hoerner
                                Josh,

                                This. so far, only changes the last value selected, great start and exactly like I am interested in doing!
                                • Edit multiple dimensions at once
                                  Brian Hoerner
                                  Mark,

                                  The value is just as you mentioned, and as one mentioned earlier, I can draw the basic shape of interest, dimension them, then select all and change all at one time. This also is of great value if you have several specific dimensions that if changed one at a time throws the shape off, but if all update at one time the reaction is as desired.
                                    • Re: Edit multiple dimensions at once
                                      David Matula

                                      I just have my settings set to ask me for a dim when I dimension the sketch.  That way I just put the info in and go from there.  Learning which dims to do first in the sketch to keep it looking right just comes with experience from the trial and error over years of use, and making many parts..

                                      other option is the use the configuration manager....that is great for making 5 to 500 new part numbers where dims change all the time, but the basic shape is the same threw all the parts.

                                    • Edit multiple dimensions at once
                                      Josh Brady
                                      Again, not so much for configuring different configurations, but for mass-editing a bunch of dimensions at once.
                                      • Edit multiple dimensions at once
                                        Roland Schwarz
                                        If you edit the sketch as a feature, not in sketch mode, then rebuilds are delayed. Without editing the sketch, double-click the sketch in the feature tree, select and change dimensions. Rebuild when ready.
                                        • Edit multiple dimensions at once
                                          Kelvin Lamport
                                          Brian,

                                          An alternative method is to edit the dimensions without being in the Edit Sketch mode. Just double click the closed sketch in the FM, Ctrl select the dimensions, and edit. The sketch will not update till a rebuild is performed.
                                          • Edit multiple dimensions at once
                                            Brian Hoerner
                                            Thanks Josh, will retest and get back to you later today, appreciate the work!
                                            • Edit multiple dimensions at once
                                              Brian Hoerner
                                              Roland and Kelvin, thanks, familiar with this, but many times because of large sketch changes i do want to be in the sketch, but your point is well taken. The other side of this also is that you need to double click on each dimension whereas with this macro you just select all of the desired dimensions, run the macro and go through each box to change as desired in one click

                                              • Edit multiple dimensions at once
                                                Charles Culp
                                                Again, not to be a stick in the mud, but it sounds like the (new for 2008) command "configure dimensions" will do what you are looking for. It appears to do what your macro does, plus more.

                                                Edit a sketch, select multiple dimensions, then right click, and chose "configure dimensions", it is near the bottom of the right-click menu. It brings up a small table, where you can modify multiple dimensions all at one time. It even shows you on a configuration basis, so you can modify them for each config.
                                                • Edit multiple dimensions at once
                                                  Kelvin Lamport
                                                  If it's the actual dimensions you are wanting to change, then I agree with Charles. The Configure Dimension function will do what you want ... and more.
                                                  • Edit multiple dimensions at once
                                                    Brian Hoerner
                                                    It doesn't, but just my point of view
                                                      • Edit multiple dimensions at once
                                                        Adrian Velazquez
                                                        Brian,

                                                        From what I understood you are looking for, Configure Dimension definitely does that ( just make sure you click the rebuild button, on the bottom left of the configure dimension dialog, before you exit the dialog).

                                                        And you don't need to be inside a sketch to use Configure Dimension you can show your annotations and select from your graphics area as many dimension as you want from different features and rebuild them all at once.

                                                        If not please, build on what you're looking for, definitely interested

                                                        just my two pesos!
                                                      • Edit multiple dimensions at once
                                                        Brian Hoerner
                                                        As stated earlier, I am not interested in creating a bunch of configured dimensions, only in not having to double click many dimensions to change each one individually, but have a form that I can click through only the dimensions I have chosen at that point in time and change all of them, hit apply, see what the change has done to the sketch, then change as needed, hit apply and then close the form when completed. Configure Dimensions does not do this in the same fashion, I do not want to set up a bunch of these ahead of time. I am familiar with this tool and it does not work as I am interested in.

                                                        Just one of those similar but different conditions. I do appreciate the suggestions to look into this though.
                                                          • Edit multiple dimensions at once
                                                            Josh Brady
                                                            Here's an updated version. Changes:

                                                            1. Non-modal. You can interact with SW with the form open.
                                                            2. Change documents, etc. possible with form open. (Not possible with Configure Dimension)
                                                            3. Add dimensions from as many documents as you want. (Not possible with Configure Dimension)
                                                            4. Add sketch geometry, features, etc with form open (Not possible with Configure Dimension)
                                                            5. Delete dimensions, features, etc. (NPWCD)
                                                            6. Remove dimensions from form
                                                            7. Refresh form with current dim values
                                                            8. Rebuild button applies dim changes and rebuilds currently active document. Other document dim values are changed, but not rebuilt unless referenced by active document.
                                                            9. Default config-related behavior is "use current setting" (greyed-out checkbox). To specify current config, clear checkbox. For all configs, make solid check.

                                                            Edit: Just deleted attachment due to critical bug! Working on fix.
                                                          • Edit multiple dimensions at once
                                                            Brian Hoerner
                                                            Extremely nice Josh...Way to go!!!!!!!!!!!!!!!
                                                            • Edit multiple dimensions at once
                                                              Kelvin Lamport
                                                              Very nice Josh. That is a definite improvement over the Configure Dimension function.

                                                              What is the purpose of the Dim Names option? It doesn't appear to do anything at the moment.
                                                              EDIT: Ignore this question! I just did a refresh and noticed the Dim Names toggled on and off. Nice touch.
                                                              • Edit multiple dimensions at once
                                                                Brian Hoerner
                                                                Kelvin,

                                                                The Dim Names shows on the dimension what the name is, which allows you to see which dimension you are changing when you have many selected in no specific order, so if you select that option, then the dimension you will see the dimension name that SW gives it appear with the dimension
                                                                • Edit multiple dimensions at once
                                                                  Josh Brady
                                                                  Please don't use this for now!!! I just found a bug where I wasn't checking properly for dim existence. As is, it could crash SW to desktop w/o warning in certain cases when a dim from the form is missing from the model!
                                                                    • Edit multiple dimensions at once
                                                                      Josh Brady
                                                                      Well, with great power comes great responsibility. :-) If dimensions disappear from SolidWorks due to the document being closed then they become extremely toxic. I can't even touch them in the code without SW crashing. So if you use this code, please be careful not to close any documents with dimensions that are on the form.
                                                                        • Edit multiple dimensions at once
                                                                          Bruce Cox
                                                                          I think multi-dim edit is a good ideal. An "inventive" competitor can access every parameter in the model though a single table... allowing multiple edits. I'm sure SW could come up with a way to make such a command their own. Like including a rebuild button. Tabs which filter the parameters like "this sketch" or "feature parameters".

                                                                          Maybe it could be window that stays open all the time... and clicking a feature populates the window with all of that feaures parameters... wouldn't that be kool for us dual screen users.
                                                                      • Edit multiple dimensions at once
                                                                        Josh Brady
                                                                        I think I know how to make this safer. Unfortunately, it's going to take a complete rewrite of the code, so it may take a while.

                                                                        For anyone who might be interested, the macro currently "remembers" dimensions by putting a pointer to each dimension in a collection. The problems happen when you try to do things with a dimension pointer that points to a dimension that no longer exists. If the user deletes a dimension, the pointer still appears to be valid. You can read a value from it, get its full name, etc, but if you try to actually change it then SW crashes to desktop. I coded a path around that pitfall by reading the dimension name and confirming that it still exists by asking its owning document for it by name. However, if the document owning the dimension gets closed, anything at all I try to do with that dimension pointer (including getting its name) crashes SW. My rewrite idea: Instead of keeping a collection of dim pointers, I plan to keep three collections: one of dimension names, one of their owning documents, and (finally) the dimension pointers. It may take a while, though.
                                                                        • Edit multiple dimensions at once
                                                                          Mahir Abrahim
                                                                          Nice macro, Josh. What do you think about highlighting specific dimensions as they're respective textboxes are in focus? It would be even easier than identifiying dims via their name.
                                                                          • Edit multiple dimensions at once
                                                                            Josh Brady
                                                                            Mahir,
                                                                            I have thought about that. However, I would anticipate it not being that easy to implement. The Dimension object is not actually what you see in the model area. The "dimension" that you see is really the DisplayDimension object. I plan to give it a shot, but it may only be possible to highlight it in the context where it was added to the form. For example, say you are working in a part and you add a dimension to the form. Then you switch to an assembly containing that part. I may not be able to get it to highlight that dimension in the assembly. Conversely, if you add a part's dimension from the context of an assembly, I may be able to highlight it with that assembly active, but not the part or any other assembly that contains that part. We'll see, though!

                                                                            • Re: Edit multiple dimensions at once
                                                                              Will Maxwell

                                                                              I had the same issue as OP and found the following solution for setting the dimension of 128 circles to the same diameter.

                                                                                  1. Select the master feature and dimension to size

                                                                                   2. Fix said feature

                                                                                   3. Select every other feature (not fixed)

                                                                                   4. Add "Equal" relation in Properties

                                                                                   5. Un-fix master feature

                                                                              • Re: Edit multiple dimensions at once
                                                                                Avichai Habra

                                                                                Select the shapes you want to edit and under "Add Relations" in the properties select 'Equal' (pic below), now the shapes has the same relation and you can change the dimensions of one to change all of them.

                                                                                • Re: Edit multiple dimensions at once
                                                                                  Brian Hoerner

                                                                                  Folks,

                                                                                   

                                                                                  So obviously I had posted this 9 years ago when I first started using SW, funny to see responses now

                                                                                   

                                                                                  Let me clarify,  if I am editing a sketch that has 20 dimensions for example, in Creo, I can pick all of the dimensions and right click to select modify and a screen comes up with all dimensions in it, then I can un-select regenerate if I want to change multiple dimensions but don't want the changes to be in effect until I exit the form.

                                                                                   

                                                                                  The value of this is that I don't have crazy individual sketch curve changes until all have been changed, and then the sketch updates properly all at one time.

                                                                                   

                                                                                  This is something I would like to be able to do in SolidWorks occasionally

                                                                                   

                                                                                   

                                                                                  Also, as noted, the macro from Josh Brady worked well at the time he posted it, the configure tool works, but is more of a work around...imho...still, it works

                                                                                   

                                                                                  thanks for feedback, later folks!

                                                                                  • Re: Edit multiple dimensions at once
                                                                                    Glenn Schroeder

                                                                                    Brian,

                                                                                     

                                                                                    If you'll display the dimensions you want to modify in the graphics area (several ways to do that; I'm sure you're familiar with them), right-click on one of them, and choose "Configure dimension" from the drop-down it will bring up the table shown below, with one row for each configuration and a column for the selected dimension.  Double-click on dimensions in the graphics area to add additional columns and edit to your heart's content.  You can even name the table near the bottom and save it for future edits if you think you'll need it.

                                                                                     

                                                                                    It's a pretty simple process.  Will this work for you, or did I miss something?

                                                                                     

                                                                                      • Re: Edit multiple dimensions at once
                                                                                        Glenn Schroeder

                                                                                        Another option using a similar workflow would be to right-click on the sketch in the tree and choose "Configure feature".  That will open the same dialog box, but with a column where you have the option to suppress the sketch.  However, there's a little drop-down arrow you can click on that will show each dimension in the sketch.  You can select them to add a row.  After doing that you can even delete the first column if it's not needed.