Blog

SolidWorks: Equation Syntax Problem

I’ve been having a tiny, yet very annoying problem working with SolidWorks 2016 lately. Now I seem to have found a solution I would like share:

Problem

sw_syntaxerror01I am using a text file with equations to propagate global variables to the parts of my model. In general that works really fine. Yet in some parts it occurred that some variables were not recognized. Trying to solve the problem, I disabled the link to file (no effect) and tried to change the value (no effect either). SolidWorks kept on telling me:

The syntax of this equation is incorrect.sw_syntaxerror03

which is clearly wasn’t. I searched for similar problems and found some people having problems with the internal VBA execution of SolidWorks, that in some cases failed after a Windows update. Fortunately my problem finally was not that severe.

(running SolidWorks 2016 Standard SP 4 x64 Edition on Windows 10 Home)

Fix

After a lot of trying around I noticed that the problem occurred only in parts whose unit was set to inch. Now the imperial system in itself is a terrible mistake (how much is 17/32 of a barleycorn again?), but it usually does not cause errors in CAD-programs. In this case however, turning the parts unit to millimetres (Options –> Document Properties –> Units –> MMGS) and a subsequent opening and rebuilding of the Equations-window in the tree will resolve the issue. 

By the way, for those who think in hands, inches and poppyseeds: switching back the part to imperial will not cause the problem to return.

The BOM Tool in Inventor

Today is one of the days where I discovered a very handy tool, and I feel a bit stupid for not having discovered or used it earlier. I am talking about the Bill of Materials in Inventor, which lets you bulk edit the iProperties of your Assembly in an Excel-fashion, giving you perfect control over the meta-data side of your work. This video sums it up nicely:

Add Help to Your iLogic Form

If you want to provide additional information on, for example how to configure a iLogic component, one way would be to write it directly into the form as text such as labels. Of course, by doing that consequently, you will end up with a huge and confusing form. Much more elegantly, you can use the tooltip field when you edit your form elements, which shows information only when your mouse is hovering over this form element. Actually, when you fill out the comments of the parameters you want to have in the form immediately, the comment will be set as tool tip when you create the form element for this parameter.

However, only text might not be sufficient, maybe you want to use images or videos as a documentation. A very appealing way to do this is to link to a document or page in you intranet, for example a wiki page that contains additional information for this part. To do this, just create an iLogic-rule and add the line:

Create a button called Help for this rule.

There are many reasons to take it one step further and use the iProperty-field WEB Link to put in the URL and use the following rule text:

The advantages could be:

  • Fill out and maintain the URLs without opening the files in Inventor (access from Vault etc)
  • Copy and paste rule into other documents
  • Use an external rule to call help site
  • Create an Add-In that adds a Help button to your ribbon

Let me know what you think!