model parameters

Is there a list of model parameters like what inventor has?

It allows you to change any value that was used to make the model.

See attached image

SolidworksUser Interface
Answers 65
SO
SO 2009-08-12 Best Answer
You can do this via Equations (Tools > Equations) or Design Tables (Insert > Tables > Design Table). Too much to list in a forum update, but do a search for that here or run through the Design Table tutorial in the Help menu. The equations will probably work closest, though.
TH
TH 2009-08-12

Steve

I understand the ability to see equations, but what about all dimensional values that define the model?

Thanks

Thaddeus

SO
SO 2009-08-12
Design Tables shoudl work best. Built in Excel spreadsheets that allow you to use all the power of Excel to drive the SolidWorks dimensions and properties. I've seen some amazing configurators built around this to drive part and assembly control/generation.
TH
TH 2009-08-12

Steve

I think you are missing the point.

I do not want to make a design table for every part.

All I am asking is there a way to view all equations as well as all dimensional data that was used to make the model or not?

Think about reviewing a model someone else has designed, instead of opening all sketches and reviewing the dimensions, this would allow you to see the dimensions on one page without previously making either a equation for each value or making a design table.

Thanks

Thaddeus

CC
CC 2009-08-12

I do not know of any method to show all the parameters at once. There are multiple ways to modify multiple parameters, but they all involve selecting those parameters first. For whatever reason, this information is available, but not accessible in an easy fashion. You can right click on the part name at the top of the feature tree, and you will see an option for "Dimension Access". This is a lesser-known function inside solidworks to "lock out" certain dimensions, so they cannot be edited. It will list the name of every dimension in the part, but not the values for each.

If you double-click on features or sketches, you can then select all of them, and choose "configure dimension". This allows you to edit sets of data (thoughout all the configurations) easily. However I agree this is now what you asked.

As this dataset is available somehow (as shown by dimension access function), I have to wonder if someone wrote a macro for this? Hopefully some people more familiar with all the macros out there can comment.

KL
KL 2009-08-12

There is no built-in function in SW for that, but Josh Brady (of these forums) came close with a EditMultipleDimensions macro in https://forum.solidworks.com/message/87807#87807

KL
KL 2009-08-12
The ModelRescaler macro at http://www.lennyworks.com/solidworks/default.asp?ID=20 traverses a model and applies a scale factor to each dimension, so they can certainly be accessed. I imagine a macro could be created to tabulate all the dimensions for editing, but I have no idea how much work that would involve.
TH
TH 2009-08-13

Steve, Charles, Kelvin

Thanks for your responses, I wanted to make sure I wasn’t missing a hidden method.

Maybe someday SolidWorks will have this ability.

Thaddeus

MG
MG 2009-08-13

Hi Thaddeus,

I too would like to see this option available in Solidworks. Its a lot easier to open up this option and review / change parameters from here, rather than searching for each dimension in the features tree.

Maybe for the next release ?

Thanks

Mark

DG
DG 2009-08-13
Why not use the design table and call dimensions into the table.
MG
MG 2009-08-13

Hi Deepak,

As Thaddeus stated in his origional thread he does not want to create design tables for every part, what he wants to see is a list of dimensions with there relevant parameters which go to make up a part.

You might think of this function in Inventor as automaticaly creating a design table as you model.

thanks

Mark

Solidworks 2009 SP4.1

DG
DG 2009-08-13

Well I didn't see any thing said about DT so mentioned about it. Sorry if I missed to read it.

And yes I liked this function of Inventor.

JB
JB 2009-08-13

It may be a bit crude, but check this macro.

When you run the macro, a table will load of all model dimensions.

The form is non-modal, which means that you can still interact with the model while the form is visible.

Any rebuild of the model will refresh the form.

You can change the dimension values directly on the form, then hit the button to apply your changes to the model.

If you switch documents, the form will refresh to the new document.  Any unapplied changes to the form will be lost, however.

Clicking on any entry in the table will highlight its feature and select the dimension.

For models with multiple configurations, dimension changes should apply using the current setting of that dimension, just like you edited the dimension in the user interface without specifying how the change should affect configs.

KL
KL 2009-08-13

Thadeus,

On complex parts with hundreds, if not thousands, of dimensions (parameters) would that not be a horrendous task to find the one dimension needed?

In your example image, the Comments column shows a description of the parameter. Does that means that every dimension would have to be named or commented? That is a lot of work for something which may be rarely or never used.

TH
TH 2009-08-13

Josh

You’re awesome.

I think what you have here is gold plated.

Thanks, I’m sure others will like this Macro.

Thaddeus

MG
MG 2009-08-14

Josh,

That is one nice macro, I hope Solidworks see it and pay you lots of money to add it to the core product.

Thanks

Mark

JB
JB 2009-08-14

Here's a slightly updated version.

Ignores Cosmetic Threads by default (Hole Wizard with Cosmetic Thread creates a bunch of useless entries in the list)

Ignores driven dimensions by default

For dimensions driven by an equation, displays the equation

For linked values, displays link name.  Editing one entry that is linked changes all same linked entries.

MG
MG 2009-08-15

Hi Josh

Thanks for posting the update, as i've said great macro, do you know of a way to export the info into an Excel spread sheet?

Thanks

Mark

JB
JB 2009-08-15
It wouldn't be hard at all to export to Excel.  I already added some config-related stuff.  Perhaps Monday I can make a quick update.
JB
JB 2009-08-17

New capabilities:

1. Export to Excel (not sure how that helps, but it's there).

2. Different buttons for applying dim changes to configurations:

  A. "Unspecified" button applies change just as if you had edited the dimension without specifying how to apply to configs.

3. Icon indicates dimension type (angular, linear, or integer for pattern instances)

4. Enter values in any units, enter math expressions. Spaces will be interpreted as "+".  Any number without units specified will be interpreted in current document units.  Specified units will be converted to document units.  e.g. entry of 1' 3" will convert to 381 if document is in mm, or 15 if document is inches.

MA
MA 2009-08-17
Nice work, Josh
TH
TH 2009-08-17

Josh

What you have done is great, it looks as though you like to program.

If you still want to play around with this macro, would you be interested in making it so one could rename the dimensions?

Thanks for all you have done.

Thaddeus

JB
JB 2009-08-17

1. Double-click any line to edit the name of the dimension.

Note that there is no code to check for improper dimension names.  Please take care not to use SW special characters such as @, $, etc.  If in doubt about whether a character or symbol should be used, see if the standard SW interface will allow its use.

Edit:


Verifies that the dimension name entered is not already in use.

MG
MG 2009-08-18

Hi Josh,

Nice work, however when i run the export to Excel option i get the following error message,

See word doc

Thanks

Mark

DG
DG 2009-08-18

Mark,

What version of SolidWorks you running.

DG
DG 2009-08-18

Josh,

Works great.Thanks for the macro.

Found one error.

If I double click any dimension to rename, the cancel button doesn't work in the pop up. And if I hit OK, it says dimension name is already in use which mean I have to rename to get out out of the pop up. Do you see the same there too.

MG
MG 2009-08-18

Hi Deepak,

Im on SolidWorks 2009 SP 4.1 and using Excel 2000.

Thanks

Mark

DG
DG 2009-08-18
MG
MG 2009-08-18

Hi Deepak,

Thanks for the link reading through and changing one of the listed libaries solved the problem.

Thanks

Mark

JB
JB 2009-08-18

Hmm, sounds like an error on your part.  Why are you double-clicking on a dimension you really don't want to rename?

OK, so maybe you want to be able to change your mind.

1. Added "Cancel" capability for name change.

2. Name change checks for "@" in new name.

Edit:

3. Added resizer control to bottom right corner of form. Resizer code thanks to http://www.andypope.info/vba/resizeform.htm

MG
MG 2009-08-18

Hi Josh,

Thanks again for macro very handy, do you know of a macro that can do the following.

When you have created a single / multiple weld bead I would like to be able to click them in the feature tree and be able to export them to an Excel Spread Sheet.

The info that is imported in the spread sheet would be weld size  / bead length / bead weight and volume.

The reason I am looking for this function is I could add total exported lengths together and work out how many rods / welding wire and cost would be required to weld each part. When I was using Inventor this export weld bead ability was available but unfortunately not in SolidWorks.

Although just the ability to be able export the weld size and length would be ok

Thanks

Mark

DG
DG 2009-08-19
Thanks Josh.
CC
CC 2009-08-19

Josh,

Your program is outstanding.

Would it be easy to make it work for drawings? Pull all the dimensions and tolerances on a drawing? There is some pretty expensive 3rd party software out there that does that for first article inspections. It pulls the dimensions, and puts bubbles on the drawings.

If you could port this over to drawings you could even charge some money and I know of at least one company that would be thrilled to purchase it from you. The only catch there is we would want bug support and support for future versions!

DG
DG 2009-08-19
Josh you are on demand....
JB
JB 2009-08-19

Charles,

Have you seen this macro before?  Does it come close to your need?

SF
SF 2009-08-19
Hmm... having trouble getting this macro to run.  Every time I attempt, I get a "Compile error: Can't find project or library" message with "swDoc As SldWorks.ModelDoc2" highlighted in the editor... help?
JB
JB 2009-08-19
What version of SW are you running?  If it's not 09, you'll have to edit the macro and go to Tools->References.  Some items in the list will be labeled as "MISSING:".  Find the corresponding items for your SW version in the list and check them.
CC
CC 2009-08-19
Very nice. Not as clean as the programs we were looking at, but the price is right.  Thanks Josh. Did you make that one? There was no credit block that I could find.
JB
JB 2009-08-19
Yes, I wrote that one some time ago.  It's certainly a bit crude.  Its biggest weakness (I think) in its current form is that it doesn't "remember" which flags go with which dimensions from run to run.  If you run the macro, then go mess around with dimensions (adding/deleting), then run again, the flags will likely change.
SF
SF 2009-08-19
Thanks Josh, I'm using SW2008 SP5.  I routed to the necessary reference to replace the "MISSING" ones, and this will start the app correctly - however any time I try to edit dimensions I still get errors.  Maybe a lot more work needs to be done to get it to run on 2008?  Anyway, seems like a really great program - good job
JB
JB 2009-08-21

Give this one a try.  I tested it in 2008 SP3.1, so it should work for you.

SF
SF 2009-08-21

Great job Josh - everything's working fine so far!

Thanks

TS
TS 2009-08-24

Any tips on converting this to VB.NET? Your code seems pretty straight forward. I tried in .NET and I don't believe it is that simple.

I'd like to use the base of this and tailor it towards custom properties. I have acheieved that in macro form, but I'd like to move it to .NET.

Thanks for any help.

JB
JB 2009-08-24
Sorry, still a baby at VB.net.  I did convert one VBA macro to a VSTA VB.net macro a while ago, and I remember it being pretty straightforward.  Are you looking to make a standalone .exe, or a .net dll macro?
TS
TS 2009-08-24
Just a stand alone .exe is what I am after. I just find that there are many things that I can do with .NET that I can't with a macro.
SF
SF 2009-08-27

Hi.  This file is really good.  However I have to reopen it everytime I make some changes on the model.  Is there any links between the excel and 3D model, so I have both update everytime I change dimensions on the model.  Thanks

Kelvin

JB
JB 2009-08-28
I'm not sure if you're talking about the macro that is the main subject of this thread, or the one that works with drawings that I posted for Charles.  Sorry, there's no link between Excel and the model in either one.  If you are talking about the one with the form, the form values will update with every model change.  You do not have to close the form to continue working with the model.  You can even switch between documents with the form still open.  However, the function for exporting to Excel is only one-way, and it only happens when you hit the button.
SF
SF 2009-09-03

Hi Josh.  Thanks for your information.  One more question I want to ask you.  After I run the Flag file and import it to an excel sheet, I had some unexpected decimal places which are not on my drawing.  I will attach a excel sheet for you to look at (I already red line those dims with long decimal places).  Thanks

Kelvin

JB
JB 2009-09-03

This is because the macro exports the dimension value, not the dimension text.

If you do not want to round the values in the Excel sheet, you can add code to read the precision of the display dimension and round the value before putting it in Excel.

JB
JB 2009-10-02

Here's a little update.

With a model of any complexity at all, the list of dimensions can get pretty large.  Some are critical to design, some not so much.  There's not a whole lot of benefit to just seeing a list of 100 or so dimensions, especially when a well-built model can be updated by changing just a few dimensions.  So I added some functionality.

There's now a checkbox to the left of each dimension, and a checkbox at the top of that column.  If the checkbox at the top is checked, only checked dimensions will be shown in the table, and non-checked dimensions will be hidden.

The list of checked dimensions and the state of the top checkbox is stored in the part/assembly (as long as you save the document after checking boxes), so that next time you open up the document your handy list of important dimensions is right there.  The data is stored as an Attribute attached to the model document, for anyone who might care.  The attribute is hidden in the design tree.

Oh, and it doesn't crash when you switch to a drawing either.  Another small improvement.  :-)

PM
PM 2009-10-05

Josh,

  We actually have a program that does this for us too.  It reads dimension values, GDT, Surface finish, notes etc. and remembers the data from session to session by exporting to an xml file that gets stored with the model and exports the list of values to a txt file.  Not sure if maybe you would want to add something like that for your program.  It also saves the balloon locations relative to the annotation so when you insert them or move annotations the balloons stay in the same spot relatively. FWIW

What is interesting is that I ran across this thread while trying to figure out how to get my menu back to launch my exe for this program from SW... shouldn't have started messing around so much when I don't know enough to not be dangerous

JB
JB 2009-10-06

One more update...

I added another checkbox to the form labeled "Show all open documents".  If both this box and the "Checked Dimensions Only" box are checked, all checked dimensions from all open documents will show in the list.  Dimensions from the active document are listed first, and other documents will be shown with their icons ghosted.  Hovering over the value for other documents will bring up a tooltip with the configuration and document owning that dimension.  Right-clicking on any line will activate that dimension's owning document in Solidworks.

CV
CV 2011-02-15

Hallo Josch,

many thanks for your macro TabulateAllDimsWithCriticals.

I Woul like to have a form to manage dimension of my multibody part.

Thinking on your macro,

I would like to select dimensions and functions, chose or create a  form or a group , chose an object type (flag, text, combo...)

Do you know if it alredy exist ?

Many thanks

Claudio

JB
JB 2011-02-15

Sorry, but I couldn't really make out exactly what you are looking for.  Also, I just don't have time to mess with that right now.  Any takers?

SF
SF 2012-12-11

Hi Josh,

Your macro is very useful. I am new to Solid Works API and I had exactly same question what Thaddeus has and after reading through this forum and test your macro it answered most of my questions.

But I still some more doubts, can you please suggest.

1) There are some parameters in "Evaluate tab->Design Study-> Parameters" section. May I know by any chance these parameters can be referenced in feature dimensions for example extrude length of Boss etc..?

2) Is it possible create a user defined dimensions first and then use those dimensions while creating sketch or extrude feature

3) Is it possible to reference part level dimensions/parameters at assembly level?

4) Is it possible to have dimensions/parameters at instance level.

5) Is it possible to use ModelDoc2.Extension.SelectByID2() method to get all dimensions instead of traversing through one by one feature to get all dimensions?

Excuse me if these questions are very basic.

SF
SF 2014-03-25

Hi Josh, this Macro is really helpful I just have one question for you.  If I want this macro to report GD&T annotations from dimxpert can it do that?  Is there a way you could make a new version that could perform that operation?  We are trying to eliminate drawings here at GE Oil and Gas and by doing so we are just using Dimxpert in our part window as our model/drawing.

MS
MS 2016-04-17

i am using solidworks 2014 and when i run the api it says you are missing some credentials .how do i make it run in solidworks 2014.

JB
JB 2016-10-21

Howdy folks, in case anyone has interest in this I figured out a quick-and-dirty way to get this macro about 90% functional.  All of the code was written into the form.  All I had to do was request API support to export the forms using an old version of SolidWorks, then import into an Excel macro.  Made a couple of tweaks to initialize objects and it's functional.  It's a bit slower than it used to be since it's running from Excel instead of inside SW, but you can at least see how it works.  You need to open SW before you run the macro from Excel.

DG
DG 2016-10-21

Hi , thanks for the updated version.

I get this error on when i run the macro from excel

It show error on this line

On checking the references, they are all OK

comment imagecomment imagecomment imagecomment image
JB
JB 2016-10-21

Deepak,

That control should be a Microsoft ImageList Control, version 6.0.  It's part of MSCOMCTL.OCX, which (for me) is located in C:\Windows\SysWOW64.  You might have to make sure you have that and that it's registered.

One caveat... The Excel version won't work either if you're using 64 bit Office.  Most people still run 32 bit even on a 64 bit OS because there's not as much benefit unless you're doing large or complex Office files.

DG
DG 2016-10-21
<p>Josh Brady wrote:</p><p></p><p>one caveat... The Excel version won't work either if you're using 64 bit Office. </p>

Well that's double dang!!

JB
JB 2016-10-21

There's actually nothing special about Excel either with regard to this macro.  I've exported the two forms used by this macro.  If you have pretty much any program at all that uses 32 bit VBA (Outlook, Access, etc.) then this code should work.  Just import the two forms (DimForm and frmConfigs) into a new macro/document/VBA project/whatever.  Then somehow run DimForm.Show.  All the code is contained in the DimForm, and it should connect to SolidWorks.

DG
DG 2016-10-21

Nothing 32 bit as I know. May be will see if I can upgrade it to 64 bit.

PA
PA 2017-03-17

As Charles said, thank you for all of this, it's already helped quite a bit.

Would it be hard to take that ballooning and everything and add the Zones they can be found in as well?

SJ
SJ 2017-07-14

Hi,

You could also try select all by click and drag in the margin
(see red line in screensnap below.

Ctrl+C

Then just paste in to excel.

Regards,

Saurabh Jagirdar

comment imagecomment image